dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.9
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/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/icons/demo.css +539 -0
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +216 -0
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +324 -0
- package/assets/icons/iconfont.json:Zone.Identifier +0 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +3 -0
- package/assets/images/action.svg +6 -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/half-logo.svg +2 -23
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/pl/logo.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 +4 -0
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +14 -7
- package/assets/styles/global/_button.scss +43 -25
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +45 -13
- package/assets/styles/global/_labeled-input.scss +54 -26
- package/assets/styles/global/_layout.scss +8 -3
- package/assets/styles/global/_select.scss +25 -17
- package/assets/styles/global/_table.scss +7 -1
- package/assets/styles/global/_tooltip.scss +56 -8
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +66 -43
- package/assets/styles/vendor/vue-select.scss +22 -9
- package/assets/translations/en-us.yaml +28 -4
- package/assets/translations/zh-hans.yaml +452 -189
- package/components/ActionDropdown.vue +2 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +2 -0
- package/components/AppModal.vue +46 -5
- package/components/BrandImage.vue +1 -0
- package/components/ButtonDropdown.vue +26 -4
- package/components/ButtonMultiAction.vue +1 -0
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +20 -6
- package/components/ConsumptionGauge.vue +24 -5
- package/components/CopyToClipboard.vue +15 -0
- package/components/CruResource.vue +9 -8
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +29 -17
- package/components/DotState.vue +84 -0
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -22
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
- package/components/ExplorerMembers.vue +18 -3
- package/components/ExplorerProjectsNamespaces.vue +19 -5
- package/components/GlobalRoleBindings.vue +112 -48
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +3 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/IndentedPanel.vue +4 -10
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +20 -1
- package/components/ModalWithCard.vue +12 -3
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +30 -11
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
- package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
- package/components/Resource/Detail/Metadata/index.vue +3 -1
- package/components/Resource/Detail/TitleBar/Title.vue +4 -3
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/index.vue +109 -24
- package/components/ResourceDetail/Masthead/legacy.vue +181 -38
- package/components/ResourceDetail/legacy.vue +32 -14
- package/components/ResourceList/Masthead.vue +226 -54
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +24 -2
- package/components/SideNav.vue +74 -20
- package/components/SortableTable/THead.vue +33 -3
- package/components/SortableTable/index.vue +1016 -463
- package/components/SortableTable/paging.js +26 -16
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +47 -29
- package/components/YamlEditor.vue +0 -1
- package/components/auth/Principal.vue +37 -13
- package/components/auth/RoleDetailEdit.vue +58 -7
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/breadcrumb/index.vue +316 -0
- package/components/form/ArrayList.vue +41 -33
- package/components/form/ArrayListGrouped.vue +10 -2
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +64 -59
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Footer.vue +11 -8
- package/components/form/InputWithSelect.vue +8 -5
- package/components/form/KeyValue.vue +47 -7
- package/components/form/LabeledSelect.vue +214 -242
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +24 -7
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +59 -20
- package/components/form/Password.vue +16 -7
- package/components/form/PodAffinity.vue +4 -5
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +18 -17
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +3 -6
- package/components/form/Select.vue +5 -2
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Taints.vue +2 -1
- package/components/form/UnitInput.vue +8 -3
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +132 -99
- package/components/nav/Header.vue +124 -27
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/NamespaceFilter.vue +20 -17
- package/components/nav/TopLevelMenu.vue +182 -119
- package/components/nav/Type.vue +63 -41
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +15 -11
- package/config/product/auth.js +17 -7
- package/config/product/settings.js +19 -9
- package/config/settings.ts +28 -0
- package/config/table-headers.js +3 -2
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +17 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +1 -2
- package/edit/token.vue +31 -12
- package/edit/workload/index.vue +4 -4
- package/list/management.cattle.io.setting.vue +22 -13
- package/list/management.cattle.io.user.vue +7 -3
- package/list/namespace.vue +3 -0
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/package.json +1 -1
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +220 -52
- package/pages/auth/setup.vue +142 -19
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +56 -5
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +174 -102
- package/pages/c/_cluster/settings/brand.vue +350 -302
- package/pages/c/_cluster/settings/performance.vue +61 -38
- package/pages/home.vue +70 -30
- package/pages/prefs.vue +27 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +38 -55
- package/rancher-components/Banner/Banner.vue +12 -8
- package/rancher-components/Card/Card.vue +7 -8
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
- package/rancher-components/Form/Radio/RadioButton.vue +35 -11
- package/rancher-components/Form/Radio/RadioGroup.vue +13 -5
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +12 -4
- package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/rancher-components/StringList/StringList.vue +1 -1
- package/scripts/publish-shell.sh +1 -1
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +3 -3
- package/store/i18n.js +5 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +11 -4
- package/store/type-map.js +32 -2
- package/types/shell/index.d.ts +78 -97
- package/utils/error.js +89 -8
- package/utils/errorTranslate.json +1351 -0
- package/utils/router.js +21 -0
- package/utils/select.js +26 -3
- package/utils/string.js +8 -5
- package/utils/title.ts +1 -1
- package/vue.config.js +1 -1
|
@@ -15,7 +15,8 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
|
|
17
17
|
indexTo() {
|
|
18
|
-
return Math.min(this.totalRows, this.indexFrom + this.perPage - 1);
|
|
18
|
+
// return Math.min(this.totalRows, this.indexFrom + this.perPage - 1);
|
|
19
|
+
return Math.min(this.totalRows, this.indexFrom + Number(this.perPage) - 1);
|
|
19
20
|
},
|
|
20
21
|
|
|
21
22
|
totalPages() {
|
|
@@ -23,17 +24,18 @@ export default {
|
|
|
23
24
|
},
|
|
24
25
|
|
|
25
26
|
showPaging() {
|
|
26
|
-
if (!this.paging) {
|
|
27
|
-
|
|
28
|
-
}
|
|
27
|
+
// if (!this.paging) {
|
|
28
|
+
// return false;
|
|
29
|
+
// }
|
|
29
30
|
|
|
30
|
-
const havePages = this.totalPages > 1;
|
|
31
|
+
// const havePages = this.totalPages > 1;
|
|
31
32
|
|
|
32
|
-
if (this.altLoading) {
|
|
33
|
-
|
|
34
|
-
}
|
|
33
|
+
// if (this.altLoading) {
|
|
34
|
+
// return havePages;
|
|
35
|
+
// }
|
|
35
36
|
|
|
36
|
-
return !this.loading && havePages;
|
|
37
|
+
// return !this.loading && havePages;
|
|
38
|
+
return !this.loading && this.paging && this.totalPages >= 1;
|
|
37
39
|
},
|
|
38
40
|
|
|
39
41
|
pagingDisplay() {
|
|
@@ -76,7 +78,9 @@ export default {
|
|
|
76
78
|
},
|
|
77
79
|
|
|
78
80
|
data() {
|
|
79
|
-
|
|
81
|
+
// const perPage = this.getPerPage();
|
|
82
|
+
|
|
83
|
+
return { page: 1, perPage:10 };
|
|
80
84
|
},
|
|
81
85
|
|
|
82
86
|
watch: {
|
|
@@ -91,17 +95,23 @@ export default {
|
|
|
91
95
|
}
|
|
92
96
|
},
|
|
93
97
|
|
|
94
|
-
page() {
|
|
95
|
-
|
|
96
|
-
},
|
|
98
|
+
// page() {
|
|
99
|
+
// this.debouncedPaginationChanged();
|
|
100
|
+
// },
|
|
97
101
|
|
|
98
|
-
perPage() {
|
|
99
|
-
|
|
100
|
-
},
|
|
102
|
+
// perPage() {
|
|
103
|
+
// this.debouncedPaginationChanged();
|
|
104
|
+
// },
|
|
101
105
|
|
|
102
106
|
},
|
|
103
107
|
|
|
104
108
|
methods: {
|
|
109
|
+
|
|
110
|
+
setgetPerPage(num) {
|
|
111
|
+
this.setPage(1);
|
|
112
|
+
this.perPage = num;
|
|
113
|
+
},
|
|
114
|
+
|
|
105
115
|
setPage(num) {
|
|
106
116
|
if (this.page === num) {
|
|
107
117
|
return;
|
|
@@ -10,7 +10,7 @@ export const NONE = 'none';
|
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
mounted() {
|
|
13
|
-
const table = this.$el.querySelector('TABLE');
|
|
13
|
+
const table = this.$el && this.$el.querySelector('TABLE');
|
|
14
14
|
|
|
15
15
|
this._onRowClickBound = this.onRowClick.bind(this);
|
|
16
16
|
this._onRowMousedownBound = this.onRowMousedown.bind(this);
|
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
beforeUnmount() {
|
|
25
|
-
const table = this.$el.querySelector('TABLE');
|
|
25
|
+
const table = this.$el && this.$el.querySelector('TABLE');
|
|
26
26
|
|
|
27
27
|
table.removeEventListener('click', this._onRowClickBound);
|
|
28
28
|
table.removeEventListener('mousedown', this._onRowMousedownBound);
|
|
@@ -100,14 +100,14 @@ export default {
|
|
|
100
100
|
v-if="shouldShowHeader"
|
|
101
101
|
class="tab-header"
|
|
102
102
|
>
|
|
103
|
-
<h2>
|
|
103
|
+
<!-- <h2>
|
|
104
104
|
{{ labelDisplay }}
|
|
105
105
|
<i
|
|
106
106
|
v-if="tooltip"
|
|
107
107
|
v-clean-tooltip="tooltip"
|
|
108
108
|
class="icon icon-info icon-lg"
|
|
109
109
|
/>
|
|
110
|
-
</h2>
|
|
110
|
+
</h2> -->
|
|
111
111
|
<slot name="tab-header-right" />
|
|
112
112
|
</div>
|
|
113
113
|
<slot v-bind="{active}" />
|
|
@@ -118,7 +118,7 @@ export default {
|
|
|
118
118
|
.tab-header {
|
|
119
119
|
display: flex;
|
|
120
120
|
justify-content: space-between;
|
|
121
|
-
margin-bottom: 15px;
|
|
121
|
+
/* margin-bottom: 15px; */
|
|
122
122
|
align-items: center;
|
|
123
123
|
|
|
124
124
|
h2 {
|
|
@@ -285,15 +285,15 @@ export default {
|
|
|
285
285
|
:data-testid="tab.name"
|
|
286
286
|
:class="{tab: true, active: tab.active, disabled: tab.disabled, error: (tab.error)}"
|
|
287
287
|
role="presentation"
|
|
288
|
+
@click.prevent="select(tab.name, $event)"
|
|
289
|
+
@keyup.enter.space="select(tab.name, $event)"
|
|
288
290
|
>
|
|
289
291
|
<a
|
|
290
292
|
:data-testid="`btn-${tab.name}`"
|
|
291
293
|
:aria-controls="tab.name"
|
|
292
294
|
:aria-selected="tab.active"
|
|
293
295
|
:aria-label="tab.labelDisplay || ''"
|
|
294
|
-
role="tab"
|
|
295
|
-
@click.prevent="select(tab.name, $event)"
|
|
296
|
-
@keyup.enter.space="select(tab.name, $event)"
|
|
296
|
+
role="tab"
|
|
297
297
|
>
|
|
298
298
|
<span>{{ tab.labelDisplay }}</span>
|
|
299
299
|
<span
|
|
@@ -382,15 +382,6 @@ export default {
|
|
|
382
382
|
margin: 0;
|
|
383
383
|
padding: 0;
|
|
384
384
|
|
|
385
|
-
&:focus-visible {
|
|
386
|
-
outline: none;
|
|
387
|
-
|
|
388
|
-
.tab.active {
|
|
389
|
-
@include focus-outline;
|
|
390
|
-
outline-offset: -2px;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
385
|
&.horizontal {
|
|
395
386
|
border: solid thin var(--border);
|
|
396
387
|
border-bottom: 0;
|
|
@@ -406,8 +397,12 @@ export default {
|
|
|
406
397
|
}
|
|
407
398
|
}
|
|
408
399
|
|
|
409
|
-
&:focus
|
|
410
|
-
|
|
400
|
+
&:focus {
|
|
401
|
+
outline: none;
|
|
402
|
+
|
|
403
|
+
& .tab.active a span {
|
|
404
|
+
text-decoration: none;
|
|
405
|
+
}
|
|
411
406
|
}
|
|
412
407
|
|
|
413
408
|
.tab {
|
|
@@ -424,7 +419,7 @@ export default {
|
|
|
424
419
|
&:hover {
|
|
425
420
|
text-decoration: none;
|
|
426
421
|
span {
|
|
427
|
-
text-decoration:
|
|
422
|
+
text-decoration: none;
|
|
428
423
|
}
|
|
429
424
|
}
|
|
430
425
|
}
|
|
@@ -494,45 +489,68 @@ export default {
|
|
|
494
489
|
|
|
495
490
|
.side-tabs {
|
|
496
491
|
display: flex;
|
|
497
|
-
|
|
492
|
+
flex-direction: column;
|
|
493
|
+
/* box-shadow: 0 0 20px var(--shadow);
|
|
498
494
|
border-radius: calc(var(--border-radius) * 2);
|
|
499
|
-
background-color: var(--tabbed-sidebar-bg);
|
|
500
|
-
|
|
495
|
+
background-color: var(--tabbed-sidebar-bg); */
|
|
496
|
+
margin: 0px -20px;
|
|
501
497
|
.tab-container {
|
|
502
498
|
padding: 20px;
|
|
503
499
|
}
|
|
504
500
|
|
|
505
501
|
& .tabs {
|
|
506
|
-
width: $sideways-tabs-width;
|
|
507
|
-
min-width: $sideways-tabs-width;
|
|
502
|
+
/* width: $sideways-tabs-width; */
|
|
503
|
+
/* min-width: $sideways-tabs-width; */
|
|
508
504
|
display: flex;
|
|
509
|
-
|
|
510
|
-
|
|
505
|
+
border-bottom:1px solid #d7d7d7;
|
|
506
|
+
padding: 0 0 0 20px;
|
|
507
|
+
/* flex: 1 0; */
|
|
508
|
+
/* flex-direction: column; */
|
|
511
509
|
|
|
512
510
|
// &.vertical {
|
|
513
511
|
// .tab.active {
|
|
514
512
|
// background-color: var(--tabbed-container-bg);
|
|
515
513
|
// }
|
|
516
514
|
// }
|
|
517
|
-
|
|
518
515
|
& .tab {
|
|
519
|
-
width: 100%;
|
|
520
|
-
|
|
516
|
+
/* width: 100%; */
|
|
517
|
+
min-width: 120px;
|
|
518
|
+
height: 36px;
|
|
519
|
+
/* border-top: solid 5px transparent; */
|
|
520
|
+
display: flex;
|
|
521
|
+
justify-content: center;
|
|
522
|
+
padding: 8px 16px;
|
|
523
|
+
box-sizing: border-box;
|
|
524
|
+
border: 1px solid #d7d7d7;
|
|
525
|
+
border-bottom: 0px;
|
|
526
|
+
margin-right: 5px;
|
|
527
|
+
border-radius: 2px;
|
|
521
528
|
|
|
522
529
|
&.toggle A {
|
|
523
530
|
color: var(--primary);
|
|
531
|
+
padding: 0px;
|
|
524
532
|
}
|
|
525
533
|
|
|
526
534
|
A {
|
|
527
|
-
color: var(--
|
|
535
|
+
color: var(--input-label);
|
|
536
|
+
padding: 0px;
|
|
528
537
|
}
|
|
529
538
|
|
|
530
539
|
&.active {
|
|
531
540
|
background-color: var(--body-bg);
|
|
532
|
-
border-
|
|
541
|
+
border-top: solid 2px var(--primary);
|
|
542
|
+
position: relative;
|
|
543
|
+
&.active::before{
|
|
544
|
+
position: absolute;
|
|
545
|
+
right: 0;
|
|
546
|
+
left: 0;
|
|
547
|
+
top: 34px;
|
|
548
|
+
border-bottom: 1px solid #fff;
|
|
549
|
+
content: '';
|
|
533
550
|
|
|
551
|
+
}
|
|
534
552
|
& A {
|
|
535
|
-
color: var(--
|
|
553
|
+
color: var(--primary);
|
|
536
554
|
}
|
|
537
555
|
}
|
|
538
556
|
|
|
@@ -576,7 +594,7 @@ export default {
|
|
|
576
594
|
&
|
|
577
595
|
|
|
578
596
|
.tab-container {
|
|
579
|
-
width: calc(100% - #{$sideways-tabs-width});
|
|
597
|
+
/* width: calc(100% - #{$sideways-tabs-width}); */
|
|
580
598
|
flex-grow: 1;
|
|
581
599
|
background-color: var(--body-bg);
|
|
582
600
|
}
|
|
@@ -16,6 +16,10 @@ export default {
|
|
|
16
16
|
showLabels: {
|
|
17
17
|
type: Boolean,
|
|
18
18
|
default: false,
|
|
19
|
+
},
|
|
20
|
+
isShowPass: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false,
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
|
|
@@ -88,7 +92,7 @@ export default {
|
|
|
88
92
|
<template v-else-if="principal">
|
|
89
93
|
<div class="avatar">
|
|
90
94
|
<img
|
|
91
|
-
|
|
95
|
+
src="@shell/assets/images/user.png"
|
|
92
96
|
:class="{'round': principal.roundAvatar}"
|
|
93
97
|
:alt="t('principal.alt.avatar')"
|
|
94
98
|
>
|
|
@@ -98,11 +102,19 @@ export default {
|
|
|
98
102
|
class="name"
|
|
99
103
|
>
|
|
100
104
|
<table>
|
|
101
|
-
<
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
<tr class="mb-10">
|
|
106
|
+
<td>{{ t('principal.name') }}: </td><td>{{ principal.name || principal.loginName }}</td>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr class="mb-10">
|
|
109
|
+
<td>{{ t('principal.loginName') }}: </td><td>{{ principal.loginName }}</td>
|
|
110
|
+
</tr>
|
|
111
|
+
<tr
|
|
112
|
+
v-if="isShowPass"
|
|
113
|
+
class="mb-10"
|
|
114
|
+
>
|
|
115
|
+
<td>修改密码: </td><td>****** <slot name="edit" /></td>
|
|
116
|
+
</tr>
|
|
117
|
+
<tr><td>{{ t('principal.type') }}: </td><td>{{ principal.displayType }}</td></tr>
|
|
106
118
|
</table>
|
|
107
119
|
</div>
|
|
108
120
|
<template v-else>
|
|
@@ -154,7 +166,7 @@ export default {
|
|
|
154
166
|
</template>
|
|
155
167
|
|
|
156
168
|
<style lang="scss" scoped>
|
|
157
|
-
$size:
|
|
169
|
+
$size: 20px;
|
|
158
170
|
|
|
159
171
|
.principal {
|
|
160
172
|
display: grid;
|
|
@@ -162,7 +174,7 @@ export default {
|
|
|
162
174
|
"avatar name"
|
|
163
175
|
"avatar description";
|
|
164
176
|
grid-template-columns: $size auto;
|
|
165
|
-
grid-template-rows: auto math.div($size, 2);
|
|
177
|
+
// grid-template-rows: auto math.div($size, 2);
|
|
166
178
|
column-gap: 10px;
|
|
167
179
|
|
|
168
180
|
th {
|
|
@@ -172,23 +184,35 @@ export default {
|
|
|
172
184
|
}
|
|
173
185
|
|
|
174
186
|
&.showLabels {
|
|
175
|
-
grid-template-areas:
|
|
187
|
+
/* grid-template-areas:
|
|
176
188
|
"avatar name";
|
|
177
189
|
grid-template-columns: 60px auto;
|
|
178
190
|
grid-template-rows: 60px;
|
|
179
|
-
column-gap: 0;
|
|
191
|
+
column-gap: 0; */
|
|
192
|
+
display: flex;
|
|
193
|
+
column-gap:0;
|
|
180
194
|
.name {
|
|
195
|
+
display: flex;
|
|
181
196
|
line-height: unset;
|
|
182
197
|
}
|
|
183
|
-
|
|
198
|
+
table tr {
|
|
199
|
+
display: block;
|
|
200
|
+
}
|
|
184
201
|
table tr td:not(:first-of-type) {
|
|
185
202
|
padding-left: 10px;
|
|
186
203
|
}
|
|
204
|
+
table tr td:not(:last-of-type) {
|
|
205
|
+
width: 100px;
|
|
206
|
+
}
|
|
187
207
|
}
|
|
188
208
|
|
|
189
209
|
.avatar {
|
|
190
|
-
grid-area: avatar;
|
|
191
|
-
text-align: center;
|
|
210
|
+
/* grid-area: avatar;
|
|
211
|
+
text-align: center; */
|
|
212
|
+
width: 287px;
|
|
213
|
+
display: flex;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
align-items: center;
|
|
192
216
|
|
|
193
217
|
DIV.empty {
|
|
194
218
|
border: 1px solid var(--border);
|
|
@@ -333,7 +333,7 @@ export default {
|
|
|
333
333
|
return this.value.listLocation;
|
|
334
334
|
},
|
|
335
335
|
ruleClass() {
|
|
336
|
-
return `col ${ this.isNamespaced ? 'span-
|
|
336
|
+
return `ruleCls col ${ this.isNamespaced ? 'span-3' : 'span-3' }`;
|
|
337
337
|
},
|
|
338
338
|
// Detail View
|
|
339
339
|
rules() {
|
|
@@ -546,7 +546,11 @@ export default {
|
|
|
546
546
|
</script>
|
|
547
547
|
|
|
548
548
|
<template>
|
|
549
|
+
|
|
550
|
+
<!-- 加载状态下显示 Loading 组件 -->
|
|
549
551
|
<Loading v-if="$fetchState.pending" />
|
|
552
|
+
|
|
553
|
+
<!-- 主表单容器,基于 CruResource 封装 -->
|
|
550
554
|
<CruResource
|
|
551
555
|
v-else
|
|
552
556
|
class="receiver"
|
|
@@ -560,7 +564,10 @@ export default {
|
|
|
560
564
|
@finish="save"
|
|
561
565
|
@cancel="cancel"
|
|
562
566
|
>
|
|
567
|
+
<!-- ========== 详情模式显示规则表 ========== -->
|
|
563
568
|
<template v-if="isDetail">
|
|
569
|
+
|
|
570
|
+
<!-- 当前规则列表 -->
|
|
564
571
|
<SortableTable
|
|
565
572
|
key-field="index"
|
|
566
573
|
:rows="rules"
|
|
@@ -611,7 +618,11 @@ export default {
|
|
|
611
618
|
/>
|
|
612
619
|
</div>
|
|
613
620
|
</template>
|
|
621
|
+
|
|
622
|
+
<!-- ========== 表单编辑/创建模式 ========== -->
|
|
614
623
|
<template v-else>
|
|
624
|
+
|
|
625
|
+
<!-- 名称 & 命名空间 & 描述输入 -->
|
|
615
626
|
<NameNsDescription
|
|
616
627
|
:value="value"
|
|
617
628
|
:namespaced="isNamespaced"
|
|
@@ -622,11 +633,15 @@ export default {
|
|
|
622
633
|
:rules="{ name: fvGetAndReportPathRules('displayName') }"
|
|
623
634
|
@update:value="$emit('input', $event)"
|
|
624
635
|
/>
|
|
636
|
+
|
|
637
|
+
<!-- Rancher 相关的默认选项设置 -->
|
|
625
638
|
<div
|
|
626
639
|
v-if="isRancherType"
|
|
627
640
|
class="row"
|
|
628
641
|
>
|
|
629
642
|
<div class="col span-6">
|
|
643
|
+
|
|
644
|
+
<!-- 默认角色选项 -->
|
|
630
645
|
<RadioGroup
|
|
631
646
|
v-model:value="defaultValue"
|
|
632
647
|
name="storageSource"
|
|
@@ -637,6 +652,8 @@ export default {
|
|
|
637
652
|
:mode="mode"
|
|
638
653
|
/>
|
|
639
654
|
</div>
|
|
655
|
+
|
|
656
|
+
<!-- 锁定角色模板选项 -->
|
|
640
657
|
<div
|
|
641
658
|
v-if="isRancherRoleTemplate"
|
|
642
659
|
class="col span-6"
|
|
@@ -653,17 +670,25 @@ export default {
|
|
|
653
670
|
</div>
|
|
654
671
|
</div>
|
|
655
672
|
<div class="spacer" />
|
|
673
|
+
|
|
674
|
+
<!-- ========== 选项卡容器 ========== -->
|
|
656
675
|
<Tabbed :side-tabs="true">
|
|
676
|
+
|
|
677
|
+
<!-- ---------- 授权资源 Tab ---------- -->
|
|
657
678
|
<Tab
|
|
658
679
|
name="grant-resources"
|
|
659
680
|
:label="t('rbac.roletemplate.tabs.grantResources.label')"
|
|
660
681
|
:weight="1"
|
|
661
682
|
>
|
|
683
|
+
|
|
684
|
+
<!-- 校验错误展示 -->
|
|
662
685
|
<Error
|
|
663
686
|
:value="value.rules"
|
|
664
687
|
:rules="fvGetAndReportPathRules('rules')"
|
|
665
688
|
as-banner
|
|
666
689
|
/>
|
|
690
|
+
|
|
691
|
+
<!-- 规则编辑列表 -->
|
|
667
692
|
<ArrayList
|
|
668
693
|
v-model:value="value.rules"
|
|
669
694
|
label="Resources"
|
|
@@ -673,9 +698,11 @@ export default {
|
|
|
673
698
|
:default-add-value="defaultRule"
|
|
674
699
|
:initial-empty-row="true"
|
|
675
700
|
:show-header="true"
|
|
676
|
-
add-label="
|
|
701
|
+
add-label="添加资源"
|
|
677
702
|
:mode="mode"
|
|
678
703
|
>
|
|
704
|
+
|
|
705
|
+
<!-- 列表头部 -->
|
|
679
706
|
<template #column-headers>
|
|
680
707
|
<div class="column-headers row">
|
|
681
708
|
<div :class="ruleClass">
|
|
@@ -707,8 +734,12 @@ export default {
|
|
|
707
734
|
</div>
|
|
708
735
|
</div>
|
|
709
736
|
</template>
|
|
737
|
+
|
|
738
|
+
<!-- 列内容渲染 -->
|
|
710
739
|
<template #columns="props">
|
|
711
740
|
<div class="columns row mr-20">
|
|
741
|
+
|
|
742
|
+
<!-- 动作(verbs)选择 -->
|
|
712
743
|
<div :class="ruleClass">
|
|
713
744
|
<!-- Select verbs -->
|
|
714
745
|
<Select
|
|
@@ -725,8 +756,11 @@ export default {
|
|
|
725
756
|
@update:value="updateSelectValue(props.row.value, 'verbs', $event)"
|
|
726
757
|
/>
|
|
727
758
|
</div>
|
|
759
|
+
|
|
760
|
+
<!-- 资源(resources)选择 -->
|
|
728
761
|
<div :class="ruleClass">
|
|
729
762
|
<Select
|
|
763
|
+
style="width: auto;"
|
|
730
764
|
:value="getRule('resources', props.row.value)"
|
|
731
765
|
:disabled="isBuiltin"
|
|
732
766
|
:options="resourceOptions"
|
|
@@ -740,6 +774,8 @@ export default {
|
|
|
740
774
|
@createdListItem="setRule('resources', props.row.value, $event)"
|
|
741
775
|
/>
|
|
742
776
|
</div>
|
|
777
|
+
|
|
778
|
+
<!-- API Groups 输入 -->
|
|
743
779
|
<div :class="ruleClass">
|
|
744
780
|
<LabeledInput
|
|
745
781
|
:value="getRule('apiGroups', props.row.value)"
|
|
@@ -749,6 +785,8 @@ export default {
|
|
|
749
785
|
@input="setRule('apiGroups', props.row.value, $event.target.value)"
|
|
750
786
|
/>
|
|
751
787
|
</div>
|
|
788
|
+
|
|
789
|
+
<!-- 非命名空间 URL 输入(仅非命名空间模式显示) -->
|
|
752
790
|
<div
|
|
753
791
|
v-if="!isNamespaced"
|
|
754
792
|
:class="ruleClass"
|
|
@@ -776,10 +814,12 @@ export default {
|
|
|
776
814
|
</template>
|
|
777
815
|
</ArrayList>
|
|
778
816
|
</Tab>
|
|
817
|
+
|
|
818
|
+
<!-- ---------- 继承角色模板 Tab(仅 Rancher 角色模板可用) ---------- -->
|
|
779
819
|
<Tab
|
|
780
820
|
v-if="isRancherRoleTemplate"
|
|
781
821
|
name="inherit-from"
|
|
782
|
-
label="
|
|
822
|
+
label="继承表单"
|
|
783
823
|
:weight="0"
|
|
784
824
|
>
|
|
785
825
|
<ArrayList
|
|
@@ -788,7 +828,7 @@ export default {
|
|
|
788
828
|
:remove-allowed="!isBuiltin"
|
|
789
829
|
:add-allowed="!isBuiltin"
|
|
790
830
|
label="Resources"
|
|
791
|
-
add-label="
|
|
831
|
+
add-label="添加资源"
|
|
792
832
|
:mode="mode"
|
|
793
833
|
>
|
|
794
834
|
<template #columns="props">
|
|
@@ -819,13 +859,16 @@ export default {
|
|
|
819
859
|
</template>
|
|
820
860
|
|
|
821
861
|
<style lang="scss" scoped>
|
|
862
|
+
.ruleCls {
|
|
863
|
+
margin-right: 10px;
|
|
864
|
+
}
|
|
822
865
|
.required {
|
|
823
866
|
color: var(--error);
|
|
824
867
|
}
|
|
825
868
|
|
|
826
869
|
:deep() {
|
|
827
870
|
.column-headers {
|
|
828
|
-
margin-right:
|
|
871
|
+
margin-right: 95px;
|
|
829
872
|
margin-bottom: 5px;
|
|
830
873
|
}
|
|
831
874
|
|
|
@@ -835,7 +878,6 @@ export default {
|
|
|
835
878
|
.remove {
|
|
836
879
|
display: flex;
|
|
837
880
|
flex-direction: column;
|
|
838
|
-
justify-content: center;
|
|
839
881
|
align-items: flex-end;
|
|
840
882
|
}
|
|
841
883
|
}
|
|
@@ -843,8 +885,17 @@ export default {
|
|
|
843
885
|
.columns {
|
|
844
886
|
.col > .unlabeled-select:not(.taggable) {
|
|
845
887
|
// override the odd padding-top from shell/assets/styles/global/_select.scss
|
|
846
|
-
padding: $unlabaled-select-padding
|
|
888
|
+
/* padding: $unlabaled-select-padding */
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.columns {
|
|
894
|
+
:deep() {
|
|
895
|
+
.unlabeled-select {
|
|
896
|
+
width: auto;
|
|
847
897
|
}
|
|
848
898
|
}
|
|
899
|
+
|
|
849
900
|
}
|
|
850
901
|
</style>
|