dashboard-shell-shell 1.0.111 → 1.0.113
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/.DS_Store +0 -0
- package/assets/icons/demo.css +539 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/iconfont.css +200 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.json +296 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/images/API.svg +3 -0
- package/assets/images/login/password.svg +20 -0
- package/assets/images/login/user.svg +6 -0
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +19 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/promp-yellow.svg +5 -0
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +63 -0
- package/assets/styles/app.scss +2 -0
- package/assets/styles/base/_basic.scss +8 -2
- package/assets/styles/base/_helpers.scss +4 -0
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +10 -2
- package/assets/styles/global/_button.scss +37 -25
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +45 -13
- package/assets/styles/global/_labeled-input.scss +50 -25
- package/assets/styles/global/_layout.scss +9 -3
- package/assets/styles/global/_select.scss +20 -13
- package/assets/styles/global/_table.scss +1 -1
- package/assets/styles/global/_tooltip.scss +47 -6
- package/assets/styles/themes/_dark.scss +1 -0
- package/assets/styles/themes/_light.scss +59 -46
- package/assets/styles/themes/_suse.scss +1 -0
- package/assets/styles/vendor/vue-select.scss +18 -7
- package/assets/translations/en-us.yaml +93 -12
- package/assets/translations/zh-hans.yaml +278 -141
- package/components/ActionDropdown.vue +1 -1
- package/components/ActionDropdownShell.vue +71 -0
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +1 -0
- package/components/AppModal.vue +78 -6
- package/components/AssignTo.vue +25 -11
- package/components/AsyncButton.vue +24 -7
- package/components/BannerGraphic.vue +1 -0
- package/components/ButtonDropdown.vue +26 -4
- package/components/ButtonGroup.vue +4 -0
- package/components/ButtonMultiAction.vue +1 -0
- package/components/CommunityLinks.vue +3 -3
- package/components/ConsumptionGauge.vue +24 -5
- package/components/CopyToClipboardText.vue +2 -1
- package/components/CruResource.vue +12 -7
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +21 -15
- package/components/DetailText.vue +5 -0
- package/components/DisableAuthProviderModal.vue +1 -0
- package/components/DotState.vue +84 -0
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +56 -14
- package/components/FixedBanner.vue +19 -12
- package/components/GlobalRoleBindings.vue +5 -1
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +4 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +16 -1
- package/components/LandingPagePreference.vue +5 -3
- package/components/LocaleSelector.vue +39 -93
- package/components/ModalManager.vue +55 -0
- package/components/ModalWithCard.vue +2 -0
- package/components/MoveModal.vue +1 -0
- package/components/PromptChangePassword.vue +1 -1
- package/components/PromptModal.vue +15 -2
- package/components/PromptRemove.vue +28 -8
- package/components/PromptRestore.vue +1 -0
- package/components/ResourceCancelModal.vue +1 -0
- package/components/ResourceDetail/Masthead.vue +188 -43
- package/components/ResourceDetail/__tests__/Masthead.test.ts +5 -1
- package/components/ResourceDetail/index.vue +49 -14
- package/components/ResourceList/Masthead.vue +80 -18
- package/components/ResourceTable.vue +60 -19
- package/components/SideNav.vue +32 -12
- package/components/SlideInPanelManager.vue +126 -0
- package/components/SortableTable/THead.vue +34 -5
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +649 -142
- package/components/SortableTable/paging.js +36 -28
- package/components/SortableTable/selection.js +0 -11
- package/components/StatusBadge.vue +77 -0
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +44 -26
- package/components/Wizard.vue +2 -2
- package/components/__tests__/AsyncButton.test.ts +2 -2
- package/components/__tests__/FixedBanner.test.ts +3 -3
- package/components/__tests__/ModalManager.spec.ts +176 -0
- package/components/__tests__/SlideInPanelManager.spec.ts +166 -0
- package/components/auth/Principal.vue +10 -3
- package/components/auth/__tests__/RoleDetailEdit.test.ts +3 -2
- package/components/form/ArrayList.vue +123 -85
- package/components/form/ArrayListGrouped.vue +10 -2
- package/components/form/Command.vue +6 -15
- package/components/form/EnvVars.vue +16 -8
- package/components/form/Footer.vue +8 -5
- package/components/form/HealthCheck.vue +3 -3
- package/components/form/HookOption.vue +11 -16
- package/components/form/KeyValue.vue +16 -7
- package/components/form/LabeledSelect.vue +59 -76
- package/components/form/LifecycleHooks.vue +3 -3
- package/components/form/MatchExpressions.vue +35 -12
- package/components/form/NameNsDescription.vue +147 -115
- package/components/form/Networking.vue +20 -12
- package/components/form/NodeAffinity.vue +31 -23
- package/components/form/NodeScheduling.vue +13 -3
- package/components/form/Password.vue +11 -5
- package/components/form/PodAffinity.vue +43 -44
- package/components/form/Probe.vue +68 -66
- package/components/form/ResourceQuota/Project.vue +5 -1
- package/components/form/ResourceSelector.vue +7 -9
- package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +6 -3
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +12 -1
- package/components/form/SSHKnownHosts/index.vue +16 -2
- package/components/form/Security.vue +54 -56
- package/components/form/Select.vue +41 -7
- package/components/form/ShellInput.vue +5 -1
- package/components/form/Tolerations.vue +5 -1
- package/components/form/UnitInput.vue +2 -2
- package/components/form/ValueFromResource.vue +134 -121
- package/components/form/WorkloadPorts.vue +18 -18
- package/components/form/__tests__/ArrayList.test.ts +5 -2
- package/components/form/__tests__/MatchExpressions.test.ts +12 -12
- package/components/form/__tests__/NameNsDescription.test.ts +115 -14
- package/components/form/__tests__/Probe.test.ts +12 -8
- package/components/form/__tests__/SSHKnownHosts.test.ts +11 -0
- package/components/form/__tests__/Select.test.ts +37 -0
- package/components/form/__tests__/UnitInput.test.ts +4 -5
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/InternalExternalIP.vue +2 -0
- package/components/formatter/SecretData.vue +20 -7
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +60 -27
- package/components/nav/Header.vue +39 -13
- package/components/nav/Jump.vue +7 -0
- package/components/nav/NamespaceFilter.vue +14 -8
- package/components/nav/Pinned.vue +1 -1
- package/components/nav/TopLevelMenu.vue +5 -17
- package/components/nav/Type.vue +32 -35
- package/components/nav/__tests__/TopLevelMenu.test.ts +0 -40
- package/components/templates/blank.vue +4 -1
- package/components/templates/default.vue +8 -0
- package/components/templates/home.vue +10 -1
- package/components/templates/plain.vue +10 -1
- package/package.json +1 -1
- package/rancher-components/Banner/Banner.vue +6 -4
- package/rancher-components/Card/Card.vue +6 -4
- package/rancher-components/Form/Checkbox/Checkbox.vue +20 -1
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +46 -5
- package/rancher-components/Form/Radio/RadioButton.vue +32 -8
- package/rancher-components/Form/Radio/RadioGroup.vue +31 -24
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +17 -0
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +8 -3
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +15 -3
- package/rancher-components/RcButton/RcButton.vue +1 -0
- package/rancher-components/RcButton/types.ts +1 -0
- package/rancher-components/RcDropdown/RcDropdown.vue +54 -15
- package/rancher-components/RcDropdown/RcDropdownItem.vue +5 -4
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +11 -7
- package/rancher-components/RcDropdown/RcDropdownTrigger.vue +12 -2
- package/rancher-components/RcDropdown/useDropdownCollection.ts +8 -0
- package/rancher-components/RcDropdown/useDropdownContext.ts +9 -3
- package/rancher-components/StringList/StringList.vue +1 -1
- package/store/type-map.js +29 -2
- package/utils/error.js +30 -8
- package/utils/errorTranslate.json +916 -0
- package/vue.config.js +1 -1
- package/components/formatter/ExtensionCache.vue +0 -74
- package/components/formatter/Port.vue +0 -24
- package/components/formatter/SecretType.vue +0 -41
|
@@ -921,6 +921,7 @@ export default {
|
|
|
921
921
|
display: flex;
|
|
922
922
|
> i {
|
|
923
923
|
padding-right: 5px;
|
|
924
|
+
font-size: 10px;
|
|
924
925
|
}
|
|
925
926
|
}
|
|
926
927
|
|
|
@@ -932,6 +933,8 @@ export default {
|
|
|
932
933
|
|
|
933
934
|
.ns-filter-input {
|
|
934
935
|
height: 24px;
|
|
936
|
+
border: 1px solid #d7d7d7;
|
|
937
|
+
padding: 0px 5px;
|
|
935
938
|
}
|
|
936
939
|
|
|
937
940
|
.ns-filter-clear {
|
|
@@ -946,7 +949,8 @@ export default {
|
|
|
946
949
|
|
|
947
950
|
.ns-dropdown-menu {
|
|
948
951
|
background-color: var(--header-bg);
|
|
949
|
-
border: 1px solid var(--primary-border);
|
|
952
|
+
/* border: 1px solid var(--primary-border); */
|
|
953
|
+
border: 1px solid #d7d7d7;;
|
|
950
954
|
border-bottom-left-radius: var(--border-radius);
|
|
951
955
|
border-bottom-right-radius: var(--border-radius);
|
|
952
956
|
color: var(--header-btn-text);
|
|
@@ -966,10 +970,10 @@ export default {
|
|
|
966
970
|
}
|
|
967
971
|
|
|
968
972
|
.ns-divider {
|
|
969
|
-
border-top: 1px solid var(--border);
|
|
973
|
+
/* border-top: 1px solid var(--border); */
|
|
970
974
|
cursor: default;
|
|
971
|
-
margin-top: 10px;
|
|
972
|
-
padding-bottom: 10px;
|
|
975
|
+
/* margin-top: 10px; */
|
|
976
|
+
/* padding-bottom: 10px; */
|
|
973
977
|
}
|
|
974
978
|
|
|
975
979
|
.ns-option {
|
|
@@ -1009,7 +1013,7 @@ export default {
|
|
|
1009
1013
|
&.ns-selected:not(:hover) {
|
|
1010
1014
|
.ns-item {
|
|
1011
1015
|
> * {
|
|
1012
|
-
color: var(--primary);
|
|
1016
|
+
/* color: var(--primary); */
|
|
1013
1017
|
}
|
|
1014
1018
|
}
|
|
1015
1019
|
|
|
@@ -1062,7 +1066,7 @@ export default {
|
|
|
1062
1066
|
border-radius: var(--border-radius);
|
|
1063
1067
|
color: var(--header-btn-text);
|
|
1064
1068
|
cursor: pointer;
|
|
1065
|
-
height:
|
|
1069
|
+
height: 32px;
|
|
1066
1070
|
padding: 0 10px;
|
|
1067
1071
|
position: relative;
|
|
1068
1072
|
z-index: z-index('dropdownOverlay');
|
|
@@ -1070,7 +1074,8 @@ export default {
|
|
|
1070
1074
|
&.ns-open {
|
|
1071
1075
|
border-bottom-left-radius: 0;
|
|
1072
1076
|
border-bottom-right-radius: 0;
|
|
1073
|
-
border-color: var(--primary-border);
|
|
1077
|
+
/* border-color: var(--primary-border); */
|
|
1078
|
+
border-color: #d7d7d7;
|
|
1074
1079
|
}
|
|
1075
1080
|
|
|
1076
1081
|
> .ns-values {
|
|
@@ -1109,12 +1114,13 @@ export default {
|
|
|
1109
1114
|
border-radius: 5px;
|
|
1110
1115
|
color: var(--tag-text);
|
|
1111
1116
|
display: flex;
|
|
1112
|
-
line-height: 20px;
|
|
1117
|
+
/* line-height: 20px; */
|
|
1113
1118
|
padding: 2px 5px;
|
|
1114
1119
|
white-space: nowrap;
|
|
1115
1120
|
|
|
1116
1121
|
> i {
|
|
1117
1122
|
margin-left: 5px;
|
|
1123
|
+
font-size: 8px;
|
|
1118
1124
|
|
|
1119
1125
|
&:hover {
|
|
1120
1126
|
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
|
-
|
|
39
|
+
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,7 +14,6 @@ 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';
|
|
18
17
|
import { TopLevelMenuHelperPagination, TopLevelMenuHelperLegacy } from '@shell/components/nav/TopLevelMenu.helper';
|
|
19
18
|
import { debounce } from 'lodash';
|
|
20
19
|
import { sameContents } from '@shell/utils/array';
|
|
@@ -82,15 +81,6 @@ export default {
|
|
|
82
81
|
return this.$store.getters['prefs/get'](PINNED_CLUSTERS);
|
|
83
82
|
},
|
|
84
83
|
|
|
85
|
-
sideMenuStyle() {
|
|
86
|
-
const globalBannerSettings = getGlobalBannerFontSizes(this.$store);
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
marginBottom: globalBannerSettings?.footerFont,
|
|
90
|
-
marginTop: globalBannerSettings?.headerFont
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
|
|
94
84
|
showClusterSearch() {
|
|
95
85
|
return this.allClustersCount > this.maxClustersToShow;
|
|
96
86
|
},
|
|
@@ -440,8 +430,7 @@ export default {
|
|
|
440
430
|
|
|
441
431
|
return {
|
|
442
432
|
content,
|
|
443
|
-
placement:
|
|
444
|
-
popperOptions: { modifiers: { preventOverflow: { enabled: false }, hide: { enabled: false } } },
|
|
433
|
+
placement: 'right',
|
|
445
434
|
popperClass
|
|
446
435
|
};
|
|
447
436
|
},
|
|
@@ -483,7 +472,6 @@ export default {
|
|
|
483
472
|
data-testid="side-menu"
|
|
484
473
|
class="side-menu"
|
|
485
474
|
:class="{'menu-open': shown, 'menu-close':!shown}"
|
|
486
|
-
:style="sideMenuStyle"
|
|
487
475
|
tabindex="-1"
|
|
488
476
|
role="navigation"
|
|
489
477
|
:aria-label="t('nav.ariaLabel.topLevelMenu')"
|
|
@@ -710,7 +698,7 @@ export default {
|
|
|
710
698
|
v-if="clustersFiltered.length > 0"
|
|
711
699
|
class="category-title"
|
|
712
700
|
>
|
|
713
|
-
<hr>
|
|
701
|
+
<hr role="none">
|
|
714
702
|
</div>
|
|
715
703
|
</div>
|
|
716
704
|
|
|
@@ -824,7 +812,7 @@ export default {
|
|
|
824
812
|
<div
|
|
825
813
|
class="category-title"
|
|
826
814
|
>
|
|
827
|
-
<hr>
|
|
815
|
+
<hr role="none">
|
|
828
816
|
<span>
|
|
829
817
|
{{ t('nav.categories.multiCluster') }}
|
|
830
818
|
</span>
|
|
@@ -857,7 +845,7 @@ export default {
|
|
|
857
845
|
<div
|
|
858
846
|
class="category-title"
|
|
859
847
|
>
|
|
860
|
-
<hr>
|
|
848
|
+
<hr role="none">
|
|
861
849
|
<span>
|
|
862
850
|
{{ t('nav.categories.configuration') }}
|
|
863
851
|
</span>
|
|
@@ -1002,7 +990,7 @@ export default {
|
|
|
1002
990
|
}
|
|
1003
991
|
}
|
|
1004
992
|
|
|
1005
|
-
position:
|
|
993
|
+
position: absolute;
|
|
1006
994
|
top: 0;
|
|
1007
995
|
left: 0px;
|
|
1008
996
|
bottom: 0;
|
package/components/nav/Type.vue
CHANGED
|
@@ -58,7 +58,18 @@ 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();
|
|
61
|
+
const pageFullPath = this.$route.fullPath?.toLowerCase().split('#')[0]; // Ignore the shebang when comparing routes
|
|
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
|
+
}
|
|
62
73
|
|
|
63
74
|
if ( !this.type.exact) {
|
|
64
75
|
const typeSplit = typeFullPath.split('/');
|
|
@@ -122,6 +133,7 @@ export default {
|
|
|
122
133
|
:aria-label="type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label)"
|
|
123
134
|
:href="href"
|
|
124
135
|
class="type-link"
|
|
136
|
+
:aria-current="isActive ? 'page' : undefined"
|
|
125
137
|
@click="selectType(); navigate($event);"
|
|
126
138
|
@mouseenter="setNear(true)"
|
|
127
139
|
@mouseleave="setNear(false)"
|
|
@@ -136,7 +148,7 @@ export default {
|
|
|
136
148
|
class="label"
|
|
137
149
|
:class="{'no-icon': !type.icon}"
|
|
138
150
|
/>
|
|
139
|
-
<span
|
|
151
|
+
<!-- <span
|
|
140
152
|
v-if="showFavorite || namespaceIcon || showCount"
|
|
141
153
|
class="count"
|
|
142
154
|
>
|
|
@@ -154,7 +166,7 @@ export default {
|
|
|
154
166
|
v-if="showCount"
|
|
155
167
|
data-testid="type-count"
|
|
156
168
|
>{{ count }}</span>
|
|
157
|
-
</span>
|
|
169
|
+
</span> -->
|
|
158
170
|
</a>
|
|
159
171
|
</li>
|
|
160
172
|
</router-link>
|
|
@@ -199,6 +211,7 @@ export default {
|
|
|
199
211
|
.label {
|
|
200
212
|
align-items: center;
|
|
201
213
|
grid-area: label;
|
|
214
|
+
display: flex;
|
|
202
215
|
overflow: hidden;
|
|
203
216
|
text-overflow: ellipsis;
|
|
204
217
|
|
|
@@ -206,13 +219,13 @@ export default {
|
|
|
206
219
|
padding-left: 3px;
|
|
207
220
|
}
|
|
208
221
|
|
|
209
|
-
|
|
222
|
+
::v-deep .highlight {
|
|
210
223
|
background: var(--diff-ins-bg);
|
|
211
224
|
color: var(--body-text);
|
|
212
225
|
padding: 2px;
|
|
213
226
|
}
|
|
214
227
|
|
|
215
|
-
|
|
228
|
+
::v-deep .icon {
|
|
216
229
|
position: relative;
|
|
217
230
|
color: var(--muted);
|
|
218
231
|
}
|
|
@@ -225,20 +238,24 @@ export default {
|
|
|
225
238
|
grid-column-gap: 5px;
|
|
226
239
|
font-size: 14px;
|
|
227
240
|
line-height: 24px;
|
|
228
|
-
padding: 7.5px 7px 7.5px 10px;
|
|
241
|
+
/* padding: 7.5px 7px 7.5px 10px; */
|
|
242
|
+
padding: 0px 16px 0px 40px;
|
|
243
|
+
height: 50px;
|
|
229
244
|
margin: 0 0 0 -3px;
|
|
230
245
|
overflow: hidden;
|
|
231
246
|
text-overflow: ellipsis;
|
|
232
247
|
white-space: nowrap;
|
|
233
248
|
color: var(--body-text);
|
|
234
|
-
height: 33px;
|
|
235
249
|
|
|
236
250
|
&:hover {
|
|
237
|
-
background: var(--nav-
|
|
251
|
+
background: var(--nav-active);
|
|
252
|
+
color: var(--nav-hover-color);
|
|
253
|
+
/* background: var(--nav-hover); */
|
|
238
254
|
text-decoration: none;
|
|
239
255
|
|
|
240
|
-
|
|
241
|
-
color: var(--body-text);
|
|
256
|
+
::v-deep .icon {
|
|
257
|
+
/* color: var(--body-text); */
|
|
258
|
+
color: var(--nav-hover-color);
|
|
242
259
|
}
|
|
243
260
|
}
|
|
244
261
|
}
|
|
@@ -247,44 +264,24 @@ export default {
|
|
|
247
264
|
grid-area: favorite;
|
|
248
265
|
font-size: 12px;
|
|
249
266
|
position: relative;
|
|
250
|
-
vertical-align: middle;
|
|
251
|
-
margin-right: 4px;
|
|
252
267
|
}
|
|
253
268
|
|
|
254
269
|
.count {
|
|
270
|
+
grid-area: count;
|
|
255
271
|
font-size: 12px;
|
|
272
|
+
text-align: right;
|
|
256
273
|
justify-items: center;
|
|
257
274
|
padding-right: 4px;
|
|
258
|
-
display: flex;
|
|
259
|
-
align-items: center;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
&.nav-type.nav-link {
|
|
263
|
-
a .label {
|
|
264
|
-
display: flex;
|
|
265
|
-
}
|
|
266
275
|
}
|
|
267
276
|
|
|
268
277
|
&.nav-type:not(.depth-0) {
|
|
269
|
-
A {
|
|
270
|
-
padding-left: 16px;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
:deep() .label I {
|
|
274
|
-
padding-right: 2px;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
&.nav-type:is(.depth-1) {
|
|
279
278
|
A {
|
|
280
279
|
font-size: 13px;
|
|
281
|
-
padding
|
|
280
|
+
padding: 5.5px 7px 5.5px 10px;
|
|
282
281
|
}
|
|
283
|
-
}
|
|
284
282
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
padding-left: 14px;
|
|
283
|
+
::v-deep .label I {
|
|
284
|
+
padding-right: 2px;
|
|
288
285
|
}
|
|
289
286
|
}
|
|
290
287
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import TopLevelMenu from '@shell/components/nav/TopLevelMenu.vue';
|
|
2
|
-
import { SETTING } from '@shell/config/settings';
|
|
3
2
|
import { mount, Wrapper } from '@vue/test-utils';
|
|
4
3
|
import { CAPI, COUNT, MANAGEMENT } from '@shell/config/types';
|
|
5
4
|
import { PINNED_CLUSTERS } from '@shell/store/prefs';
|
|
@@ -429,45 +428,6 @@ describe('topLevelMenu', () => {
|
|
|
429
428
|
expect(description4.text()).toStrictEqual('some-description4');
|
|
430
429
|
});
|
|
431
430
|
|
|
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
|
-
|
|
471
431
|
describe('searching a term', () => {
|
|
472
432
|
describe('should displays a no results message if have clusters but', () => {
|
|
473
433
|
it('given no matching clusters', async() => {
|
|
@@ -7,6 +7,8 @@ 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';
|
|
10
12
|
import WindowManager from '@shell/components/nav/WindowManager';
|
|
11
13
|
import PromptRemove from '@shell/components/PromptRemove';
|
|
12
14
|
import PromptRestore from '@shell/components/PromptRestore';
|
|
@@ -39,6 +41,8 @@ export default {
|
|
|
39
41
|
Header,
|
|
40
42
|
ActionMenu,
|
|
41
43
|
GrowlManager,
|
|
44
|
+
ModalManager,
|
|
45
|
+
SlideInPanelManager,
|
|
42
46
|
WindowManager,
|
|
43
47
|
FixedBanner,
|
|
44
48
|
AwsComplianceBanner,
|
|
@@ -198,6 +202,7 @@ export default {
|
|
|
198
202
|
<main
|
|
199
203
|
v-if="clusterAndRouteReady"
|
|
200
204
|
class="main-layout"
|
|
205
|
+
:aria-label="t('layouts.default')"
|
|
201
206
|
>
|
|
202
207
|
<router-view
|
|
203
208
|
:key="$route.path"
|
|
@@ -208,6 +213,7 @@ export default {
|
|
|
208
213
|
<PromptRestore />
|
|
209
214
|
<AssignTo />
|
|
210
215
|
<PromptModal />
|
|
216
|
+
<ModalManager />
|
|
211
217
|
<button
|
|
212
218
|
v-if="noLocaleShortcut"
|
|
213
219
|
v-shortkey.once="['shift','l']"
|
|
@@ -235,6 +241,7 @@ export default {
|
|
|
235
241
|
<main
|
|
236
242
|
v-else-if="unmatchedRoute"
|
|
237
243
|
class="main-layout"
|
|
244
|
+
:aria-label="t('layouts.default')"
|
|
238
245
|
>
|
|
239
246
|
<router-view
|
|
240
247
|
:key="$route.path"
|
|
@@ -257,6 +264,7 @@ export default {
|
|
|
257
264
|
</div>
|
|
258
265
|
<FixedBanner :footer="true" />
|
|
259
266
|
<GrowlManager />
|
|
267
|
+
<SlideInPanelManager />
|
|
260
268
|
<Inactivity />
|
|
261
269
|
<DraggableZone ref="draggableZone" />
|
|
262
270
|
</div>
|
|
@@ -3,6 +3,8 @@ 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';
|
|
6
8
|
import { mapPref, THEME_SHORTCUT } from '@shell/store/prefs';
|
|
7
9
|
import AwsComplianceBanner from '@shell/components/AwsComplianceBanner';
|
|
8
10
|
import AzureWarning from '@shell/components/auth/AzureWarning';
|
|
@@ -17,6 +19,8 @@ export default {
|
|
|
17
19
|
Header,
|
|
18
20
|
FixedBanner,
|
|
19
21
|
GrowlManager,
|
|
22
|
+
ModalManager,
|
|
23
|
+
SlideInPanelManager,
|
|
20
24
|
AzureWarning,
|
|
21
25
|
AwsComplianceBanner,
|
|
22
26
|
Inactivity,
|
|
@@ -58,6 +62,7 @@ export default {
|
|
|
58
62
|
<AwsComplianceBanner />
|
|
59
63
|
<AzureWarning />
|
|
60
64
|
<PromptModal />
|
|
65
|
+
<ModalManager />
|
|
61
66
|
<div
|
|
62
67
|
class="dashboard-content"
|
|
63
68
|
:class="{'dashboard-padding-left': showTopLevelMenu}"
|
|
@@ -67,7 +72,10 @@ export default {
|
|
|
67
72
|
:simple="true"
|
|
68
73
|
/>
|
|
69
74
|
|
|
70
|
-
<main
|
|
75
|
+
<main
|
|
76
|
+
class="main-layout"
|
|
77
|
+
:aria-label="t('layouts.home')"
|
|
78
|
+
>
|
|
71
79
|
<router-view
|
|
72
80
|
:key="$route.path"
|
|
73
81
|
class="outlet"
|
|
@@ -76,6 +84,7 @@ export default {
|
|
|
76
84
|
</div>
|
|
77
85
|
<FixedBanner :footer="true" />
|
|
78
86
|
<GrowlManager />
|
|
87
|
+
<SlideInPanelManager />
|
|
79
88
|
<button
|
|
80
89
|
v-if="themeShortcut"
|
|
81
90
|
v-shortkey.once="['shift','t']"
|
|
@@ -8,6 +8,8 @@ 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';
|
|
11
13
|
import AwsComplianceBanner from '@shell/components/AwsComplianceBanner';
|
|
12
14
|
import AzureWarning from '@shell/components/auth/AzureWarning';
|
|
13
15
|
import BrowserTabVisibility from '@shell/mixins/browser-tab-visibility';
|
|
@@ -26,6 +28,8 @@ export default {
|
|
|
26
28
|
PromptModal,
|
|
27
29
|
FixedBanner,
|
|
28
30
|
GrowlManager,
|
|
31
|
+
ModalManager,
|
|
32
|
+
SlideInPanelManager,
|
|
29
33
|
AwsComplianceBanner,
|
|
30
34
|
AzureWarning,
|
|
31
35
|
Inactivity
|
|
@@ -68,7 +72,10 @@ export default {
|
|
|
68
72
|
:class="{'dashboard-padding-left': showTopLevelMenu}"
|
|
69
73
|
>
|
|
70
74
|
<Header :simple="true" />
|
|
71
|
-
<main
|
|
75
|
+
<main
|
|
76
|
+
class="main-layout"
|
|
77
|
+
:aria-label="t('layouts.plain')"
|
|
78
|
+
>
|
|
72
79
|
<IndentedPanel class="pt-20">
|
|
73
80
|
<router-view
|
|
74
81
|
:key="$route.path"
|
|
@@ -78,6 +85,7 @@ export default {
|
|
|
78
85
|
<ActionMenu />
|
|
79
86
|
<PromptRemove />
|
|
80
87
|
<PromptModal />
|
|
88
|
+
<ModalManager />
|
|
81
89
|
<AssignTo />
|
|
82
90
|
<button
|
|
83
91
|
v-if="themeShortcut"
|
|
@@ -96,6 +104,7 @@ export default {
|
|
|
96
104
|
|
|
97
105
|
<FixedBanner :footer="true" />
|
|
98
106
|
<GrowlManager />
|
|
107
|
+
<SlideInPanelManager />
|
|
99
108
|
<Inactivity />
|
|
100
109
|
</div>
|
|
101
110
|
</template>
|
package/package.json
CHANGED
|
@@ -125,7 +125,8 @@ $icon-size: 24px;
|
|
|
125
125
|
|
|
126
126
|
.banner {
|
|
127
127
|
display: flex;
|
|
128
|
-
margin: 15px 0;
|
|
128
|
+
/* margin: 15px 0; */
|
|
129
|
+
margin: 0px 0px 20px 0px;
|
|
129
130
|
position: relative;
|
|
130
131
|
width: 100%;
|
|
131
132
|
color: var(--body-text);
|
|
@@ -165,9 +166,9 @@ $icon-size: 24px;
|
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
&__content {
|
|
168
|
-
padding: 10px;
|
|
169
|
+
padding: 9px 10px;
|
|
169
170
|
transition: all 0.2s ease;
|
|
170
|
-
line-height:
|
|
171
|
+
line-height: 12px;
|
|
171
172
|
width: 100%;
|
|
172
173
|
border-left: solid $left-border-size transparent;
|
|
173
174
|
display: flex;
|
|
@@ -189,7 +190,8 @@ $icon-size: 24px;
|
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
.info & {
|
|
192
|
-
background: var(--info-banner-bg);
|
|
193
|
+
/* background: var(--info-banner-bg); */
|
|
194
|
+
background: #f2f2f2;
|
|
193
195
|
border-color: var(--info);
|
|
194
196
|
}
|
|
195
197
|
|
|
@@ -89,7 +89,7 @@ export default defineComponent({
|
|
|
89
89
|
{{ title }}
|
|
90
90
|
</slot>
|
|
91
91
|
</div>
|
|
92
|
-
<hr>
|
|
92
|
+
<!-- <hr role="none"> -->
|
|
93
93
|
<div
|
|
94
94
|
class="card-body"
|
|
95
95
|
data-testid="card-body-slot"
|
|
@@ -124,9 +124,9 @@ export default defineComponent({
|
|
|
124
124
|
border-radius: var(--border-radius);
|
|
125
125
|
display: flex;
|
|
126
126
|
flex-basis: 40%;
|
|
127
|
-
margin: 10px;
|
|
127
|
+
/* margin: 10px; */
|
|
128
128
|
min-height: 100px;
|
|
129
|
-
padding:
|
|
129
|
+
padding: 24px;
|
|
130
130
|
box-shadow: 0 0 20px var(--shadow);
|
|
131
131
|
&:not(.top) {
|
|
132
132
|
align-items: top;
|
|
@@ -143,14 +143,16 @@ export default defineComponent({
|
|
|
143
143
|
justify-content: center;
|
|
144
144
|
}
|
|
145
145
|
& .card-actions {
|
|
146
|
-
align-self: end;
|
|
146
|
+
/* align-self: end; */
|
|
147
147
|
display: flex;
|
|
148
|
+
justify-content: flex-end;
|
|
148
149
|
padding-top: 20px;
|
|
149
150
|
}
|
|
150
151
|
& .card-title {
|
|
151
152
|
align-items: center;
|
|
152
153
|
display: flex;
|
|
153
154
|
width: 100%;
|
|
155
|
+
margin-bottom: 15px;
|
|
154
156
|
h5 {
|
|
155
157
|
margin: 0;
|
|
156
158
|
}
|
|
@@ -124,10 +124,23 @@ export default defineComponent({
|
|
|
124
124
|
type: String,
|
|
125
125
|
default: undefined
|
|
126
126
|
},
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Inherited global identifier prefix for tests
|
|
130
|
+
* Define a term based on the parent component to avoid conflicts on multiple components
|
|
131
|
+
*/
|
|
132
|
+
componentTestid: {
|
|
133
|
+
type: String,
|
|
134
|
+
default: 'checkbox'
|
|
135
|
+
},
|
|
127
136
|
},
|
|
128
137
|
|
|
129
138
|
emits: ['update:value'],
|
|
130
139
|
|
|
140
|
+
data() {
|
|
141
|
+
return { describedById: `described-by-${ generateRandomAlphaString(12) }` };
|
|
142
|
+
},
|
|
143
|
+
|
|
131
144
|
computed: {
|
|
132
145
|
/**
|
|
133
146
|
* Determines if the checkbox is disabled.
|
|
@@ -270,6 +283,7 @@ export default defineComponent({
|
|
|
270
283
|
:aria-label="replacementLabel"
|
|
271
284
|
:aria-checked="!!value"
|
|
272
285
|
:aria-labelledby="labelKey || label ? idForLabel : undefined"
|
|
286
|
+
:aria-describedby="descriptionKey || description ? describedById : undefined"
|
|
273
287
|
role="checkbox"
|
|
274
288
|
/>
|
|
275
289
|
<span
|
|
@@ -293,6 +307,7 @@ export default defineComponent({
|
|
|
293
307
|
v-clean-tooltip="{content: t(tooltipKey), triggers: ['hover', 'touch', 'focus']}"
|
|
294
308
|
v-stripped-aria-label="t(tooltipKey)"
|
|
295
309
|
class="checkbox-info icon icon-info icon-lg"
|
|
310
|
+
:data-testid="componentTestid + '-info-icon'"
|
|
296
311
|
:tabindex="isDisabled ? -1 : 0"
|
|
297
312
|
/>
|
|
298
313
|
<i
|
|
@@ -300,6 +315,7 @@ export default defineComponent({
|
|
|
300
315
|
v-clean-tooltip="{content: tooltip, triggers: ['hover', 'touch', 'focus']}"
|
|
301
316
|
v-stripped-aria-label="tooltip"
|
|
302
317
|
class="checkbox-info icon icon-info icon-lg"
|
|
318
|
+
:data-testid="componentTestid + '-info-icon'"
|
|
303
319
|
:tabindex="isDisabled ? -1 : 0"
|
|
304
320
|
/>
|
|
305
321
|
</slot>
|
|
@@ -311,10 +327,13 @@ export default defineComponent({
|
|
|
311
327
|
>
|
|
312
328
|
<t
|
|
313
329
|
v-if="descriptionKey"
|
|
330
|
+
:id="describedById"
|
|
314
331
|
:k="descriptionKey"
|
|
315
332
|
/>
|
|
316
333
|
<template v-else-if="description">
|
|
317
|
-
|
|
334
|
+
<p :id="describedById">
|
|
335
|
+
{{ description }}
|
|
336
|
+
</p>
|
|
318
337
|
</template>
|
|
319
338
|
</div>
|
|
320
339
|
<div class="checkbox-outer-container-extra">
|