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
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { KUBERNETES, PROJECT } from '@shell/config/labels-annotations';
|
|
3
|
-
import { FLEET, NAMESPACE, MANAGEMENT, HELM } from '@shell/config/types';
|
|
4
|
-
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
5
|
-
// import { BadgeState } from '@components/BadgeState';
|
|
6
|
-
import DotState from '@shell/components/DotState.vue';
|
|
7
|
-
import { Banner } from '@components/Banner';
|
|
8
|
-
import { get } from '@shell/utils/object';
|
|
9
|
-
import { NAME as FLEET_NAME } from '@shell/config/product/fleet';
|
|
10
|
-
import { HIDE_SENSITIVE } from '@shell/store/prefs';
|
|
11
|
-
import {
|
|
12
|
-
AS, _DETAIL, _CONFIG, _YAML, MODE, _CREATE, _EDIT, _VIEW, _UNFLAG, _GRAPH
|
|
13
|
-
} from '@shell/config/query-params';
|
|
14
|
-
import { ExtensionPoint, PanelLocation } from '@shell/core/types';
|
|
15
|
-
import ExtensionPanel from '@shell/components/ExtensionPanel';
|
|
16
|
-
import TabTitle from '@shell/components/TabTitle';
|
|
17
|
-
import ActionMenu from '@shell/components/ActionMenuShell.vue';
|
|
18
|
-
import { useRuntimeFlag } from '@shell/composables/useRuntimeFlag';
|
|
19
|
-
import { useStore } from 'vuex';
|
|
20
|
-
|
|
21
|
-
// i18n-uses resourceDetail.header.*
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Resource Detail Masthead component.
|
|
25
|
-
*
|
|
26
|
-
* ToDo: this component seem to be picking up a lot of logic from special cases, could be simplified down to parameters and then customized per use-case via wrapper component
|
|
27
|
-
*/
|
|
28
|
-
export default {
|
|
29
|
-
|
|
30
|
-
name: 'MastheadResourceDetail',
|
|
31
|
-
|
|
32
|
-
components: {
|
|
33
|
-
// BadgeState,
|
|
34
|
-
DotState,
|
|
35
|
-
Banner,
|
|
36
|
-
ButtonGroup,
|
|
37
|
-
ExtensionPanel,
|
|
38
|
-
TabTitle,
|
|
39
|
-
ActionMenu,
|
|
40
|
-
},
|
|
41
|
-
props: {
|
|
42
|
-
value: {
|
|
43
|
-
type: Object,
|
|
44
|
-
default: () => {
|
|
45
|
-
return {};
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
mode: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: 'view'
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
realMode: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: 'view'
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
as: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: _YAML,
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
storeOverride: {
|
|
65
|
-
type: String,
|
|
66
|
-
default: null,
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
resource: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: null,
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
resourceSubtype: {
|
|
75
|
-
type: String,
|
|
76
|
-
default: null,
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
parentRouteOverride: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: null,
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
setup() {
|
|
87
|
-
const store = useStore();
|
|
88
|
-
const { featureDropdownMenu } = useRuntimeFlag(store);
|
|
89
|
-
|
|
90
|
-
return { featureDropdownMenu };
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
data() {
|
|
94
|
-
return {
|
|
95
|
-
DETAIL_VIEW: _DETAIL,
|
|
96
|
-
extensionType: ExtensionPoint.PANEL,
|
|
97
|
-
extensionLocation: PanelLocation.DETAILS_MASTHEAD,
|
|
98
|
-
Svg: require('~shell/assets/images/API.svg')
|
|
99
|
-
};
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
computed: {
|
|
103
|
-
dev() {
|
|
104
|
-
return this.$store.getters['prefs/dev'];
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
schema() {
|
|
108
|
-
const inStore = this.storeOverride || this.$store.getters['currentStore'](this.resource);
|
|
109
|
-
|
|
110
|
-
return this.$store.getters[`${ inStore }/schemaFor`]( this.resource );
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
isProjectHelmChart() {
|
|
114
|
-
return this.schema?.id === HELM.PROJECTHELMCHART;
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
shouldHifenize() {
|
|
118
|
-
return (this.mode === 'view' || this.mode === 'edit') && this.resourceSubtype?.length && this.value?.nameDisplay?.length;
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
parent() {
|
|
122
|
-
const displayName = this.value?.parentNameOverride || this.$store.getters['type-map/labelFor'](this.schema);
|
|
123
|
-
const product = this.$store.getters['currentProduct'].name;
|
|
124
|
-
|
|
125
|
-
const defaultLocation = {
|
|
126
|
-
name: 'c-cluster-product-resource',
|
|
127
|
-
params: {
|
|
128
|
-
resource: this.resource,
|
|
129
|
-
product,
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const location = this.value?.parentLocationOverride || defaultLocation;
|
|
134
|
-
|
|
135
|
-
if (this.parentRouteOverride) {
|
|
136
|
-
location.name = this.parentRouteOverride;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const typeOptions = this.$store.getters[`type-map/optionsFor`]( this.resource );
|
|
140
|
-
|
|
141
|
-
// 转换为中文
|
|
142
|
-
const displayName_zh_hans = {
|
|
143
|
-
'GlobalRole': '全局角色',
|
|
144
|
-
'RoleTemplate': '集群角色',
|
|
145
|
-
}
|
|
146
|
-
if (displayName_zh_hans[displayName]) {
|
|
147
|
-
displayName = displayName_zh_hans[displayName]
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (displayName == '集群角色' && (this.$route.query?.roleContext == 'NAMESPACE' || location.hash == '#NAMESPACE')) {
|
|
151
|
-
displayName = '项目或资源组角色'
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const out = {
|
|
155
|
-
displayName, location, ...typeOptions
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
return out;
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
displayName() {
|
|
163
|
-
let displayName = this.value.nameDisplay;
|
|
164
|
-
|
|
165
|
-
if (this.isProjectHelmChart) {
|
|
166
|
-
displayName = this.value.projectDisplayName;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return this.shouldHifenize ? ` - ${ displayName }` : displayName;
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
demoDisplay() {
|
|
173
|
-
const product = this.$store.getters['productId'];
|
|
174
|
-
|
|
175
|
-
const resources = this.location?.params?.resource || ''
|
|
176
|
-
|
|
177
|
-
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], resources);
|
|
178
|
-
|
|
179
|
-
if (productId === undefined) {
|
|
180
|
-
return '';
|
|
181
|
-
}
|
|
182
|
-
const parts = productId.split('::');
|
|
183
|
-
const newString = 'root';
|
|
184
|
-
|
|
185
|
-
if (!parts?.includes(newString)) {
|
|
186
|
-
parts.unshift(newString); // 将字符串添加到数组第一位
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
const partsEn = parts.map((item) => {
|
|
190
|
-
return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
return partsEn;
|
|
194
|
-
},
|
|
195
|
-
menuIcon() {
|
|
196
|
-
const product = this.$store.getters['productId'];
|
|
197
|
-
|
|
198
|
-
const resources = this.location?.params?.resource || ''
|
|
199
|
-
|
|
200
|
-
return this.$store.getters['type-map/groupsForVirTypes'](product, resources);
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
location() {
|
|
204
|
-
const { parent } = this;
|
|
205
|
-
|
|
206
|
-
return parent?.location;
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
methods: {
|
|
212
|
-
get,
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
</script>
|
|
216
|
-
|
|
217
|
-
<template>
|
|
218
|
-
<div class="masthead">
|
|
219
|
-
<div class="title">
|
|
220
|
-
<!-- 创建api密钥不需要面包屑 -->
|
|
221
|
-
<div
|
|
222
|
-
v-if="!(parentRouteOverride === 'account' && resource=== 'token')"
|
|
223
|
-
class="excram-list"
|
|
224
|
-
>
|
|
225
|
-
<span
|
|
226
|
-
v-for="(item,index) in demoDisplay"
|
|
227
|
-
:key="index"
|
|
228
|
-
>
|
|
229
|
-
<span>{{ item }}</span>
|
|
230
|
-
<span>/</span>
|
|
231
|
-
</span>
|
|
232
|
-
<span class="excram-last-name">
|
|
233
|
-
{{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent.displayName }}
|
|
234
|
-
</span>
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
</template>
|
|
239
|
-
|
|
240
|
-
<style lang='scss' scoped>
|
|
241
|
-
|
|
242
|
-
HEADER {
|
|
243
|
-
margin: 0;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.primaryheader {
|
|
247
|
-
display: flex;
|
|
248
|
-
flex-direction: row;
|
|
249
|
-
align-items: center;
|
|
250
|
-
font-size:14px;
|
|
251
|
-
height: 50px;
|
|
252
|
-
|
|
253
|
-
h1 {
|
|
254
|
-
margin: 0;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.subheader{
|
|
259
|
-
display: flex;
|
|
260
|
-
flex-direction: row;
|
|
261
|
-
color: var(--input-label);
|
|
262
|
-
& > * {
|
|
263
|
-
margin: 5px 20px 5px 0px;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.live-data {
|
|
267
|
-
color: var(--body-text)
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.state-banner {
|
|
272
|
-
margin: 3px 0 0 0;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.masthead-state {
|
|
276
|
-
font-size: initial;
|
|
277
|
-
display: inline-block;
|
|
278
|
-
position: relative;
|
|
279
|
-
/* top: -2px; */
|
|
280
|
-
font-size: 12px;
|
|
281
|
-
margin-left: 5px;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.masthead-istio {
|
|
285
|
-
.icon {
|
|
286
|
-
vertical-align: middle;
|
|
287
|
-
color: var(--primary);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.left-right-split {
|
|
292
|
-
display: grid;
|
|
293
|
-
align-items: center;
|
|
294
|
-
|
|
295
|
-
.left-half {
|
|
296
|
-
grid-column: 1;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.right-half {
|
|
300
|
-
grid-column: 2;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.resource-external {
|
|
305
|
-
font-size: 18px;
|
|
306
|
-
}
|
|
307
|
-
.excram-list{
|
|
308
|
-
font-size: 14px;
|
|
309
|
-
margin-bottom: 20px;
|
|
310
|
-
}
|
|
311
|
-
.excram-last-name{
|
|
312
|
-
color: var(--link);
|
|
313
|
-
}
|
|
314
|
-
.valid{
|
|
315
|
-
color: #d7d7d7;
|
|
316
|
-
margin: 0px 10px;
|
|
317
|
-
}
|
|
318
|
-
.detailIcon-span{
|
|
319
|
-
width: 24px;
|
|
320
|
-
height: 24px;
|
|
321
|
-
display: inline-block;
|
|
322
|
-
position: relative;
|
|
323
|
-
background: var(--primary);
|
|
324
|
-
margin-right: 10px;
|
|
325
|
-
}
|
|
326
|
-
.detailIcon{
|
|
327
|
-
position: absolute;
|
|
328
|
-
color: #fff;
|
|
329
|
-
font-size: 38px;
|
|
330
|
-
left: 4px;
|
|
331
|
-
top: -2px;
|
|
332
|
-
}
|
|
333
|
-
.primary-title{
|
|
334
|
-
display: flex;
|
|
335
|
-
align-items: center;
|
|
336
|
-
}
|
|
337
|
-
.detailIcon-span-title{
|
|
338
|
-
font-weight: bold;
|
|
339
|
-
}
|
|
340
|
-
</style>
|
package/pages/account/pri.vue
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { NORMAN } from '@shell/config/types';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
props: {
|
|
6
|
-
value: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
useMuted: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: true,
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
showLabels: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: false,
|
|
19
|
-
},
|
|
20
|
-
isShowPass: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false,
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
async fetch() {
|
|
27
|
-
this.principal = this.$store.getters['rancher/byId'](NORMAN.PRINCIPAL, this.value);
|
|
28
|
-
|
|
29
|
-
if ( this.principal ) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const principalId = escape(this.value).replace(/\//g, '%2F');
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
this.principal = await this.$store.dispatch('rancher/find', {
|
|
37
|
-
type: NORMAN.PRINCIPAL,
|
|
38
|
-
id: this.value,
|
|
39
|
-
opt: { url: `/v3/principals/${ principalId }` }
|
|
40
|
-
});
|
|
41
|
-
} catch (e) {
|
|
42
|
-
console.error('Failed to fetch principal', this.value, principalId); // eslint-disable-line no-console
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
data() {
|
|
47
|
-
// Load from cache immediately if possible
|
|
48
|
-
return { principal: null };
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
computed: {
|
|
52
|
-
showBoth() {
|
|
53
|
-
const p = this.principal;
|
|
54
|
-
|
|
55
|
-
return p.name && p.loginName && p.name.trim().toLowerCase() !== p.loginName.trim().toLowerCase();
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<template>
|
|
62
|
-
<div
|
|
63
|
-
class="principal"
|
|
64
|
-
:class="{'showLabels': showLabels}"
|
|
65
|
-
>
|
|
66
|
-
<template v-if="!principal && $fetchState.pending">
|
|
67
|
-
<div class="avatar">
|
|
68
|
-
<div class="empty">
|
|
69
|
-
<i class="icon icon-spinner icon-lg" />
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
<div
|
|
73
|
-
v-clean-html="t('principal.loading', null, true)"
|
|
74
|
-
class="name"
|
|
75
|
-
:class="{'text-muted': useMuted}"
|
|
76
|
-
/>
|
|
77
|
-
<div class="description" />
|
|
78
|
-
</template>
|
|
79
|
-
|
|
80
|
-
<template v-else-if="principal">
|
|
81
|
-
<div class="avatar">
|
|
82
|
-
<img
|
|
83
|
-
src="@shell/assets/images/user.png"
|
|
84
|
-
>
|
|
85
|
-
</div>
|
|
86
|
-
<div
|
|
87
|
-
v-if="showLabels"
|
|
88
|
-
class="name"
|
|
89
|
-
>
|
|
90
|
-
<table>
|
|
91
|
-
<tr class="mb-10">
|
|
92
|
-
<td>{{ t('principal.name') }}: </td><td>{{ principal.name || principal.loginName }}</td>
|
|
93
|
-
</tr>
|
|
94
|
-
<tr class="mb-10">
|
|
95
|
-
<td>{{ t('principal.loginName') }}: </td><td>{{ principal.loginName }}</td>
|
|
96
|
-
</tr>
|
|
97
|
-
<tr
|
|
98
|
-
v-if="isShowPass"
|
|
99
|
-
class="mb-10"
|
|
100
|
-
>
|
|
101
|
-
<td>修改密码: </td><td>****** <slot name="edit" /></td>
|
|
102
|
-
</tr>
|
|
103
|
-
<tr><td>{{ t('principal.type') }}: </td><td>{{ principal.displayType }}</td></tr>
|
|
104
|
-
</table>
|
|
105
|
-
</div>
|
|
106
|
-
<template v-else>
|
|
107
|
-
<div class="name">
|
|
108
|
-
<template v-if="showBoth">
|
|
109
|
-
{{ principal.name }}
|
|
110
|
-
<span
|
|
111
|
-
v-if="principal.loginName"
|
|
112
|
-
:class="{'text-muted': useMuted}"
|
|
113
|
-
>({{ principal.loginName }})</span>
|
|
114
|
-
</template>
|
|
115
|
-
<template v-else-if="principal.name">
|
|
116
|
-
{{ principal.name }}
|
|
117
|
-
</template>
|
|
118
|
-
<template v-else>
|
|
119
|
-
{{ principal.loginName }}
|
|
120
|
-
</template>
|
|
121
|
-
</div>
|
|
122
|
-
<div
|
|
123
|
-
class="description"
|
|
124
|
-
:class="{'text-muted': useMuted}"
|
|
125
|
-
>
|
|
126
|
-
{{ principal.displayType }}
|
|
127
|
-
</div>
|
|
128
|
-
</template>
|
|
129
|
-
</template>
|
|
130
|
-
|
|
131
|
-
<template v-else>
|
|
132
|
-
<div class="avatar">
|
|
133
|
-
<div
|
|
134
|
-
class="empty"
|
|
135
|
-
:class="{'text-muted': useMuted}"
|
|
136
|
-
>
|
|
137
|
-
<i class="icon icon-warning icon-lg" />
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
<div
|
|
141
|
-
v-t="'principal.error'"
|
|
142
|
-
class="name text-error"
|
|
143
|
-
/>
|
|
144
|
-
<div
|
|
145
|
-
class="description"
|
|
146
|
-
:class="{'text-muted': useMuted}"
|
|
147
|
-
>
|
|
148
|
-
{{ value }}
|
|
149
|
-
</div>
|
|
150
|
-
</template>
|
|
151
|
-
</div>
|
|
152
|
-
</template>
|
|
153
|
-
|
|
154
|
-
<style lang="scss" scoped>
|
|
155
|
-
$size: 79px;
|
|
156
|
-
|
|
157
|
-
.principal {
|
|
158
|
-
display: grid;
|
|
159
|
-
grid-template-areas:
|
|
160
|
-
"avatar name"
|
|
161
|
-
"avatar description";
|
|
162
|
-
grid-template-columns: $size auto;
|
|
163
|
-
grid-template-rows: auto math.div($size, 2);
|
|
164
|
-
column-gap: 10px;
|
|
165
|
-
|
|
166
|
-
th {
|
|
167
|
-
text-align: left;
|
|
168
|
-
font-weight: normal;
|
|
169
|
-
padding-right: 10px;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
&.showLabels {
|
|
173
|
-
/* grid-template-areas:
|
|
174
|
-
"avatar name";
|
|
175
|
-
grid-template-columns: 60px auto;
|
|
176
|
-
grid-template-rows: 60px;
|
|
177
|
-
column-gap: 0; */
|
|
178
|
-
display: flex;
|
|
179
|
-
column-gap:0;
|
|
180
|
-
.name {
|
|
181
|
-
display: flex;
|
|
182
|
-
line-height: unset;
|
|
183
|
-
}
|
|
184
|
-
table tr {
|
|
185
|
-
display: block;
|
|
186
|
-
}
|
|
187
|
-
table tr td:not(:first-of-type) {
|
|
188
|
-
padding-left: 10px;
|
|
189
|
-
}
|
|
190
|
-
table tr td:not(:last-of-type) {
|
|
191
|
-
width: 100px;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.avatar {
|
|
196
|
-
/* grid-area: avatar;
|
|
197
|
-
text-align: center; */
|
|
198
|
-
width: 287px;
|
|
199
|
-
display: flex;
|
|
200
|
-
justify-content: center;
|
|
201
|
-
align-items: center;
|
|
202
|
-
|
|
203
|
-
DIV.empty {
|
|
204
|
-
border: 1px solid var(--border);
|
|
205
|
-
line-height: $size;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
IMG {
|
|
209
|
-
width: $size;
|
|
210
|
-
height: $size;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
DIV.round, IMG.round {
|
|
214
|
-
border-radius: 50%;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.name {
|
|
219
|
-
grid-area: name;
|
|
220
|
-
line-height: math.div($size, 2);
|
|
221
|
-
overflow-wrap: anywhere;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.description {
|
|
225
|
-
grid-area: description;
|
|
226
|
-
line-height: math.div($size, 2);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
</style>
|