dashboard-shell-shell 1.0.113 → 1.0.115
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 +8 -3
- package/components/SideNav.vue +3 -2
- package/components/SortableTable/THead.vue +4 -10
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +537 -637
- 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 +3 -16
- 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 +1 -14
- 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/public/index.html +3 -3
- 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
|
@@ -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)"
|
|
@@ -189,7 +177,6 @@ export default {
|
|
|
189
177
|
{{ type }}?
|
|
190
178
|
</li>
|
|
191
179
|
</template>
|
|
192
|
-
|
|
193
180
|
<style lang="scss" scoped>
|
|
194
181
|
.ns-and-icon {
|
|
195
182
|
margin-right: 4px;
|
|
@@ -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>
|
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
|
|
49
49
|
.initial-load-spinner {
|
|
50
50
|
animation: initial-load-animate 1s infinite linear;
|
|
51
|
-
background-color:
|
|
51
|
+
background-color: transparent;
|
|
52
52
|
box-sizing: border-box;
|
|
53
|
-
border: 5px solid #
|
|
53
|
+
border: 5px solid #1890FF;
|
|
54
54
|
border-radius: 50%;
|
|
55
|
-
border-top-color:
|
|
55
|
+
border-top-color: transparent;
|
|
56
56
|
display: inline-block;
|
|
57
57
|
height: 80px;
|
|
58
58
|
margin: 0 auto;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { RcDropdown, RcDropdownTrigger, RcDropdownItem } from '@components/RcDropdown';
|
|
3
|
-
type HiddenAction = {
|
|
4
|
-
action: string;
|
|
5
|
-
enabled: boolean;
|
|
6
|
-
icon: string;
|
|
7
|
-
label: string;
|
|
8
|
-
bulkable: boolean;
|
|
9
|
-
bulkAction: string;
|
|
10
|
-
allEnabled: boolean;
|
|
11
|
-
anyEnabled: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
defineProps<{
|
|
15
|
-
disabled: boolean,
|
|
16
|
-
hiddenActions: HiddenAction[],
|
|
17
|
-
actionTooltip: unknown,
|
|
18
|
-
}>();
|
|
19
|
-
|
|
20
|
-
const emit = defineEmits(['click', 'mouseover', 'mouseleave']);
|
|
21
|
-
|
|
22
|
-
const applyTableAction = (act: HiddenAction, args: unknown, event: Event) => {
|
|
23
|
-
emit('click', act, args, event);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const setBulkActionOfInterest = (act: HiddenAction | null, event: 'mouseover' | 'mouseleave' = 'mouseover') => {
|
|
27
|
-
emit(event, act);
|
|
28
|
-
};
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<rc-dropdown
|
|
33
|
-
:distance="14"
|
|
34
|
-
placement="bottom"
|
|
35
|
-
>
|
|
36
|
-
<rc-dropdown-trigger
|
|
37
|
-
class="bulk-actions-dropdown"
|
|
38
|
-
:disabled="disabled"
|
|
39
|
-
>
|
|
40
|
-
<template #before>
|
|
41
|
-
<i class="icon icon-gear" />
|
|
42
|
-
</template>
|
|
43
|
-
<span>{{ t('sortableTable.bulkActions.collapsed.label') }}</span>
|
|
44
|
-
<template #after>
|
|
45
|
-
<i class="ml-10 icon icon-chevron-down" />
|
|
46
|
-
</template>
|
|
47
|
-
</rc-dropdown-trigger>
|
|
48
|
-
<template #dropdownCollection>
|
|
49
|
-
<rc-dropdown-item
|
|
50
|
-
v-for="(act, i) in hiddenActions"
|
|
51
|
-
:key="i"
|
|
52
|
-
v-clean-tooltip="{
|
|
53
|
-
content: actionTooltip,
|
|
54
|
-
placement: 'right'
|
|
55
|
-
}"
|
|
56
|
-
:disabled="!act.enabled"
|
|
57
|
-
@click="applyTableAction(act, null, $event)"
|
|
58
|
-
@mouseover="setBulkActionOfInterest(act)"
|
|
59
|
-
@mouseleave="setBulkActionOfInterest(null, 'mouseleave')"
|
|
60
|
-
>
|
|
61
|
-
<template #before>
|
|
62
|
-
<i
|
|
63
|
-
v-if="act.icon"
|
|
64
|
-
:class="act.icon"
|
|
65
|
-
/>
|
|
66
|
-
</template>
|
|
67
|
-
<span v-clean-html="act.label" />
|
|
68
|
-
</rc-dropdown-item>
|
|
69
|
-
</template>
|
|
70
|
-
</rc-dropdown>
|
|
71
|
-
</template>
|
package/components/DotState.vue
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Vue, { PropType, defineComponent } from 'vue';
|
|
3
|
-
import { mapGetters } from 'vuex';
|
|
4
|
-
|
|
5
|
-
interface Dot {
|
|
6
|
-
stateBackground: string;
|
|
7
|
-
stateDisplay: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default defineComponent({
|
|
11
|
-
|
|
12
|
-
name: 'DotState',
|
|
13
|
-
|
|
14
|
-
props: {
|
|
15
|
-
value: {
|
|
16
|
-
type: Object as PropType<Dot>,
|
|
17
|
-
default: null
|
|
18
|
-
},
|
|
19
|
-
color: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: null
|
|
22
|
-
},
|
|
23
|
-
label: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: null
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
computed: {
|
|
30
|
-
...mapGetters({ t: 'i18n/t' }),
|
|
31
|
-
bg(): string | null {
|
|
32
|
-
return this.value?.stateBackground || this.color;
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
msg(): string | null {
|
|
36
|
-
let text = this.value?.stateDisplay || this.label;
|
|
37
|
-
let zhText = this.t(`stateLabel.${ text }`)
|
|
38
|
-
return zhText ? zhText : text
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<template>
|
|
46
|
-
<div style="display: flex;flex-direction: row;align-items: center;">
|
|
47
|
-
<div :class="{ [bg]: true }"></div>
|
|
48
|
-
<span style="margin-left: 5px;">{{ msg }}</span>
|
|
49
|
-
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
</template>
|
|
53
|
-
<style lang="scss" scoped>
|
|
54
|
-
.bg-error {
|
|
55
|
-
width: 10px; /* 圆点的宽度 */
|
|
56
|
-
height: 10px; /* 圆点的高度 */
|
|
57
|
-
background-color: #DD0C17; /* 圆点的颜色 */
|
|
58
|
-
border-radius: 50%; /* 设置为圆形 */
|
|
59
|
-
}
|
|
60
|
-
.bg-darker {
|
|
61
|
-
width: 10px; /* 圆点的宽度 */
|
|
62
|
-
height: 10px; /* 圆点的高度 */
|
|
63
|
-
background-color: #DD0C17; /* 圆点的颜色 */
|
|
64
|
-
border-radius: 50%; /* 设置为圆形 */
|
|
65
|
-
}
|
|
66
|
-
.bg-success {
|
|
67
|
-
width: 10px; /* 圆点的宽度 */
|
|
68
|
-
height: 10px; /* 圆点的高度 */
|
|
69
|
-
background-color: #95F204 !important; /* 圆点的颜色 */
|
|
70
|
-
border-radius: 50%; /* 设置为圆形 */
|
|
71
|
-
}
|
|
72
|
-
.bg-warning {
|
|
73
|
-
width: 10px; /* 圆点的宽度 */
|
|
74
|
-
height: 10px; /* 圆点的高度 */
|
|
75
|
-
background-color: #DAC342; /* 圆点的颜色 */
|
|
76
|
-
border-radius: 50%; /* 设置为圆形 */
|
|
77
|
-
}
|
|
78
|
-
.bg-info {
|
|
79
|
-
width: 10px; /* 圆点的宽度 */
|
|
80
|
-
height: 10px; /* 圆点的高度 */
|
|
81
|
-
background-color: #1890FF; /* 圆点的颜色 */
|
|
82
|
-
border-radius: 50%; /* 设置为圆形 */
|
|
83
|
-
}
|
|
84
|
-
</style>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { computed, ref } from 'vue';
|
|
3
|
-
import { useStore } from 'vuex';
|
|
4
|
-
|
|
5
|
-
import AppModal from '@shell/components/AppModal.vue';
|
|
6
|
-
|
|
7
|
-
const store = useStore();
|
|
8
|
-
|
|
9
|
-
const isOpen = computed(() => store.getters['modal/isOpen']);
|
|
10
|
-
const component = computed(() => store.getters['modal/component']);
|
|
11
|
-
const componentProps = computed(() => store.getters['modal/componentProps']);
|
|
12
|
-
const resources = computed(() => store.getters['modal/resources']);
|
|
13
|
-
const closeOnClickOutside = computed(() => store.getters['modal/closeOnClickOutside']);
|
|
14
|
-
const modalWidth = computed(() => store.getters['modal/modalWidth']);
|
|
15
|
-
// const modalSticky = computed(() => store.getters['modal/modalSticky']); // TODO: Implement sticky modals
|
|
16
|
-
|
|
17
|
-
const backgroundClosing = ref<Function | null>(null);
|
|
18
|
-
|
|
19
|
-
function close() {
|
|
20
|
-
if (!isOpen.value) return;
|
|
21
|
-
|
|
22
|
-
if (backgroundClosing.value) {
|
|
23
|
-
backgroundClosing.value();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
store.commit('modal/closeModal');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function registerBackgroundClosing(fn: Function) {
|
|
30
|
-
backgroundClosing.value = fn;
|
|
31
|
-
}
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<template>
|
|
35
|
-
<Teleport to="#modals">
|
|
36
|
-
<app-modal
|
|
37
|
-
v-if="isOpen && component"
|
|
38
|
-
:click-to-close="closeOnClickOutside"
|
|
39
|
-
:width="modalWidth"
|
|
40
|
-
:style="{ '--prompt-modal-width': modalWidth }"
|
|
41
|
-
:trigger-focus-trap="true"
|
|
42
|
-
tabindex="0"
|
|
43
|
-
@close="close"
|
|
44
|
-
>
|
|
45
|
-
<component
|
|
46
|
-
:is="component"
|
|
47
|
-
v-bind="componentProps || {}"
|
|
48
|
-
data-testid="modal-manager-component"
|
|
49
|
-
:resources="resources"
|
|
50
|
-
:register-background-closing="registerBackgroundClosing"
|
|
51
|
-
@close="close"
|
|
52
|
-
/>
|
|
53
|
-
</app-modal>
|
|
54
|
-
</Teleport>
|
|
55
|
-
</template>
|