dashboard-shell-shell 3.0.5-test.4 → 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 +27 -45
- 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 +6 -54
- package/assets/styles/themes/_dark.scss +0 -3
- package/assets/styles/themes/_light.scss +42 -63
- package/assets/styles/vendor/vue-select.scss +9 -22
- package/assets/translations/en-us.yaml +4 -28
- package/assets/translations/zh-hans.yaml +189 -376
- 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/CruResource.vue +8 -9
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +17 -29
- 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/ResourceDetail/Masthead/legacy.vue +38 -181
- package/components/ResourceDetail/legacy.vue +13 -29
- 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 +29 -47
- package/components/YamlEditor.vue +1 -0
- package/components/auth/Principal.vue +12 -36
- 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 +241 -212
- 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/UnitInput.vue +3 -8
- 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 +1 -1
- 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 +12 -74
- package/pages/auth/login.vue +51 -214
- package/pages/auth/setup.vue +19 -142
- package/pages/c/_cluster/_product/namespaces.vue +4 -4
- 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 +4 -6
- 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 +4 -9
- 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 -2
- 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/utils/errorTranslate.json +0 -1336
|
@@ -14,18 +14,6 @@ export default {
|
|
|
14
14
|
|
|
15
15
|
name: 'MastheadResourceList',
|
|
16
16
|
|
|
17
|
-
mounted() {
|
|
18
|
-
this.observeWidth()
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
beforeUnmount() {
|
|
22
|
-
if (this.resizeObserver) {
|
|
23
|
-
this.resizeObserver.disconnect()
|
|
24
|
-
this.resizeObserver = null
|
|
25
|
-
}
|
|
26
|
-
this.$store.commit('type-map/setActionsWidth', 0) // 销毁时清空或回到默认值
|
|
27
|
-
},
|
|
28
|
-
|
|
29
17
|
components: {
|
|
30
18
|
Favorite,
|
|
31
19
|
TypeDescription,
|
|
@@ -91,12 +79,7 @@ export default {
|
|
|
91
79
|
componentTestid: {
|
|
92
80
|
type: String,
|
|
93
81
|
default: 'masthead'
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
mainButtonVisible: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: true
|
|
99
|
-
},
|
|
82
|
+
}
|
|
100
83
|
},
|
|
101
84
|
|
|
102
85
|
data() {
|
|
@@ -112,16 +95,10 @@ export default {
|
|
|
112
95
|
query: { [AS]: _YAML },
|
|
113
96
|
};
|
|
114
97
|
|
|
115
|
-
const tabList = ['集群配置'];
|
|
116
|
-
|
|
117
|
-
const description = ''
|
|
118
98
|
return {
|
|
119
99
|
formRoute,
|
|
120
100
|
yamlRoute,
|
|
121
101
|
hasEditComponent,
|
|
122
|
-
tabList,
|
|
123
|
-
description,
|
|
124
|
-
resizeObserver: null
|
|
125
102
|
};
|
|
126
103
|
},
|
|
127
104
|
|
|
@@ -148,67 +125,6 @@ export default {
|
|
|
148
125
|
|
|
149
126
|
return this.$store.getters['type-map/labelFor'](this.schema, 99);
|
|
150
127
|
},
|
|
151
|
-
_descriptionDisplay() {
|
|
152
|
-
const key = this.$route.path.split('/').pop();
|
|
153
|
-
|
|
154
|
-
return this.$store.getters['i18n/t'](`typeDescription."${ key.toLowerCase() }"`);
|
|
155
|
-
},
|
|
156
|
-
demoDisplay() {
|
|
157
|
-
|
|
158
|
-
const product = this.$store.getters['productId'];
|
|
159
|
-
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation.params.resource);
|
|
160
|
-
const parts = productId?.split('::');
|
|
161
|
-
const newString = 'root';
|
|
162
|
-
|
|
163
|
-
// const product = this.$store.getters['productId'];
|
|
164
|
-
// const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation.params.resource);
|
|
165
|
-
|
|
166
|
-
// const parts = productId?.split('::') || [];
|
|
167
|
-
// const newString = 'root';
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
const breadcrumbList = {
|
|
171
|
-
'harvesterhci.io.management.cluster': {
|
|
172
|
-
origin: 'Harvester 集群',
|
|
173
|
-
bread: ['虚拟化管理'],
|
|
174
|
-
description: '提供虚拟化集群的实时健康状态监控、版本号管理及资源负载管理,支持批量导入/删除集群、配置调优与权限分级功能,实现高效运维管控。'
|
|
175
|
-
},
|
|
176
|
-
'management.cattle.io.user': {
|
|
177
|
-
origin: '用户',
|
|
178
|
-
bread: ['用户 & 认证'],
|
|
179
|
-
description: '用于管理用户账号,支持创建、维护用户信息,可设置用户权限、管理密码等,保障系统资源仅由授权用户访问,提升系统安全性。'
|
|
180
|
-
},
|
|
181
|
-
'management.cattle.io.setting':{
|
|
182
|
-
origin: '基础设置',
|
|
183
|
-
bread: ['全局设置'],
|
|
184
|
-
description: '统一配置平台基础选项与全局设置,支持CA证书、密码规则、域名、Token时效等核心配置。'
|
|
185
|
-
},
|
|
186
|
-
'management.cattle.io.feature':{
|
|
187
|
-
origin: '功能开关',
|
|
188
|
-
bread: ['全局设置'],
|
|
189
|
-
description: '还没有添加描述。。。。'
|
|
190
|
-
},
|
|
191
|
-
}
|
|
192
|
-
const resourcePath = this.$route.params.resource || ''
|
|
193
|
-
|
|
194
|
-
const breadcrumb = []
|
|
195
|
-
if (breadcrumbList[resourcePath] && Object.keys(breadcrumbList[resourcePath]).length > 0) {
|
|
196
|
-
breadcrumb.push(...breadcrumbList[resourcePath].bread)
|
|
197
|
-
this.description = breadcrumbList[resourcePath].description
|
|
198
|
-
return breadcrumb
|
|
199
|
-
} else {
|
|
200
|
-
if (!parts?.includes(newString)) {
|
|
201
|
-
parts?.unshift(newString); // 将字符串添加到数组第一位
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const partsEn = parts?.map((item) => {
|
|
205
|
-
return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
return partsEn;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
},
|
|
212
128
|
|
|
213
129
|
_isYamlCreatable() {
|
|
214
130
|
if ( this.isYamlCreatable !== null) {
|
|
@@ -249,176 +165,88 @@ export default {
|
|
|
249
165
|
|
|
250
166
|
return this.createButtonLabel || this.t('resourceList.head.create');
|
|
251
167
|
},
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
methods: {
|
|
255
|
-
observeWidth() {
|
|
256
|
-
const el = this.$refs.actionsContainer
|
|
257
|
-
if (!el) return
|
|
258
|
-
|
|
259
|
-
// 创建 ResizeObserver
|
|
260
|
-
this.resizeObserver = new ResizeObserver((entries) => {
|
|
261
|
-
for (const entry of entries) {
|
|
262
|
-
const width = entry?.contentRect?.width && entry.contentRect.width > 0 ? entry.contentRect.width + 10 : 0
|
|
263
|
-
|
|
264
|
-
console.log(width, ' width----------------------------')
|
|
265
|
-
|
|
266
|
-
this.$store.commit('type-map/setActionsWidth', width)
|
|
267
|
-
}
|
|
268
|
-
})
|
|
269
|
-
|
|
270
|
-
// 开始监听
|
|
271
|
-
this.resizeObserver.observe(el)
|
|
272
|
-
}
|
|
273
168
|
}
|
|
274
169
|
};
|
|
275
170
|
</script>
|
|
276
171
|
|
|
277
172
|
<template>
|
|
278
173
|
<header class="with-subheader">
|
|
279
|
-
<
|
|
280
|
-
<
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
174
|
+
<slot name="typeDescription">
|
|
175
|
+
<TypeDescription :resource="resource" />
|
|
176
|
+
</slot>
|
|
177
|
+
<div class="title">
|
|
178
|
+
<h1 class="m-0">
|
|
179
|
+
<TabTitle>{{ _typeDisplay }}</TabTitle> <Favorite
|
|
180
|
+
v-if="isExplorer"
|
|
181
|
+
:resource="favoriteResource || resource"
|
|
182
|
+
/>
|
|
183
|
+
</h1>
|
|
184
|
+
<ResourceLoadingIndicator
|
|
185
|
+
v-if="showIncrementalLoadingIndicator"
|
|
186
|
+
:resources="loadResources"
|
|
187
|
+
:indeterminate="loadIndeterminate"
|
|
188
|
+
/>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="sub-header">
|
|
191
|
+
<slot name="subHeader">
|
|
192
|
+
<!--Slot content-->
|
|
193
|
+
</slot>
|
|
194
|
+
</div>
|
|
195
|
+
<div class="actions-container">
|
|
196
|
+
<slot name="actions">
|
|
197
|
+
<div class="actions">
|
|
198
|
+
<slot name="extraActions" />
|
|
199
|
+
|
|
200
|
+
<slot name="createButton">
|
|
201
|
+
<router-link
|
|
202
|
+
v-if="hasEditComponent && _isCreatable"
|
|
203
|
+
:to="_createLocation"
|
|
204
|
+
class="btn role-primary"
|
|
205
|
+
:data-testid="componentTestid+'-create'"
|
|
206
|
+
>
|
|
207
|
+
{{ _createButtonlabel }}
|
|
208
|
+
</router-link>
|
|
209
|
+
<router-link
|
|
210
|
+
v-else-if="_isYamlCreatable"
|
|
211
|
+
:to="_yamlCreateLocation"
|
|
212
|
+
class="btn role-primary"
|
|
213
|
+
:data-testid="componentTestid+'-create-yaml'"
|
|
287
214
|
>
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
<span class="excram-last-name">{{ _typeDisplay }}</span>
|
|
292
|
-
</div>
|
|
293
|
-
<h1 style="display: flex;align-items: center;" class="m-0 descrip-name">
|
|
294
|
-
<TabTitle>{{ _typeDisplay }}</TabTitle>
|
|
295
|
-
<!-- 子标题区域 -->
|
|
296
|
-
<div class="sub-header">
|
|
297
|
-
<slot name="subHeader">
|
|
298
|
-
<!--Slot content-->
|
|
299
|
-
</slot>
|
|
300
|
-
</div>
|
|
301
|
-
|
|
302
|
-
<!-- <Favorite
|
|
303
|
-
v-if="isExplorer"
|
|
304
|
-
:resource="favoriteResource || resource"
|
|
305
|
-
/> -->
|
|
306
|
-
|
|
307
|
-
<ResourceLoadingIndicator
|
|
308
|
-
style="margin-left: 10px;"
|
|
309
|
-
v-if="showIncrementalLoadingIndicator"
|
|
310
|
-
:resources="loadResources"
|
|
311
|
-
:indeterminate="loadIndeterminate"
|
|
312
|
-
/>
|
|
313
|
-
</h1>
|
|
314
|
-
|
|
315
|
-
<!-- 插槽:typeDescription,用于插入类型描述组件 -->
|
|
316
|
-
<div v-if="_descriptionDisplay" class="masthod-title-description">
|
|
317
|
-
{{ _descriptionDisplay }}
|
|
318
|
-
</div>
|
|
319
|
-
|
|
215
|
+
{{ t("resourceList.head.createFromYaml") }}
|
|
216
|
+
</router-link>
|
|
217
|
+
</slot>
|
|
320
218
|
</div>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
</div>
|
|
324
|
-
|
|
325
|
-
<!-- 操作按钮区域 -->
|
|
326
|
-
<div
|
|
327
|
-
ref="actionsContainer"
|
|
328
|
-
v-if="!(tabList.includes(_typeDisplay)) && mainButtonVisible"
|
|
329
|
-
class="actions-container actions-positioning"
|
|
330
|
-
style="min-height: 32px;align-self: flex-end;"
|
|
331
|
-
>
|
|
332
|
-
<slot name="actions">
|
|
333
|
-
<div class="actions">
|
|
334
|
-
<slot name="extraActions" />
|
|
335
|
-
|
|
336
|
-
<slot name="createButton">
|
|
337
|
-
<router-link
|
|
338
|
-
v-if="hasEditComponent && _isCreatable"
|
|
339
|
-
:to="_createLocation"
|
|
340
|
-
class="btn role-primary"
|
|
341
|
-
:data-testid="componentTestid+'-create'"
|
|
342
|
-
>
|
|
343
|
-
{{ _createButtonlabel }}
|
|
344
|
-
</router-link>
|
|
345
|
-
<router-link
|
|
346
|
-
v-else-if="_isYamlCreatable"
|
|
347
|
-
:to="_yamlCreateLocation"
|
|
348
|
-
class="btn role-primary"
|
|
349
|
-
:data-testid="componentTestid+'-create-yaml'"
|
|
350
|
-
>
|
|
351
|
-
{{ t("resourceList.head.createFromYaml") }}
|
|
352
|
-
</router-link>
|
|
353
|
-
</slot>
|
|
354
|
-
</div>
|
|
355
|
-
</slot>
|
|
356
|
-
</div>
|
|
219
|
+
</slot>
|
|
357
220
|
</div>
|
|
358
|
-
<div
|
|
359
|
-
v-if="!(tabList.includes(_typeDisplay))"
|
|
360
|
-
style="width: 110%;height: 1px;background-color: #D7D7D7;margin-top: 16px;margin-left: -20px;margin-right: -20px;"
|
|
361
|
-
/>
|
|
362
221
|
</header>
|
|
363
222
|
</template>
|
|
364
223
|
|
|
365
224
|
<style lang="scss" scoped>
|
|
366
225
|
.title {
|
|
367
|
-
|
|
368
|
-
display: flex;
|
|
226
|
+
align-items: center;
|
|
227
|
+
display: flex;
|
|
369
228
|
h1 {
|
|
370
229
|
margin: 0;
|
|
371
230
|
}
|
|
372
231
|
}
|
|
373
232
|
|
|
374
233
|
header {
|
|
375
|
-
|
|
234
|
+
margin-bottom: 20px;
|
|
376
235
|
}
|
|
377
236
|
|
|
378
237
|
header.with-subheader {
|
|
379
|
-
|
|
238
|
+
grid-template-areas:
|
|
380
239
|
'type-banner type-banner'
|
|
381
240
|
'title actions'
|
|
382
241
|
'sub-header sub-header'
|
|
383
|
-
'state-banner state-banner';
|
|
384
|
-
position: relative;
|
|
385
|
-
display: flex;
|
|
386
|
-
margin-bottom: 16px;
|
|
387
|
-
flex-direction: column;
|
|
388
|
-
}
|
|
389
|
-
.excram-list{
|
|
390
|
-
font-size: 14px;
|
|
391
|
-
line-height: 22px;
|
|
392
|
-
margin-bottom: 20px;
|
|
393
|
-
font-family: 'Microsoft YaHei';
|
|
394
|
-
}
|
|
395
|
-
.excram-last-name{
|
|
396
|
-
color: var(--primary);
|
|
397
|
-
}
|
|
398
|
-
.descrip-name{
|
|
399
|
-
font-size: 26px;
|
|
400
|
-
font-family: 'Microsoft YaHei';
|
|
401
|
-
}
|
|
402
|
-
.masthod-title-description{
|
|
403
|
-
font-family: 'Microsoft YaHei';
|
|
404
|
-
margin-top: 20px;
|
|
405
|
-
}
|
|
406
|
-
.actions-container{
|
|
407
|
-
/* display: flex; */
|
|
408
|
-
/* margin-left: 0px; */
|
|
242
|
+
'state-banner state-banner';
|
|
409
243
|
}
|
|
410
244
|
|
|
411
245
|
.sub-header {
|
|
412
|
-
|
|
413
|
-
margin-left: 5px;
|
|
414
|
-
.btn {
|
|
415
|
-
text-align: left !important;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
246
|
+
grid-area: sub-header;
|
|
418
247
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
z-index: 20;
|
|
248
|
+
a {
|
|
249
|
+
display: inline-block;
|
|
250
|
+
}
|
|
423
251
|
}
|
|
424
252
|
</style>
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
<template>
|
|
78
78
|
<div
|
|
79
79
|
v-if="count && !haveAll"
|
|
80
|
-
class="resource-loading-indicator"
|
|
80
|
+
class="ml-10 resource-loading-indicator"
|
|
81
81
|
>
|
|
82
82
|
<div class="inner">
|
|
83
83
|
<div class="resource-loader">
|
|
@@ -118,12 +118,10 @@ export default {
|
|
|
118
118
|
.resource-loader {
|
|
119
119
|
padding: 1px 10px;
|
|
120
120
|
width: max-content;
|
|
121
|
-
height: 20px;
|
|
122
121
|
|
|
123
122
|
.rl-fg, .rl-bg {
|
|
124
|
-
display: flex;
|
|
125
123
|
align-content: center;
|
|
126
|
-
|
|
124
|
+
display: flex;
|
|
127
125
|
|
|
128
126
|
> i {
|
|
129
127
|
font-size: 18px;
|
|
@@ -131,7 +129,6 @@ export default {
|
|
|
131
129
|
}
|
|
132
130
|
|
|
133
131
|
> span {
|
|
134
|
-
margin-top: 2px;
|
|
135
132
|
margin-left: 5px;
|
|
136
133
|
}
|
|
137
134
|
}
|
|
@@ -55,12 +55,6 @@ export default {
|
|
|
55
55
|
],
|
|
56
56
|
|
|
57
57
|
props: {
|
|
58
|
-
searchPlaceholder: {
|
|
59
|
-
// search框内的输入提示
|
|
60
|
-
type: String,
|
|
61
|
-
default: '名称'
|
|
62
|
-
},
|
|
63
|
-
|
|
64
58
|
schema: {
|
|
65
59
|
type: Object,
|
|
66
60
|
default: null,
|
|
@@ -264,10 +258,6 @@ export default {
|
|
|
264
258
|
},
|
|
265
259
|
|
|
266
260
|
computed: {
|
|
267
|
-
actionsWidth() {
|
|
268
|
-
return this.$store.getters['type-map/actionsWidth'] // 从 getter 里拿
|
|
269
|
-
},
|
|
270
|
-
|
|
271
261
|
options() {
|
|
272
262
|
return this.$store.getters[`type-map/optionsFor`](this.schema, this.externalPaginationEnabled);
|
|
273
263
|
},
|
|
@@ -464,11 +454,6 @@ export default {
|
|
|
464
454
|
const namespaceGroupable = this.$store.getters['isMultipleNamespaces'] && this.isNamespaced;
|
|
465
455
|
const customGroupable = !!this.options?.listGroups?.length;
|
|
466
456
|
|
|
467
|
-
// sshkey去掉分组按钮
|
|
468
|
-
if(this.parsedPagingParams.singularLabel === 'SSH Key' || this.parsedPagingParams.singularLabel === '负载均衡器'){
|
|
469
|
-
return false
|
|
470
|
-
}
|
|
471
|
-
|
|
472
457
|
return namespaceGroupable || customGroupable || this.groupOptions?.length;
|
|
473
458
|
}
|
|
474
459
|
|
|
@@ -632,7 +617,6 @@ export default {
|
|
|
632
617
|
:headers="_headers"
|
|
633
618
|
:rows="filteredRows"
|
|
634
619
|
:loading="loading"
|
|
635
|
-
:search-placeholder="searchPlaceholder"
|
|
636
620
|
:alt-loading="altLoading"
|
|
637
621
|
:group-by="computedGroupBy"
|
|
638
622
|
:group="group"
|
|
@@ -662,11 +646,6 @@ export default {
|
|
|
662
646
|
@group-value-change="group = $event"
|
|
663
647
|
@enter="handleEnterKeyPress"
|
|
664
648
|
>
|
|
665
|
-
|
|
666
|
-
<template #search-main-button>
|
|
667
|
-
<div :style="{ width: actionsWidth + 'px' }"></div>
|
|
668
|
-
</template>
|
|
669
|
-
|
|
670
649
|
<template
|
|
671
650
|
v-if="showGrouping && _groupOptions.length > 1"
|
|
672
651
|
#header-middle
|
|
@@ -676,7 +655,6 @@ export default {
|
|
|
676
655
|
<ButtonGroup
|
|
677
656
|
v-model:value="group"
|
|
678
657
|
:options="_groupOptions"
|
|
679
|
-
v-if="parsedPagingParams.singularLabel !== 'PCI设备'"
|
|
680
658
|
/>
|
|
681
659
|
</template>
|
|
682
660
|
|
|
@@ -729,11 +707,11 @@ export default {
|
|
|
729
707
|
class="hide"
|
|
730
708
|
@shortkey="keyAction('edit')"
|
|
731
709
|
/>
|
|
732
|
-
|
|
710
|
+
<button
|
|
733
711
|
v-shortkey.once="['y']"
|
|
734
712
|
class="hide"
|
|
735
713
|
@shortkey="keyAction('yaml')"
|
|
736
|
-
/>
|
|
714
|
+
/>
|
|
737
715
|
<button
|
|
738
716
|
v-if="_showBulkActions"
|
|
739
717
|
v-shortkey.once="['del']"
|
package/components/SideNav.vue
CHANGED
|
@@ -20,9 +20,6 @@ import { TYPE_MODES } from '@shell/store/type-map';
|
|
|
20
20
|
import { NAME as NAVLINKS } from '@shell/config/product/navlinks';
|
|
21
21
|
import Group from '@shell/components/nav/Group';
|
|
22
22
|
import LocaleSelector from '@shell/components/LocaleSelector';
|
|
23
|
-
import { cloud2harvesterhci, harvester2cloud } from '@shell/utils/router';
|
|
24
|
-
import { NORMAN } from '@shell/config/types';
|
|
25
|
-
|
|
26
23
|
|
|
27
24
|
export default {
|
|
28
25
|
name: 'SideNav',
|
|
@@ -115,14 +112,10 @@ export default {
|
|
|
115
112
|
|
|
116
113
|
computed: {
|
|
117
114
|
...mapState(['managementReady', 'clusterReady']),
|
|
118
|
-
...mapGetters(['isStandaloneHarvester', 'productId', 'clusterId', 'currentProduct', 'rootProduct', '
|
|
115
|
+
...mapGetters(['isStandaloneHarvester', 'productId', 'clusterId', 'currentProduct', 'rootProduct', 'isSingleProduct', 'namespaceMode', 'isExplorer', 'isVirtualCluster']),
|
|
119
116
|
...mapGetters({ locale: 'i18n/selectedLocaleLabel', hasMultipleLocales: 'i18n/hasMultipleLocales' }),
|
|
120
117
|
...mapGetters('type-map', ['activeProducts']),
|
|
121
118
|
|
|
122
|
-
principal() {
|
|
123
|
-
return this.$store.getters['rancher/byId'](NORMAN.PRINCIPAL, this.$store.getters['auth/principalId']) || {};
|
|
124
|
-
},
|
|
125
|
-
|
|
126
119
|
favoriteTypes: mapPref(FAVORITE_TYPES),
|
|
127
120
|
|
|
128
121
|
supportLink() {
|
|
@@ -191,12 +184,6 @@ export default {
|
|
|
191
184
|
allNavLinksIds() {
|
|
192
185
|
return this.allNavLinks.map((a) => a.id);
|
|
193
186
|
},
|
|
194
|
-
|
|
195
|
-
prod() {
|
|
196
|
-
const name = this.rootProduct.name;
|
|
197
|
-
|
|
198
|
-
return this.$store.getters['i18n/withFallback'](`product."${ name }"`, null, ucFirst(name));
|
|
199
|
-
},
|
|
200
187
|
},
|
|
201
188
|
|
|
202
189
|
methods: {
|
|
@@ -244,32 +231,9 @@ export default {
|
|
|
244
231
|
|
|
245
232
|
replaceWith(this.groups, ...sortBy(out, ['weight:desc', 'label']));
|
|
246
233
|
|
|
247
|
-
// if (this.principal.loginName !== 'admin') {
|
|
248
|
-
// // 递归过滤函数(根据 label)
|
|
249
|
-
// this.groups = this.filterMenus(this.groups);
|
|
250
|
-
// }
|
|
251
|
-
|
|
252
|
-
|
|
253
234
|
this.gettingGroups = false;
|
|
254
235
|
},
|
|
255
236
|
|
|
256
|
-
// filterMenus(menus) {
|
|
257
|
-
// return menus
|
|
258
|
-
// .filter(item => item.label !== 'RBAC') // 过滤掉顶层 RBAC
|
|
259
|
-
// .map(item => {
|
|
260
|
-
// let newItem = { ...item };
|
|
261
|
-
// if (newItem.children) {
|
|
262
|
-
// // 过滤掉 children 里的 "资源大盘"
|
|
263
|
-
// newItem.children = newItem.children.filter(
|
|
264
|
-
// child => child.label !== '资源大盘'
|
|
265
|
-
// );
|
|
266
|
-
// // 递归处理剩下的 children
|
|
267
|
-
// newItem.children = filterMenus(newItem.children);
|
|
268
|
-
// }
|
|
269
|
-
// return newItem;
|
|
270
|
-
// });
|
|
271
|
-
// },
|
|
272
|
-
|
|
273
237
|
getProductsGroups(out, loadProducts, namespaceMode, productMap) {
|
|
274
238
|
const clusterId = this.$store.getters['clusterId'];
|
|
275
239
|
const currentType = this.$route.params.resource || '';
|
|
@@ -435,37 +399,30 @@ export default {
|
|
|
435
399
|
role="navigation"
|
|
436
400
|
:aria-label="t('nav.ariaLabel.sideNav')"
|
|
437
401
|
>
|
|
438
|
-
<div class="side-all-title">
|
|
439
|
-
{{ prod == 'Cloud' && currentCluster ? '控制台' : prod }}
|
|
440
|
-
</div>
|
|
441
|
-
|
|
442
402
|
<!-- Actual nav -->
|
|
443
403
|
<div class="nav">
|
|
444
404
|
<template
|
|
445
|
-
|
|
446
|
-
|
|
405
|
+
v-for="(g) in groups"
|
|
406
|
+
:key="g.name"
|
|
447
407
|
>
|
|
448
|
-
<
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
@selected="groupSelected($event)"
|
|
459
|
-
@expand="groupSelected($event)"
|
|
460
|
-
/>
|
|
461
|
-
</template>
|
|
408
|
+
<Group
|
|
409
|
+
ref="groups"
|
|
410
|
+
id-prefix=""
|
|
411
|
+
class="package"
|
|
412
|
+
:group="g"
|
|
413
|
+
:can-collapse="!g.isRoot"
|
|
414
|
+
:show-header="!g.isRoot"
|
|
415
|
+
@selected="groupSelected($event)"
|
|
416
|
+
@expand="groupSelected($event)"
|
|
417
|
+
/>
|
|
462
418
|
</template>
|
|
463
419
|
</div>
|
|
464
420
|
<!-- SideNav footer area (seems to be tied to harvester) -->
|
|
465
|
-
|
|
421
|
+
<div
|
|
466
422
|
v-if="showProductFooter"
|
|
467
423
|
class="footer"
|
|
468
424
|
>
|
|
425
|
+
<!-- support link -->
|
|
469
426
|
<router-link
|
|
470
427
|
:to="supportLink"
|
|
471
428
|
class="pull-right"
|
|
@@ -474,6 +431,7 @@ export default {
|
|
|
474
431
|
>
|
|
475
432
|
{{ t('nav.support', {hasSupport: true}) }}
|
|
476
433
|
</router-link>
|
|
434
|
+
<!-- version number -->
|
|
477
435
|
<span
|
|
478
436
|
v-clean-tooltip="{content: displayVersion, placement: 'top'}"
|
|
479
437
|
class="clip version text-muted"
|
|
@@ -481,14 +439,15 @@ export default {
|
|
|
481
439
|
{{ displayVersion }}
|
|
482
440
|
</span>
|
|
483
441
|
|
|
442
|
+
<!-- locale selector -->
|
|
484
443
|
<LocaleSelector
|
|
485
444
|
v-if="isSingleProduct && hasMultipleLocales && !isStandaloneHarvester"
|
|
486
445
|
mode="login"
|
|
487
446
|
:show-icon="false"
|
|
488
447
|
/>
|
|
489
|
-
</div>
|
|
448
|
+
</div>
|
|
490
449
|
<!-- SideNav footer alternative -->
|
|
491
|
-
|
|
450
|
+
<div
|
|
492
451
|
v-else
|
|
493
452
|
class="version text-muted flex"
|
|
494
453
|
>
|
|
@@ -509,14 +468,13 @@ export default {
|
|
|
509
468
|
(Harvester-{{ harvesterVersion }})
|
|
510
469
|
</span>
|
|
511
470
|
</template>
|
|
512
|
-
</div>
|
|
471
|
+
</div>
|
|
513
472
|
</nav>
|
|
514
473
|
</template>
|
|
515
474
|
|
|
516
475
|
<style lang="scss" scoped>
|
|
517
476
|
.side-nav {
|
|
518
477
|
display: flex;
|
|
519
|
-
z-index: 10;
|
|
520
478
|
flex-direction: column;
|
|
521
479
|
.nav {
|
|
522
480
|
flex: 1;
|
|
@@ -536,9 +494,6 @@ export default {
|
|
|
536
494
|
|
|
537
495
|
A { padding-left: 0; }
|
|
538
496
|
}
|
|
539
|
-
:deep() A:not(.menuRouterLink){
|
|
540
|
-
height: 50px;
|
|
541
|
-
}
|
|
542
497
|
|
|
543
498
|
.tools {
|
|
544
499
|
display: flex;
|
|
@@ -614,13 +569,4 @@ export default {
|
|
|
614
569
|
display: flex;
|
|
615
570
|
}
|
|
616
571
|
|
|
617
|
-
|
|
618
|
-
.side-all-title{
|
|
619
|
-
height: 50px;
|
|
620
|
-
line-height: 50px;
|
|
621
|
-
font-size: 16px;
|
|
622
|
-
color: #7f7f7f;
|
|
623
|
-
padding-left: 21px;
|
|
624
|
-
font-weight: bold;
|
|
625
|
-
}
|
|
626
572
|
</style>
|