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