dashboard-shell-shell 1.0.113 → 1.0.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ActionDropdown.vue +1 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +0 -1
- package/components/AppModal.vue +6 -78
- package/components/AssignTo.vue +11 -25
- package/components/AsyncButton.vue +7 -24
- package/components/BannerGraphic.vue +0 -1
- package/components/ButtonDropdown.vue +4 -26
- package/components/ButtonGroup.vue +0 -4
- package/components/ButtonMultiAction.vue +0 -1
- package/components/CommunityLinks.vue +3 -3
- package/components/ConsumptionGauge.vue +5 -24
- package/components/CopyToClipboardText.vue +1 -2
- package/components/CruResource.vue +7 -12
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +15 -21
- package/components/DetailText.vue +0 -5
- package/components/DisableAuthProviderModal.vue +0 -1
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +14 -56
- package/components/FixedBanner.vue +12 -19
- package/components/GlobalRoleBindings.vue +1 -5
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +1 -4
- package/components/HardwareResourceGauge.vue +3 -39
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +2 -28
- package/components/LabelValue.vue +1 -16
- package/components/LandingPagePreference.vue +3 -5
- package/components/LocaleSelector.vue +93 -39
- package/components/ModalWithCard.vue +0 -2
- package/components/MoveModal.vue +0 -1
- package/components/PromptChangePassword.vue +1 -1
- package/components/PromptModal.vue +2 -15
- package/components/PromptRemove.vue +8 -28
- package/components/PromptRestore.vue +0 -1
- package/components/ResourceCancelModal.vue +0 -1
- package/components/ResourceDetail/Masthead.vue +43 -188
- package/components/ResourceDetail/__tests__/Masthead.test.ts +1 -5
- package/components/ResourceDetail/index.vue +14 -49
- package/components/ResourceList/Masthead.vue +18 -80
- package/components/ResourceTable.vue +19 -60
- package/components/SideNav.vue +12 -32
- package/components/SortableTable/THead.vue +5 -34
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +142 -649
- package/components/SortableTable/paging.js +28 -36
- package/components/SortableTable/selection.js +11 -0
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +26 -44
- package/components/Wizard.vue +2 -2
- package/components/__tests__/AsyncButton.test.ts +2 -2
- package/components/__tests__/FixedBanner.test.ts +3 -3
- package/components/auth/Principal.vue +3 -10
- package/components/auth/__tests__/RoleDetailEdit.test.ts +2 -3
- package/components/form/ArrayList.vue +85 -123
- package/components/form/ArrayListGrouped.vue +2 -10
- package/components/form/Command.vue +15 -6
- package/components/form/EnvVars.vue +8 -16
- package/components/form/Footer.vue +5 -8
- package/components/form/HealthCheck.vue +3 -3
- package/components/form/HookOption.vue +16 -11
- package/components/form/KeyValue.vue +7 -16
- package/components/form/LabeledSelect.vue +76 -59
- package/components/form/LifecycleHooks.vue +3 -3
- package/components/form/MatchExpressions.vue +12 -35
- package/components/form/NameNsDescription.vue +115 -147
- package/components/form/Networking.vue +12 -20
- package/components/form/NodeAffinity.vue +23 -31
- package/components/form/NodeScheduling.vue +3 -13
- package/components/form/Password.vue +5 -11
- package/components/form/PodAffinity.vue +44 -43
- package/components/form/Probe.vue +66 -68
- package/components/form/ResourceQuota/Project.vue +1 -5
- package/components/form/ResourceSelector.vue +9 -7
- package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +3 -6
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +1 -12
- package/components/form/SSHKnownHosts/index.vue +2 -16
- package/components/form/Security.vue +56 -54
- package/components/form/Select.vue +7 -41
- package/components/form/ShellInput.vue +1 -5
- package/components/form/Tolerations.vue +1 -5
- package/components/form/UnitInput.vue +2 -2
- package/components/form/ValueFromResource.vue +121 -134
- package/components/form/WorkloadPorts.vue +18 -18
- package/components/form/__tests__/ArrayList.test.ts +2 -5
- package/components/form/__tests__/MatchExpressions.test.ts +12 -12
- package/components/form/__tests__/NameNsDescription.test.ts +14 -115
- package/components/form/__tests__/Probe.test.ts +8 -12
- package/components/form/__tests__/SSHKnownHosts.test.ts +0 -11
- package/components/form/__tests__/Select.test.ts +0 -37
- package/components/form/__tests__/UnitInput.test.ts +5 -4
- package/components/formatter/BadgeStateFormatter.vue +5 -8
- package/components/formatter/ExtensionCache.vue +74 -0
- package/components/formatter/InternalExternalIP.vue +0 -2
- package/components/formatter/Port.vue +24 -0
- package/components/formatter/SecretData.vue +7 -20
- package/components/formatter/SecretType.vue +41 -0
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +27 -60
- package/components/nav/Header.vue +13 -39
- package/components/nav/Jump.vue +0 -7
- package/components/nav/NamespaceFilter.vue +8 -14
- package/components/nav/Pinned.vue +1 -1
- package/components/nav/TopLevelMenu.vue +17 -5
- package/components/nav/Type.vue +35 -32
- package/components/nav/__tests__/TopLevelMenu.test.ts +40 -0
- package/components/templates/blank.vue +1 -4
- package/components/templates/default.vue +0 -8
- package/components/templates/home.vue +1 -10
- package/components/templates/plain.vue +1 -10
- package/package.json +1 -1
- package/components/ActionDropdownShell.vue +0 -71
- package/components/DotState.vue +0 -84
- package/components/ModalManager.vue +0 -55
- package/components/SlideInPanelManager.vue +0 -126
- package/components/StatusBadge.vue +0 -77
- package/components/__tests__/ModalManager.spec.ts +0 -176
- package/components/__tests__/SlideInPanelManager.spec.ts +0 -166
|
@@ -81,8 +81,7 @@ export default {
|
|
|
81
81
|
extensionHeaderActions: getApplicableExtensionEnhancements(this, ExtensionPoint.ACTION, ActionLocation.HEADER, this.$route),
|
|
82
82
|
ctx: this,
|
|
83
83
|
showImportModal: false,
|
|
84
|
-
showSearchModal: false
|
|
85
|
-
userIcon: require('~shell/assets/images/logo.png'),
|
|
84
|
+
showSearchModal: false
|
|
86
85
|
};
|
|
87
86
|
},
|
|
88
87
|
|
|
@@ -405,7 +404,7 @@ export default {
|
|
|
405
404
|
<TopLevelMenu v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct" />
|
|
406
405
|
</div>
|
|
407
406
|
|
|
408
|
-
|
|
407
|
+
<div
|
|
409
408
|
class="menu-spacer"
|
|
410
409
|
:class="{'isSingleProduct': isSingleProduct }"
|
|
411
410
|
>
|
|
@@ -524,20 +523,8 @@ export default {
|
|
|
524
523
|
:alt="t('branding.logos.label')"
|
|
525
524
|
/>
|
|
526
525
|
</div>
|
|
527
|
-
</div> -->
|
|
528
|
-
|
|
529
|
-
<!-- logo -->
|
|
530
|
-
<div class="menu-spacer">
|
|
531
|
-
<router-link
|
|
532
|
-
v-if="isSingleProduct && !isRancherInHarvester"
|
|
533
|
-
:to="singleProductLogoRoute"
|
|
534
|
-
>
|
|
535
|
-
<img
|
|
536
|
-
:src="userIcon"
|
|
537
|
-
>
|
|
538
|
-
</router-link>
|
|
539
526
|
</div>
|
|
540
|
-
|
|
527
|
+
|
|
541
528
|
<div class="spacer" />
|
|
542
529
|
|
|
543
530
|
<div class="rd-header-right">
|
|
@@ -709,23 +696,20 @@ export default {
|
|
|
709
696
|
data-testid="nav_header_showUserMenu"
|
|
710
697
|
:aria-label="t('nav.userMenu.button.label')"
|
|
711
698
|
>
|
|
712
|
-
|
|
699
|
+
<img
|
|
713
700
|
v-if="principal && principal.avatarSrc"
|
|
714
701
|
:src="principal.avatarSrc"
|
|
715
702
|
:class="{'avatar-round': principal.roundAvatar}"
|
|
716
703
|
width="36"
|
|
717
704
|
height="36"
|
|
718
|
-
:alt="t('nav.alt.userAvatar')"
|
|
719
705
|
>
|
|
720
706
|
<i
|
|
721
707
|
v-else
|
|
722
708
|
class="icon icon-user icon-3x avatar"
|
|
723
|
-
/>
|
|
724
|
-
<i class="icon icon-usericon" />
|
|
725
|
-
<span class="login-name">{{ principal.loginName }}</span>
|
|
709
|
+
/>
|
|
726
710
|
</rc-dropdown-trigger>
|
|
727
711
|
<template #dropdownCollection>
|
|
728
|
-
|
|
712
|
+
<template v-if="authEnabled">
|
|
729
713
|
<div class="user-info">
|
|
730
714
|
<div class="user-name">
|
|
731
715
|
<i class="icon icon-lg icon-user" /> {{ principal.loginName }}
|
|
@@ -737,13 +721,13 @@ export default {
|
|
|
737
721
|
</div>
|
|
738
722
|
</div>
|
|
739
723
|
<rc-dropdown-separator />
|
|
740
|
-
</template>
|
|
741
|
-
|
|
724
|
+
</template>
|
|
725
|
+
<rc-dropdown-item
|
|
742
726
|
v-if="showPreferencesLink"
|
|
743
727
|
@click="$router.push({ name: 'prefs'})"
|
|
744
728
|
>
|
|
745
729
|
{{ t('nav.userMenu.preferences') }}
|
|
746
|
-
</rc-dropdown-item>
|
|
730
|
+
</rc-dropdown-item>
|
|
747
731
|
<rc-dropdown-item
|
|
748
732
|
v-if="showAccountAndApiKeyLink"
|
|
749
733
|
@click="$router.push({ name: 'account'})"
|
|
@@ -776,7 +760,6 @@ export default {
|
|
|
776
760
|
HEADER {
|
|
777
761
|
display: flex;
|
|
778
762
|
z-index: z-index('mainHeader');
|
|
779
|
-
box-shadow: 0px 3px 3px 1px rgba(0,0,0,0.12);
|
|
780
763
|
|
|
781
764
|
> .spacer {
|
|
782
765
|
flex: 1;
|
|
@@ -894,7 +877,7 @@ export default {
|
|
|
894
877
|
|
|
895
878
|
> * {
|
|
896
879
|
background-color: var(--header-bg);
|
|
897
|
-
|
|
880
|
+
border-bottom: var(--header-border-size) solid var(--header-border);
|
|
898
881
|
}
|
|
899
882
|
|
|
900
883
|
.rd-header-right {
|
|
@@ -907,7 +890,7 @@ export default {
|
|
|
907
890
|
}
|
|
908
891
|
|
|
909
892
|
> .top {
|
|
910
|
-
padding-top:
|
|
893
|
+
padding-top: 6px;
|
|
911
894
|
|
|
912
895
|
INPUT[type='search']::placeholder,
|
|
913
896
|
.vs__open-indicator,
|
|
@@ -1027,7 +1010,7 @@ export default {
|
|
|
1027
1010
|
|
|
1028
1011
|
> .user {
|
|
1029
1012
|
outline: none;
|
|
1030
|
-
|
|
1013
|
+
width: var(--header-height);
|
|
1031
1014
|
|
|
1032
1015
|
.v-popper {
|
|
1033
1016
|
display: flex;
|
|
@@ -1041,10 +1024,6 @@ export default {
|
|
|
1041
1024
|
.user-image {
|
|
1042
1025
|
display: flex;
|
|
1043
1026
|
align-items: center;
|
|
1044
|
-
&:hover{
|
|
1045
|
-
color: var(--primary);
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
1027
|
}
|
|
1049
1028
|
|
|
1050
1029
|
&:focus {
|
|
@@ -1173,10 +1152,5 @@ export default {
|
|
|
1173
1152
|
}
|
|
1174
1153
|
}
|
|
1175
1154
|
}
|
|
1176
|
-
|
|
1177
|
-
font-size: 14px;
|
|
1178
|
-
margin-left: 5px;
|
|
1179
|
-
margin-top: 5px;
|
|
1180
|
-
line-height: 20px;
|
|
1181
|
-
}
|
|
1155
|
+
|
|
1182
1156
|
</style>
|
package/components/nav/Jump.vue
CHANGED
|
@@ -71,12 +71,6 @@ export default {
|
|
|
71
71
|
|
|
72
72
|
<template>
|
|
73
73
|
<div>
|
|
74
|
-
<p
|
|
75
|
-
id="describe-filter-resource-search"
|
|
76
|
-
hidden
|
|
77
|
-
>
|
|
78
|
-
{{ t('nav.resourceSearch.filteringDescription') }}
|
|
79
|
-
</p>
|
|
80
74
|
<input
|
|
81
75
|
ref="input"
|
|
82
76
|
v-model="value"
|
|
@@ -84,7 +78,6 @@ export default {
|
|
|
84
78
|
class="search"
|
|
85
79
|
role="textbox"
|
|
86
80
|
:aria-label="t('nav.resourceSearch.label')"
|
|
87
|
-
aria-describedby="describe-filter-resource-search"
|
|
88
81
|
@keyup.esc="$emit('closeSearch')"
|
|
89
82
|
>
|
|
90
83
|
<div class="results">
|
|
@@ -921,7 +921,6 @@ export default {
|
|
|
921
921
|
display: flex;
|
|
922
922
|
> i {
|
|
923
923
|
padding-right: 5px;
|
|
924
|
-
font-size: 10px;
|
|
925
924
|
}
|
|
926
925
|
}
|
|
927
926
|
|
|
@@ -933,8 +932,6 @@ export default {
|
|
|
933
932
|
|
|
934
933
|
.ns-filter-input {
|
|
935
934
|
height: 24px;
|
|
936
|
-
border: 1px solid #d7d7d7;
|
|
937
|
-
padding: 0px 5px;
|
|
938
935
|
}
|
|
939
936
|
|
|
940
937
|
.ns-filter-clear {
|
|
@@ -949,8 +946,7 @@ export default {
|
|
|
949
946
|
|
|
950
947
|
.ns-dropdown-menu {
|
|
951
948
|
background-color: var(--header-bg);
|
|
952
|
-
|
|
953
|
-
border: 1px solid #d7d7d7;;
|
|
949
|
+
border: 1px solid var(--primary-border);
|
|
954
950
|
border-bottom-left-radius: var(--border-radius);
|
|
955
951
|
border-bottom-right-radius: var(--border-radius);
|
|
956
952
|
color: var(--header-btn-text);
|
|
@@ -970,10 +966,10 @@ export default {
|
|
|
970
966
|
}
|
|
971
967
|
|
|
972
968
|
.ns-divider {
|
|
973
|
-
|
|
969
|
+
border-top: 1px solid var(--border);
|
|
974
970
|
cursor: default;
|
|
975
|
-
|
|
976
|
-
|
|
971
|
+
margin-top: 10px;
|
|
972
|
+
padding-bottom: 10px;
|
|
977
973
|
}
|
|
978
974
|
|
|
979
975
|
.ns-option {
|
|
@@ -1013,7 +1009,7 @@ export default {
|
|
|
1013
1009
|
&.ns-selected:not(:hover) {
|
|
1014
1010
|
.ns-item {
|
|
1015
1011
|
> * {
|
|
1016
|
-
|
|
1012
|
+
color: var(--primary);
|
|
1017
1013
|
}
|
|
1018
1014
|
}
|
|
1019
1015
|
|
|
@@ -1066,7 +1062,7 @@ export default {
|
|
|
1066
1062
|
border-radius: var(--border-radius);
|
|
1067
1063
|
color: var(--header-btn-text);
|
|
1068
1064
|
cursor: pointer;
|
|
1069
|
-
height:
|
|
1065
|
+
height: 40px;
|
|
1070
1066
|
padding: 0 10px;
|
|
1071
1067
|
position: relative;
|
|
1072
1068
|
z-index: z-index('dropdownOverlay');
|
|
@@ -1074,8 +1070,7 @@ export default {
|
|
|
1074
1070
|
&.ns-open {
|
|
1075
1071
|
border-bottom-left-radius: 0;
|
|
1076
1072
|
border-bottom-right-radius: 0;
|
|
1077
|
-
|
|
1078
|
-
border-color: #d7d7d7;
|
|
1073
|
+
border-color: var(--primary-border);
|
|
1079
1074
|
}
|
|
1080
1075
|
|
|
1081
1076
|
> .ns-values {
|
|
@@ -1114,13 +1109,12 @@ export default {
|
|
|
1114
1109
|
border-radius: 5px;
|
|
1115
1110
|
color: var(--tag-text);
|
|
1116
1111
|
display: flex;
|
|
1117
|
-
|
|
1112
|
+
line-height: 20px;
|
|
1118
1113
|
padding: 2px 5px;
|
|
1119
1114
|
white-space: nowrap;
|
|
1120
1115
|
|
|
1121
1116
|
> i {
|
|
1122
1117
|
margin-left: 5px;
|
|
1123
|
-
font-size: 8px;
|
|
1124
1118
|
|
|
1125
1119
|
&:hover {
|
|
1126
1120
|
color: var(--primary);
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
:aria-checked="!!pinned"
|
|
37
37
|
class="pin icon"
|
|
38
38
|
:class="{'icon-pin-outlined': !pinned, 'icon-pin': pinned}"
|
|
39
|
-
role="button"
|
|
39
|
+
aria-role="button"
|
|
40
40
|
:aria-label="t('nav.ariaLabel.pinCluster', { cluster: cluster.label })"
|
|
41
41
|
@click.stop.prevent="toggle"
|
|
42
42
|
@keydown.enter.prevent="toggle"
|
|
@@ -14,6 +14,7 @@ import { SETTING } from '@shell/config/settings';
|
|
|
14
14
|
import { getProductFromRoute } from '@shell/utils/router';
|
|
15
15
|
import { isRancherPrime } from '@shell/config/version';
|
|
16
16
|
import Pinned from '@shell/components/nav/Pinned';
|
|
17
|
+
import { getGlobalBannerFontSizes } from '@shell/utils/banners';
|
|
17
18
|
import { TopLevelMenuHelperPagination, TopLevelMenuHelperLegacy } from '@shell/components/nav/TopLevelMenu.helper';
|
|
18
19
|
import { debounce } from 'lodash';
|
|
19
20
|
import { sameContents } from '@shell/utils/array';
|
|
@@ -81,6 +82,15 @@ export default {
|
|
|
81
82
|
return this.$store.getters['prefs/get'](PINNED_CLUSTERS);
|
|
82
83
|
},
|
|
83
84
|
|
|
85
|
+
sideMenuStyle() {
|
|
86
|
+
const globalBannerSettings = getGlobalBannerFontSizes(this.$store);
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
marginBottom: globalBannerSettings?.footerFont,
|
|
90
|
+
marginTop: globalBannerSettings?.headerFont
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
|
|
84
94
|
showClusterSearch() {
|
|
85
95
|
return this.allClustersCount > this.maxClustersToShow;
|
|
86
96
|
},
|
|
@@ -430,7 +440,8 @@ export default {
|
|
|
430
440
|
|
|
431
441
|
return {
|
|
432
442
|
content,
|
|
433
|
-
placement:
|
|
443
|
+
placement: 'right',
|
|
444
|
+
popperOptions: { modifiers: { preventOverflow: { enabled: false }, hide: { enabled: false } } },
|
|
434
445
|
popperClass
|
|
435
446
|
};
|
|
436
447
|
},
|
|
@@ -472,6 +483,7 @@ export default {
|
|
|
472
483
|
data-testid="side-menu"
|
|
473
484
|
class="side-menu"
|
|
474
485
|
:class="{'menu-open': shown, 'menu-close':!shown}"
|
|
486
|
+
:style="sideMenuStyle"
|
|
475
487
|
tabindex="-1"
|
|
476
488
|
role="navigation"
|
|
477
489
|
:aria-label="t('nav.ariaLabel.topLevelMenu')"
|
|
@@ -698,7 +710,7 @@ export default {
|
|
|
698
710
|
v-if="clustersFiltered.length > 0"
|
|
699
711
|
class="category-title"
|
|
700
712
|
>
|
|
701
|
-
<hr
|
|
713
|
+
<hr>
|
|
702
714
|
</div>
|
|
703
715
|
</div>
|
|
704
716
|
|
|
@@ -812,7 +824,7 @@ export default {
|
|
|
812
824
|
<div
|
|
813
825
|
class="category-title"
|
|
814
826
|
>
|
|
815
|
-
<hr
|
|
827
|
+
<hr>
|
|
816
828
|
<span>
|
|
817
829
|
{{ t('nav.categories.multiCluster') }}
|
|
818
830
|
</span>
|
|
@@ -845,7 +857,7 @@ export default {
|
|
|
845
857
|
<div
|
|
846
858
|
class="category-title"
|
|
847
859
|
>
|
|
848
|
-
<hr
|
|
860
|
+
<hr>
|
|
849
861
|
<span>
|
|
850
862
|
{{ t('nav.categories.configuration') }}
|
|
851
863
|
</span>
|
|
@@ -990,7 +1002,7 @@ export default {
|
|
|
990
1002
|
}
|
|
991
1003
|
}
|
|
992
1004
|
|
|
993
|
-
position:
|
|
1005
|
+
position: fixed;
|
|
994
1006
|
top: 0;
|
|
995
1007
|
left: 0px;
|
|
996
1008
|
bottom: 0;
|
package/components/nav/Type.vue
CHANGED
|
@@ -58,18 +58,7 @@ export default {
|
|
|
58
58
|
|
|
59
59
|
isActive() {
|
|
60
60
|
const typeFullPath = this.$router.resolve(this.type.route)?.fullPath.toLowerCase();
|
|
61
|
-
const pageFullPath = this.$route.fullPath?.toLowerCase()
|
|
62
|
-
const routeMetaNav = this.$route.meta?.nav;
|
|
63
|
-
|
|
64
|
-
// If the route explicitly declares the nav path that should be highlighted, then use that
|
|
65
|
-
if (routeMetaNav) {
|
|
66
|
-
const cluster = this.$route.params?.cluster;
|
|
67
|
-
const navPath = routeMetaNav.replace(':cluster', cluster);
|
|
68
|
-
|
|
69
|
-
if (navPath === typeFullPath) {
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
61
|
+
const pageFullPath = this.$route.fullPath?.toLowerCase();
|
|
73
62
|
|
|
74
63
|
if ( !this.type.exact) {
|
|
75
64
|
const typeSplit = typeFullPath.split('/');
|
|
@@ -133,7 +122,6 @@ export default {
|
|
|
133
122
|
:aria-label="type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label)"
|
|
134
123
|
:href="href"
|
|
135
124
|
class="type-link"
|
|
136
|
-
:aria-current="isActive ? 'page' : undefined"
|
|
137
125
|
@click="selectType(); navigate($event);"
|
|
138
126
|
@mouseenter="setNear(true)"
|
|
139
127
|
@mouseleave="setNear(false)"
|
|
@@ -148,7 +136,7 @@ export default {
|
|
|
148
136
|
class="label"
|
|
149
137
|
:class="{'no-icon': !type.icon}"
|
|
150
138
|
/>
|
|
151
|
-
|
|
139
|
+
<span
|
|
152
140
|
v-if="showFavorite || namespaceIcon || showCount"
|
|
153
141
|
class="count"
|
|
154
142
|
>
|
|
@@ -166,7 +154,7 @@ export default {
|
|
|
166
154
|
v-if="showCount"
|
|
167
155
|
data-testid="type-count"
|
|
168
156
|
>{{ count }}</span>
|
|
169
|
-
</span>
|
|
157
|
+
</span>
|
|
170
158
|
</a>
|
|
171
159
|
</li>
|
|
172
160
|
</router-link>
|
|
@@ -211,7 +199,6 @@ export default {
|
|
|
211
199
|
.label {
|
|
212
200
|
align-items: center;
|
|
213
201
|
grid-area: label;
|
|
214
|
-
display: flex;
|
|
215
202
|
overflow: hidden;
|
|
216
203
|
text-overflow: ellipsis;
|
|
217
204
|
|
|
@@ -219,13 +206,13 @@ export default {
|
|
|
219
206
|
padding-left: 3px;
|
|
220
207
|
}
|
|
221
208
|
|
|
222
|
-
|
|
209
|
+
:deep() .highlight {
|
|
223
210
|
background: var(--diff-ins-bg);
|
|
224
211
|
color: var(--body-text);
|
|
225
212
|
padding: 2px;
|
|
226
213
|
}
|
|
227
214
|
|
|
228
|
-
|
|
215
|
+
:deep() .icon {
|
|
229
216
|
position: relative;
|
|
230
217
|
color: var(--muted);
|
|
231
218
|
}
|
|
@@ -238,24 +225,20 @@ export default {
|
|
|
238
225
|
grid-column-gap: 5px;
|
|
239
226
|
font-size: 14px;
|
|
240
227
|
line-height: 24px;
|
|
241
|
-
|
|
242
|
-
padding: 0px 16px 0px 40px;
|
|
243
|
-
height: 50px;
|
|
228
|
+
padding: 7.5px 7px 7.5px 10px;
|
|
244
229
|
margin: 0 0 0 -3px;
|
|
245
230
|
overflow: hidden;
|
|
246
231
|
text-overflow: ellipsis;
|
|
247
232
|
white-space: nowrap;
|
|
248
233
|
color: var(--body-text);
|
|
234
|
+
height: 33px;
|
|
249
235
|
|
|
250
236
|
&:hover {
|
|
251
|
-
background: var(--nav-
|
|
252
|
-
color: var(--nav-hover-color);
|
|
253
|
-
/* background: var(--nav-hover); */
|
|
237
|
+
background: var(--nav-hover);
|
|
254
238
|
text-decoration: none;
|
|
255
239
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
color: var(--nav-hover-color);
|
|
240
|
+
:deep() .icon {
|
|
241
|
+
color: var(--body-text);
|
|
259
242
|
}
|
|
260
243
|
}
|
|
261
244
|
}
|
|
@@ -264,26 +247,46 @@ export default {
|
|
|
264
247
|
grid-area: favorite;
|
|
265
248
|
font-size: 12px;
|
|
266
249
|
position: relative;
|
|
250
|
+
vertical-align: middle;
|
|
251
|
+
margin-right: 4px;
|
|
267
252
|
}
|
|
268
253
|
|
|
269
254
|
.count {
|
|
270
|
-
grid-area: count;
|
|
271
255
|
font-size: 12px;
|
|
272
|
-
text-align: right;
|
|
273
256
|
justify-items: center;
|
|
274
257
|
padding-right: 4px;
|
|
258
|
+
display: flex;
|
|
259
|
+
align-items: center;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&.nav-type.nav-link {
|
|
263
|
+
a .label {
|
|
264
|
+
display: flex;
|
|
265
|
+
}
|
|
275
266
|
}
|
|
276
267
|
|
|
277
268
|
&.nav-type:not(.depth-0) {
|
|
278
269
|
A {
|
|
279
|
-
|
|
280
|
-
padding: 5.5px 7px 5.5px 10px;
|
|
270
|
+
padding-left: 16px;
|
|
281
271
|
}
|
|
282
272
|
|
|
283
|
-
|
|
273
|
+
:deep() .label I {
|
|
284
274
|
padding-right: 2px;
|
|
285
275
|
}
|
|
286
276
|
}
|
|
277
|
+
|
|
278
|
+
&.nav-type:is(.depth-1) {
|
|
279
|
+
A {
|
|
280
|
+
font-size: 13px;
|
|
281
|
+
padding-left: 23px;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&.nav-type:not(.depth-0):not(.depth-1) {
|
|
286
|
+
A {
|
|
287
|
+
padding-left: 14px;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
287
290
|
}
|
|
288
291
|
|
|
289
292
|
</style>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import TopLevelMenu from '@shell/components/nav/TopLevelMenu.vue';
|
|
2
|
+
import { SETTING } from '@shell/config/settings';
|
|
2
3
|
import { mount, Wrapper } from '@vue/test-utils';
|
|
3
4
|
import { CAPI, COUNT, MANAGEMENT } from '@shell/config/types';
|
|
4
5
|
import { PINNED_CLUSTERS } from '@shell/store/prefs';
|
|
@@ -428,6 +429,45 @@ describe('topLevelMenu', () => {
|
|
|
428
429
|
expect(description4.text()).toStrictEqual('some-description4');
|
|
429
430
|
});
|
|
430
431
|
|
|
432
|
+
it('should not "crash" the component if the structure of banner settings is in an old format', async() => {
|
|
433
|
+
const wrapper: Wrapper<InstanceType<typeof TopLevelMenu>> = mount(TopLevelMenu, {
|
|
434
|
+
global: {
|
|
435
|
+
mocks: {
|
|
436
|
+
$route: {},
|
|
437
|
+
$store: {
|
|
438
|
+
...generateStore(
|
|
439
|
+
[{ name: 'whatever' }],
|
|
440
|
+
[
|
|
441
|
+
// object based on https://github.com/rancher/dashboard/issues/10140#issuecomment-1883252402
|
|
442
|
+
{
|
|
443
|
+
id: SETTING.BANNERS,
|
|
444
|
+
value: JSON.stringify({
|
|
445
|
+
banner: {
|
|
446
|
+
color: '#78c9cf',
|
|
447
|
+
background: '#27292e',
|
|
448
|
+
text: 'Hello World!'
|
|
449
|
+
},
|
|
450
|
+
showHeader: 'true',
|
|
451
|
+
showFooter: 'true'
|
|
452
|
+
})
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
),
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
|
|
459
|
+
stubs: ['BrandImage', 'router-link'],
|
|
460
|
+
},
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
await waitForIt();
|
|
464
|
+
|
|
465
|
+
expect(wrapper.vm.sideMenuStyle).toStrictEqual({
|
|
466
|
+
marginBottom: '2em',
|
|
467
|
+
marginTop: '2em'
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
|
|
431
471
|
describe('searching a term', () => {
|
|
432
472
|
describe('should displays a no results message if have clusters but', () => {
|
|
433
473
|
it('given no matching clusters', async() => {
|
|
@@ -7,8 +7,6 @@ import {
|
|
|
7
7
|
} from '@shell/store/prefs';
|
|
8
8
|
import ActionMenu from '@shell/components/ActionMenu';
|
|
9
9
|
import GrowlManager from '@shell/components/GrowlManager';
|
|
10
|
-
import ModalManager from '@shell/components/ModalManager';
|
|
11
|
-
import SlideInPanelManager from '@shell/components/SlideInPanelManager';
|
|
12
10
|
import WindowManager from '@shell/components/nav/WindowManager';
|
|
13
11
|
import PromptRemove from '@shell/components/PromptRemove';
|
|
14
12
|
import PromptRestore from '@shell/components/PromptRestore';
|
|
@@ -41,8 +39,6 @@ export default {
|
|
|
41
39
|
Header,
|
|
42
40
|
ActionMenu,
|
|
43
41
|
GrowlManager,
|
|
44
|
-
ModalManager,
|
|
45
|
-
SlideInPanelManager,
|
|
46
42
|
WindowManager,
|
|
47
43
|
FixedBanner,
|
|
48
44
|
AwsComplianceBanner,
|
|
@@ -202,7 +198,6 @@ export default {
|
|
|
202
198
|
<main
|
|
203
199
|
v-if="clusterAndRouteReady"
|
|
204
200
|
class="main-layout"
|
|
205
|
-
:aria-label="t('layouts.default')"
|
|
206
201
|
>
|
|
207
202
|
<router-view
|
|
208
203
|
:key="$route.path"
|
|
@@ -213,7 +208,6 @@ export default {
|
|
|
213
208
|
<PromptRestore />
|
|
214
209
|
<AssignTo />
|
|
215
210
|
<PromptModal />
|
|
216
|
-
<ModalManager />
|
|
217
211
|
<button
|
|
218
212
|
v-if="noLocaleShortcut"
|
|
219
213
|
v-shortkey.once="['shift','l']"
|
|
@@ -241,7 +235,6 @@ export default {
|
|
|
241
235
|
<main
|
|
242
236
|
v-else-if="unmatchedRoute"
|
|
243
237
|
class="main-layout"
|
|
244
|
-
:aria-label="t('layouts.default')"
|
|
245
238
|
>
|
|
246
239
|
<router-view
|
|
247
240
|
:key="$route.path"
|
|
@@ -264,7 +257,6 @@ export default {
|
|
|
264
257
|
</div>
|
|
265
258
|
<FixedBanner :footer="true" />
|
|
266
259
|
<GrowlManager />
|
|
267
|
-
<SlideInPanelManager />
|
|
268
260
|
<Inactivity />
|
|
269
261
|
<DraggableZone ref="draggableZone" />
|
|
270
262
|
</div>
|
|
@@ -3,8 +3,6 @@ import Header from '@shell/components/nav/Header';
|
|
|
3
3
|
import Brand from '@shell/mixins/brand';
|
|
4
4
|
import FixedBanner from '@shell/components/FixedBanner';
|
|
5
5
|
import GrowlManager from '@shell/components/GrowlManager';
|
|
6
|
-
import ModalManager from '@shell/components/ModalManager';
|
|
7
|
-
import SlideInPanelManager from '@shell/components/SlideInPanelManager';
|
|
8
6
|
import { mapPref, THEME_SHORTCUT } from '@shell/store/prefs';
|
|
9
7
|
import AwsComplianceBanner from '@shell/components/AwsComplianceBanner';
|
|
10
8
|
import AzureWarning from '@shell/components/auth/AzureWarning';
|
|
@@ -19,8 +17,6 @@ export default {
|
|
|
19
17
|
Header,
|
|
20
18
|
FixedBanner,
|
|
21
19
|
GrowlManager,
|
|
22
|
-
ModalManager,
|
|
23
|
-
SlideInPanelManager,
|
|
24
20
|
AzureWarning,
|
|
25
21
|
AwsComplianceBanner,
|
|
26
22
|
Inactivity,
|
|
@@ -62,7 +58,6 @@ export default {
|
|
|
62
58
|
<AwsComplianceBanner />
|
|
63
59
|
<AzureWarning />
|
|
64
60
|
<PromptModal />
|
|
65
|
-
<ModalManager />
|
|
66
61
|
<div
|
|
67
62
|
class="dashboard-content"
|
|
68
63
|
:class="{'dashboard-padding-left': showTopLevelMenu}"
|
|
@@ -72,10 +67,7 @@ export default {
|
|
|
72
67
|
:simple="true"
|
|
73
68
|
/>
|
|
74
69
|
|
|
75
|
-
<main
|
|
76
|
-
class="main-layout"
|
|
77
|
-
:aria-label="t('layouts.home')"
|
|
78
|
-
>
|
|
70
|
+
<main class="main-layout">
|
|
79
71
|
<router-view
|
|
80
72
|
:key="$route.path"
|
|
81
73
|
class="outlet"
|
|
@@ -84,7 +76,6 @@ export default {
|
|
|
84
76
|
</div>
|
|
85
77
|
<FixedBanner :footer="true" />
|
|
86
78
|
<GrowlManager />
|
|
87
|
-
<SlideInPanelManager />
|
|
88
79
|
<button
|
|
89
80
|
v-if="themeShortcut"
|
|
90
81
|
v-shortkey.once="['shift','t']"
|
|
@@ -8,8 +8,6 @@ import IndentedPanel from '@shell/components/IndentedPanel';
|
|
|
8
8
|
import Brand from '@shell/mixins/brand';
|
|
9
9
|
import FixedBanner from '@shell/components/FixedBanner';
|
|
10
10
|
import GrowlManager from '@shell/components/GrowlManager';
|
|
11
|
-
import ModalManager from '@shell/components/ModalManager';
|
|
12
|
-
import SlideInPanelManager from '@shell/components/SlideInPanelManager';
|
|
13
11
|
import AwsComplianceBanner from '@shell/components/AwsComplianceBanner';
|
|
14
12
|
import AzureWarning from '@shell/components/auth/AzureWarning';
|
|
15
13
|
import BrowserTabVisibility from '@shell/mixins/browser-tab-visibility';
|
|
@@ -28,8 +26,6 @@ export default {
|
|
|
28
26
|
PromptModal,
|
|
29
27
|
FixedBanner,
|
|
30
28
|
GrowlManager,
|
|
31
|
-
ModalManager,
|
|
32
|
-
SlideInPanelManager,
|
|
33
29
|
AwsComplianceBanner,
|
|
34
30
|
AzureWarning,
|
|
35
31
|
Inactivity
|
|
@@ -72,10 +68,7 @@ export default {
|
|
|
72
68
|
:class="{'dashboard-padding-left': showTopLevelMenu}"
|
|
73
69
|
>
|
|
74
70
|
<Header :simple="true" />
|
|
75
|
-
<main
|
|
76
|
-
class="main-layout"
|
|
77
|
-
:aria-label="t('layouts.plain')"
|
|
78
|
-
>
|
|
71
|
+
<main class="main-layout">
|
|
79
72
|
<IndentedPanel class="pt-20">
|
|
80
73
|
<router-view
|
|
81
74
|
:key="$route.path"
|
|
@@ -85,7 +78,6 @@ export default {
|
|
|
85
78
|
<ActionMenu />
|
|
86
79
|
<PromptRemove />
|
|
87
80
|
<PromptModal />
|
|
88
|
-
<ModalManager />
|
|
89
81
|
<AssignTo />
|
|
90
82
|
<button
|
|
91
83
|
v-if="themeShortcut"
|
|
@@ -104,7 +96,6 @@ export default {
|
|
|
104
96
|
|
|
105
97
|
<FixedBanner :footer="true" />
|
|
106
98
|
<GrowlManager />
|
|
107
|
-
<SlideInPanelManager />
|
|
108
99
|
<Inactivity />
|
|
109
100
|
</div>
|
|
110
101
|
</template>
|