dashboard-shell-shell 1.0.1000000117 → 1.0.1000000118
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/styles/base/_functions.scss +0 -0
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/global/_button.scss +10 -17
- package/assets/styles/global/_form.scss +2 -2
- package/assets/styles/global/_labeled-input.scss +2 -6
- package/assets/styles/global/_select.scss +7 -6
- package/assets/styles/global/_table.scss +2 -3
- package/assets/styles/global/_tooltip.scss +1 -8
- package/assets/styles/themes/_dark.scss +0 -2
- package/assets/styles/themes/_light.scss +2 -5
- package/assets/styles/vendor/vue-select.scss +1 -2
- package/assets/translations/en-us.yaml +3 -1
- package/assets/translations/zh-hans.yaml +28 -51
- package/components/ActionDropdown.vue +0 -1
- package/components/ActionMenuShell.vue +3 -6
- package/components/BrandImage.vue +0 -22
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +0 -1
- package/components/CruResource.vue +1 -1
- package/components/CruResourceFooter.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +24 -4
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/IndentedPanel.vue +10 -4
- package/components/PromptRemove.vue +3 -3
- package/components/ResourceDetail/Masthead.vue +242 -190
- package/components/ResourceDetail/index.vue +5 -20
- package/components/ResourceList/Masthead.vue +84 -146
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +1 -76
- package/components/SideNav.vue +29 -66
- package/components/SortableTable/THead.vue +0 -6
- package/components/SortableTable/index.vue +388 -481
- package/components/Tabbed/index.vue +5 -4
- package/components/auth/Principal.vue +2 -3
- package/components/auth/RoleDetailEdit.vue +5 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/BannerSettings.vue +16 -18
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +1 -1
- package/components/form/InputWithSelect.vue +0 -2
- package/components/form/KeyValue.vue +7 -31
- package/components/form/LabeledSelect.vue +178 -178
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +11 -24
- package/components/form/Password.vue +2 -6
- package/components/form/ResourceQuota/Namespace.vue +1 -1
- package/components/form/ResourceQuota/NamespaceRow.vue +10 -13
- package/components/form/ResourceQuota/ProjectRow.vue +1 -0
- package/components/form/Select.vue +2 -2
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +23 -69
- package/components/nav/Header.vue +17 -82
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +3 -0
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +11 -48
- package/components/rancherResourceDetail/Masthead.vue +769 -0
- package/components/rancherResourceDetail/__tests__/Masthead.test.ts +65 -0
- package/components/rancherResourceDetail/index.vue +591 -0
- package/components/rancherResourceList/Masthead.vue +375 -0
- package/components/rancherResourceList/ResourceLoadingIndicator.vue +140 -0
- package/components/rancherResourceList/index.vue +307 -0
- package/components/rancherResourceList/resource-list.config.js +7 -0
- package/components/rancherResourceTable.vue +783 -0
- package/components/rancherSortableTable/THead.vue +561 -0
- package/components/rancherSortableTable/actions.js +153 -0
- package/components/rancherSortableTable/advanced-filtering.js +272 -0
- package/components/rancherSortableTable/debug.js +117 -0
- package/components/rancherSortableTable/filtering.js +290 -0
- package/components/rancherSortableTable/grouping.js +48 -0
- package/components/rancherSortableTable/index.vue +2712 -0
- package/components/rancherSortableTable/paging.js +155 -0
- package/components/rancherSortableTable/selection.js +629 -0
- package/components/rancherSortableTable/sortable-config.ts +4 -0
- package/components/rancherSortableTable/sorting.js +129 -0
- package/composables/useClickOutside.ts +1 -1
- package/config/product/auth.js +7 -16
- package/config/product/explorer.js +1 -1
- package/config/product/settings.js +8 -17
- package/config/settings.ts +0 -28
- package/edit/management.cattle.io.user.vue +4 -17
- package/edit/networking.k8s.io.ingress/RulePath.vue +1 -1
- package/edit/token.vue +1 -1
- package/list/harvesterhci.io.management.cluster.vue +0 -17
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +14 -25
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/auth/login.vue +29 -84
- package/pages/c/_cluster/auth/roles/index.vue +14 -61
- package/pages/c/_cluster/settings/banners.vue +101 -174
- package/pages/c/_cluster/settings/brand.vue +301 -348
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +21 -70
- package/pages/prefs.vue +23 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/scripts/clean +0 -0
- package/scripts/extension/bundle +0 -0
- package/scripts/extension/helm/scripts/package +0 -0
- package/scripts/extension/helm/scripts/patch +0 -0
- package/scripts/extension/helm/scripts/version +0 -0
- package/scripts/extension/helmpatch +0 -0
- package/scripts/extension/parse-tag-name +0 -0
- package/scripts/extension/publish +0 -0
- package/scripts/publish-shell.sh +60 -86
- package/scripts/serve-pkgs +0 -0
- package/scripts/sync-shell-deps +0 -0
- package/scripts/typegen.sh +28 -44
- package/store/i18n.js +5 -5
- package/store/prefs.js +5 -17
- package/store/type-map.js +1 -2
- package/types/cloud-shell/index.d.ts +11014 -0
- package/types/shell/index.d.ts +1 -1
- package/utils/error.js +0 -4
- package/utils/router.js +3 -3
- package/vue.config.js +6 -1
- package/assets/images/action.svg +0 -6
- package/assets/images/pl/logo.png +0 -0
- /package/components/{ResourceList → rancherResourceList}/Masthead-btn.vue +0 -0
|
@@ -80,12 +80,7 @@ export default {
|
|
|
80
80
|
componentTestid: {
|
|
81
81
|
type: String,
|
|
82
82
|
default: 'masthead'
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
mainButtonVisible: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: true
|
|
88
|
-
},
|
|
83
|
+
}
|
|
89
84
|
},
|
|
90
85
|
|
|
91
86
|
data() {
|
|
@@ -104,14 +99,11 @@ export default {
|
|
|
104
99
|
};
|
|
105
100
|
|
|
106
101
|
const tabList = ['集群配置'];
|
|
107
|
-
|
|
108
|
-
const description = ''
|
|
109
102
|
return {
|
|
110
103
|
formRoute,
|
|
111
104
|
yamlRoute,
|
|
112
105
|
hasEditComponent,
|
|
113
106
|
tabList,
|
|
114
|
-
description
|
|
115
107
|
};
|
|
116
108
|
},
|
|
117
109
|
|
|
@@ -136,61 +128,31 @@ export default {
|
|
|
136
128
|
return '?';
|
|
137
129
|
}
|
|
138
130
|
|
|
131
|
+
// console.log(this.$store.getters['type-map/labelFor'](this.schema, 99), ' type-map/labelFor---------------')
|
|
132
|
+
|
|
139
133
|
return this.$store.getters['type-map/labelFor'](this.schema, 99);
|
|
140
134
|
},
|
|
141
135
|
_descriptionDisplay() {
|
|
142
|
-
const key = this.$route.path.split('/'
|
|
136
|
+
const key = this.$route.path.split('/'.pop());
|
|
143
137
|
|
|
144
138
|
return this.$store.getters['i18n/t'](`typeDescription."${ key.toLowerCase() }"`);
|
|
145
139
|
},
|
|
146
140
|
demoDisplay() {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
// parts.unshift(newString); // 将字符串添加到数组第一位
|
|
155
|
-
// }
|
|
156
|
-
|
|
157
|
-
// const partsEn = parts.map((item) => {
|
|
158
|
-
// return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
159
|
-
// });
|
|
160
|
-
|
|
161
|
-
// return partsEn;
|
|
162
|
-
|
|
163
|
-
const breadcrumbList = {
|
|
164
|
-
'harvesterhci.io.management.cluster': {
|
|
165
|
-
origin: 'Harvester 集群',
|
|
166
|
-
bread: ['虚拟化管理'],
|
|
167
|
-
description: '提供虚拟化集群的实时健康状态监控、版本号管理及资源负载管理,支持批量导入/删除集群、配置调优与权限分级功能,实现高效运维管控。'
|
|
168
|
-
},
|
|
169
|
-
'management.cattle.io.user': {
|
|
170
|
-
origin: '用户',
|
|
171
|
-
bread: ['用户 & 认证'],
|
|
172
|
-
description: '用于管理用户账号,支持创建、维护用户信息,可设置用户权限、管理密码等,保障系统资源仅由授权用户访问,提升系统安全性。'
|
|
173
|
-
},
|
|
174
|
-
'management.cattle.io.setting':{
|
|
175
|
-
origin: '基础设置',
|
|
176
|
-
bread: ['全局设置'],
|
|
177
|
-
description: '统一配置平台基础选项与全局设置,支持CA证书、密码规则、域名、Token时效等核心配置。'
|
|
178
|
-
},
|
|
179
|
-
'management.cattle.io.feature':{
|
|
180
|
-
origin: '功能开关',
|
|
181
|
-
bread: ['全局设置'],
|
|
182
|
-
description: '还没有添加描述。。。。'
|
|
183
|
-
},
|
|
184
|
-
}
|
|
185
|
-
const resourcePath = this.$route.params.resource || ''
|
|
186
|
-
|
|
187
|
-
const breadcrumb = []
|
|
188
|
-
if (breadcrumbList[resourcePath] && Object.keys(breadcrumbList[resourcePath]).length > 0) {
|
|
189
|
-
breadcrumb.push(...breadcrumbList[resourcePath].bread)
|
|
190
|
-
this.description = breadcrumbList[resourcePath].description
|
|
141
|
+
const product = this.$store.getters['productId'];
|
|
142
|
+
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation.params.resource);
|
|
143
|
+
const parts = productId?.split('::');
|
|
144
|
+
const newString = 'root';
|
|
145
|
+
|
|
146
|
+
if (!parts.includes(newString)) {
|
|
147
|
+
parts.unshift(newString); // 将字符串添加到数组第一位
|
|
191
148
|
}
|
|
192
149
|
|
|
193
|
-
|
|
150
|
+
const partsEn = parts.map((item) => {
|
|
151
|
+
return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
return partsEn;
|
|
155
|
+
// return this.$store.getters['i18n/t'](`typeLabel."${ productId.toLowerCase() }"`)
|
|
194
156
|
},
|
|
195
157
|
|
|
196
158
|
_isYamlCreatable() {
|
|
@@ -231,95 +193,80 @@ export default {
|
|
|
231
193
|
</script>
|
|
232
194
|
|
|
233
195
|
<template>
|
|
234
|
-
<!-- 顶部 header,带有子标题(subheader)样式类 -->
|
|
235
196
|
<header class="with-subheader">
|
|
236
|
-
<
|
|
237
|
-
<
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</div>
|
|
250
|
-
<h1 style="display: flex;align-items: center;" class="m-0 descrip-name">
|
|
251
|
-
<TabTitle>{{ _typeDisplay }}</TabTitle>
|
|
252
|
-
<!-- 子标题区域 -->
|
|
253
|
-
<div class="sub-header">
|
|
254
|
-
<slot name="subHeader">
|
|
255
|
-
<!--Slot content-->
|
|
256
|
-
</slot>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
<!-- <Favorite
|
|
260
|
-
v-if="isExplorer"
|
|
261
|
-
:resource="favoriteResource || resource"
|
|
262
|
-
/> -->
|
|
263
|
-
|
|
264
|
-
<ResourceLoadingIndicator
|
|
265
|
-
style="margin-left: 10px;"
|
|
266
|
-
v-if="showIncrementalLoadingIndicator"
|
|
267
|
-
:resources="loadResources"
|
|
268
|
-
:indeterminate="loadIndeterminate"
|
|
269
|
-
/>
|
|
270
|
-
</h1>
|
|
271
|
-
|
|
272
|
-
<!-- 插槽:typeDescription,用于插入类型描述组件 -->
|
|
273
|
-
<div v-if="description" class="masthod-title-description">
|
|
274
|
-
{{ description }}
|
|
275
|
-
</div>
|
|
276
|
-
|
|
277
|
-
</div>
|
|
278
|
-
|
|
279
|
-
|
|
197
|
+
<!-- <slot name="typeDescription">
|
|
198
|
+
<TypeDescription :resource="resource" />
|
|
199
|
+
</slot> -->
|
|
200
|
+
<div class="title">
|
|
201
|
+
<div class="excram-list">
|
|
202
|
+
<span
|
|
203
|
+
v-for="(item,index) in demoDisplay"
|
|
204
|
+
:key="index"
|
|
205
|
+
>
|
|
206
|
+
<span>{{ item }}</span>
|
|
207
|
+
<span>/</span>
|
|
208
|
+
</span>
|
|
209
|
+
<span class="excram-last-name">{{ _typeDisplay }}</span>
|
|
280
210
|
</div>
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
<slot name="extraActions" />
|
|
291
|
-
|
|
292
|
-
<slot name="createButton">
|
|
293
|
-
<router-link
|
|
294
|
-
v-if="hasEditComponent && _isCreatable"
|
|
295
|
-
:to="_createLocation"
|
|
296
|
-
class="btn role-primary"
|
|
297
|
-
:data-testid="componentTestid+'-create'"
|
|
298
|
-
>
|
|
299
|
-
{{ _createButtonlabel }}
|
|
300
|
-
</router-link>
|
|
301
|
-
<router-link
|
|
302
|
-
v-else-if="_isYamlCreatable"
|
|
303
|
-
:to="_yamlCreateLocation"
|
|
304
|
-
class="btn role-primary"
|
|
305
|
-
:data-testid="componentTestid+'-create-yaml'"
|
|
306
|
-
>
|
|
307
|
-
{{ t("resourceList.head.createFromYaml") }}
|
|
308
|
-
</router-link>
|
|
309
|
-
</slot>
|
|
310
|
-
</div>
|
|
311
|
-
</slot>
|
|
211
|
+
<h1 class="m-0 descrip-name">
|
|
212
|
+
<TabTitle>{{ _typeDisplay }}</TabTitle> <Favorite
|
|
213
|
+
v-if="isExplorer"
|
|
214
|
+
:resource="favoriteResource || resource"
|
|
215
|
+
/>
|
|
216
|
+
</h1>
|
|
217
|
+
<!-- 描述 -->
|
|
218
|
+
<div class="masthod-title-description">
|
|
219
|
+
{{ _descriptionDisplay }}
|
|
312
220
|
</div>
|
|
221
|
+
<ResourceLoadingIndicator
|
|
222
|
+
v-if="showIncrementalLoadingIndicator"
|
|
223
|
+
:resources="loadResources"
|
|
224
|
+
:indeterminate="loadIndeterminate"
|
|
225
|
+
/>
|
|
226
|
+
</div>
|
|
227
|
+
<div class="sub-header">
|
|
228
|
+
<slot name="subHeader">
|
|
229
|
+
<!--Slot content-->
|
|
230
|
+
</slot>
|
|
313
231
|
</div>
|
|
314
232
|
<div
|
|
315
233
|
v-if="!(tabList.includes(_typeDisplay))"
|
|
316
|
-
style="width: 110%;height: 1px;background-color: #D7D7D7;margin-top:
|
|
234
|
+
style="width: 110%;height: 1px;background-color: #D7D7D7;margin-top: 10px;margin-bottom: 20px;margin-left: -20px;margin-right: -20px;"
|
|
317
235
|
/>
|
|
236
|
+
<div
|
|
237
|
+
v-if="!(tabList.includes(_typeDisplay))"
|
|
238
|
+
class="actions-container"
|
|
239
|
+
style="width: 100%;min-height: 32px;text-align: left"
|
|
240
|
+
>
|
|
241
|
+
<slot name="actions">
|
|
242
|
+
<div class="actions">
|
|
243
|
+
<slot name="extraActions" />
|
|
244
|
+
|
|
245
|
+
<slot name="createButton">
|
|
246
|
+
<router-link
|
|
247
|
+
v-if="hasEditComponent && _isCreatable"
|
|
248
|
+
:to="_createLocation"
|
|
249
|
+
class="btn role-primary"
|
|
250
|
+
:data-testid="componentTestid+'-create'"
|
|
251
|
+
>
|
|
252
|
+
{{ _createButtonlabel }}
|
|
253
|
+
</router-link>
|
|
254
|
+
<!-- <router-link
|
|
255
|
+
v-else-if="_isYamlCreatable"
|
|
256
|
+
:to="_yamlCreateLocation"
|
|
257
|
+
class="btn role-primary"
|
|
258
|
+
:data-testid="componentTestid+'-create-yaml'"
|
|
259
|
+
>
|
|
260
|
+
{{ t("resourceList.head.createFromYaml") }}
|
|
261
|
+
</router-link> -->
|
|
262
|
+
</slot>
|
|
263
|
+
</div>
|
|
264
|
+
</slot>
|
|
265
|
+
</div>
|
|
318
266
|
</header>
|
|
319
267
|
</template>
|
|
320
268
|
|
|
321
269
|
<style lang="scss" scoped>
|
|
322
|
-
|
|
323
270
|
.title {
|
|
324
271
|
/* align-items: center;
|
|
325
272
|
display: flex; */
|
|
@@ -338,10 +285,8 @@ export default {
|
|
|
338
285
|
'title actions'
|
|
339
286
|
'sub-header sub-header'
|
|
340
287
|
'state-banner state-banner'; */
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
margin-bottom: 16px;
|
|
344
|
-
flex-direction: column;
|
|
288
|
+
position: relative;
|
|
289
|
+
display: unset;
|
|
345
290
|
}
|
|
346
291
|
.excram-list{
|
|
347
292
|
font-size: 14px;
|
|
@@ -358,18 +303,11 @@ export default {
|
|
|
358
303
|
}
|
|
359
304
|
.masthod-title-description{
|
|
360
305
|
font-family: 'Microsoft YaHei';
|
|
361
|
-
margin
|
|
306
|
+
margin: 20px 0px;
|
|
362
307
|
}
|
|
363
308
|
.actions-container{
|
|
364
309
|
/* display: flex; */
|
|
365
310
|
/* margin-left: 0px; */
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
.sub-header {
|
|
369
|
-
font-size: 16px;
|
|
370
|
-
margin-left: 5px;
|
|
371
|
-
.btn {
|
|
372
|
-
text-align: left !important;
|
|
373
|
-
}
|
|
311
|
+
position: absolute;
|
|
374
312
|
}
|
|
375
313
|
</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
|
}
|
|
@@ -4,7 +4,6 @@ import { get } from '@shell/utils/object';
|
|
|
4
4
|
import { mapPref, GROUP_RESOURCES } from '@shell/store/prefs';
|
|
5
5
|
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
6
6
|
import SortableTable from '@shell/components/SortableTable';
|
|
7
|
-
import MastheadBtn from '@shell/components/ResourceList/Masthead-btn.vue';
|
|
8
7
|
import { NAMESPACE, AGE } from '@shell/config/table-headers';
|
|
9
8
|
import { findBy } from '@shell/utils/array';
|
|
10
9
|
import { ExtensionPoint, TableColumnLocation } from '@shell/core/types';
|
|
@@ -44,7 +43,7 @@ export default {
|
|
|
44
43
|
|
|
45
44
|
emits: ['clickedActionButton'],
|
|
46
45
|
|
|
47
|
-
components: { ButtonGroup, SortableTable
|
|
46
|
+
components: { ButtonGroup, SortableTable },
|
|
48
47
|
|
|
49
48
|
props: {
|
|
50
49
|
schema: {
|
|
@@ -52,11 +51,6 @@ export default {
|
|
|
52
51
|
default: null,
|
|
53
52
|
},
|
|
54
53
|
|
|
55
|
-
schemaBtn: {
|
|
56
|
-
type: Object,
|
|
57
|
-
default: null,
|
|
58
|
-
},
|
|
59
|
-
|
|
60
54
|
rows: {
|
|
61
55
|
type: Array,
|
|
62
56
|
required: true
|
|
@@ -218,49 +212,6 @@ export default {
|
|
|
218
212
|
type: String,
|
|
219
213
|
default: '名称'
|
|
220
214
|
},
|
|
221
|
-
|
|
222
|
-
resource: {
|
|
223
|
-
type: String,
|
|
224
|
-
required: true,
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
typeDisplay: {
|
|
228
|
-
type: String,
|
|
229
|
-
default: null,
|
|
230
|
-
},
|
|
231
|
-
isCreatable: {
|
|
232
|
-
type: Boolean,
|
|
233
|
-
default: null,
|
|
234
|
-
},
|
|
235
|
-
isYamlCreatable: {
|
|
236
|
-
type: Boolean,
|
|
237
|
-
default: null,
|
|
238
|
-
},
|
|
239
|
-
createLocation: {
|
|
240
|
-
type: Object,
|
|
241
|
-
default: null,
|
|
242
|
-
},
|
|
243
|
-
yamlCreateLocation: {
|
|
244
|
-
type: Object,
|
|
245
|
-
default: null,
|
|
246
|
-
},
|
|
247
|
-
createButtonLabel: {
|
|
248
|
-
type: String,
|
|
249
|
-
default: null
|
|
250
|
-
},
|
|
251
|
-
/**
|
|
252
|
-
* Inherited global identifier prefix for tests
|
|
253
|
-
* Define a term based on the parent component to avoid conflicts on multiple components
|
|
254
|
-
*/
|
|
255
|
-
componentTestid: {
|
|
256
|
-
type: String,
|
|
257
|
-
default: 'masthead'
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
mainButtonVisible: {
|
|
261
|
-
type: Boolean,
|
|
262
|
-
default: false
|
|
263
|
-
},
|
|
264
215
|
},
|
|
265
216
|
|
|
266
217
|
data() {
|
|
@@ -690,32 +641,6 @@ export default {
|
|
|
690
641
|
@group-value-change="group = $event"
|
|
691
642
|
@enter="handleEnterKeyPress"
|
|
692
643
|
>
|
|
693
|
-
|
|
694
|
-
<template #search-main-button>
|
|
695
|
-
<MastheadBtn
|
|
696
|
-
v-if="mainButtonVisible"
|
|
697
|
-
:schema="schemaBtn"
|
|
698
|
-
:resource="resource"
|
|
699
|
-
:create-button-label="createButtonLabel"
|
|
700
|
-
:yaml-create-button-label="yamlCreateLocation"
|
|
701
|
-
:create-location="createLocation"
|
|
702
|
-
:is-yaml-creatable="isYamlCreatable"
|
|
703
|
-
:is-creatable="isCreatable"
|
|
704
|
-
:type-display="typeDisplay"
|
|
705
|
-
:component-testid="componentTestid"
|
|
706
|
-
>
|
|
707
|
-
|
|
708
|
-
<template #extraActions>
|
|
709
|
-
<slot name="extraActions" />
|
|
710
|
-
</template>
|
|
711
|
-
|
|
712
|
-
<template #createButton>
|
|
713
|
-
<slot name="createButton" />
|
|
714
|
-
</template>
|
|
715
|
-
|
|
716
|
-
</ MastheadBtn>
|
|
717
|
-
</template>
|
|
718
|
-
|
|
719
644
|
<template
|
|
720
645
|
v-if="showGrouping && _groupOptions.length > 1"
|
|
721
646
|
#header-middle
|
package/components/SideNav.vue
CHANGED
|
@@ -21,8 +21,6 @@ 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
23
|
import { cloud2harvesterhci, harvester2cloud } from '@shell/utils/router';
|
|
24
|
-
import { NORMAN } from '@shell/config/types';
|
|
25
|
-
|
|
26
24
|
|
|
27
25
|
export default {
|
|
28
26
|
name: 'SideNav',
|
|
@@ -115,14 +113,10 @@ export default {
|
|
|
115
113
|
|
|
116
114
|
computed: {
|
|
117
115
|
...mapState(['managementReady', 'clusterReady']),
|
|
118
|
-
...mapGetters(['isStandaloneHarvester', 'productId', 'clusterId', 'currentProduct', 'rootProduct', '
|
|
116
|
+
...mapGetters(['isStandaloneHarvester', 'productId', 'clusterId', 'currentProduct', 'rootProduct', 'isSingleProduct', 'namespaceMode', 'isExplorer', 'isVirtualCluster']),
|
|
119
117
|
...mapGetters({ locale: 'i18n/selectedLocaleLabel', hasMultipleLocales: 'i18n/hasMultipleLocales' }),
|
|
120
118
|
...mapGetters('type-map', ['activeProducts']),
|
|
121
119
|
|
|
122
|
-
principal() {
|
|
123
|
-
return this.$store.getters['rancher/byId'](NORMAN.PRINCIPAL, this.$store.getters['auth/principalId']) || {};
|
|
124
|
-
},
|
|
125
|
-
|
|
126
120
|
favoriteTypes: mapPref(FAVORITE_TYPES),
|
|
127
121
|
|
|
128
122
|
supportLink() {
|
|
@@ -191,12 +185,6 @@ export default {
|
|
|
191
185
|
allNavLinksIds() {
|
|
192
186
|
return this.allNavLinks.map((a) => a.id);
|
|
193
187
|
},
|
|
194
|
-
|
|
195
|
-
prod() {
|
|
196
|
-
const name = this.rootProduct.name;
|
|
197
|
-
|
|
198
|
-
return this.$store.getters['i18n/withFallback'](`product."${ name }"`, null, ucFirst(name));
|
|
199
|
-
},
|
|
200
188
|
},
|
|
201
189
|
|
|
202
190
|
methods: {
|
|
@@ -244,32 +232,9 @@ export default {
|
|
|
244
232
|
|
|
245
233
|
replaceWith(this.groups, ...sortBy(out, ['weight:desc', 'label']));
|
|
246
234
|
|
|
247
|
-
// if (this.principal.loginName !== 'admin') {
|
|
248
|
-
// // 递归过滤函数(根据 label)
|
|
249
|
-
// this.groups = this.filterMenus(this.groups);
|
|
250
|
-
// }
|
|
251
|
-
|
|
252
|
-
|
|
253
235
|
this.gettingGroups = false;
|
|
254
236
|
},
|
|
255
237
|
|
|
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
238
|
getProductsGroups(out, loadProducts, namespaceMode, productMap) {
|
|
274
239
|
const clusterId = this.$store.getters['clusterId'];
|
|
275
240
|
const currentType = this.$route.params.resource || '';
|
|
@@ -435,58 +400,56 @@ export default {
|
|
|
435
400
|
role="navigation"
|
|
436
401
|
:aria-label="t('nav.ariaLabel.sideNav')"
|
|
437
402
|
>
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
403
|
+
<div class="side-all-title">
|
|
404
|
+
控制台
|
|
405
|
+
</div>
|
|
442
406
|
<!-- Actual nav -->
|
|
443
407
|
<div class="nav">
|
|
444
408
|
<template
|
|
445
|
-
|
|
446
|
-
|
|
409
|
+
v-for="(g) in groups"
|
|
410
|
+
:key="g.name"
|
|
447
411
|
>
|
|
448
|
-
<
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
@selected="groupSelected($event)"
|
|
459
|
-
@expand="groupSelected($event)"
|
|
460
|
-
/>
|
|
461
|
-
</template>
|
|
412
|
+
<Group
|
|
413
|
+
ref="groups"
|
|
414
|
+
id-prefix=""
|
|
415
|
+
class="package"
|
|
416
|
+
:group="g"
|
|
417
|
+
:can-collapse="!g.isRoot"
|
|
418
|
+
:show-header="!g.isRoot"
|
|
419
|
+
@selected="groupSelected($event)"
|
|
420
|
+
@expand="groupSelected($event)"
|
|
421
|
+
/>
|
|
462
422
|
</template>
|
|
463
423
|
</div>
|
|
464
424
|
<!-- SideNav footer area (seems to be tied to harvester) -->
|
|
465
425
|
<!-- <div
|
|
466
426
|
v-if="showProductFooter"
|
|
467
427
|
class="footer"
|
|
468
|
-
>
|
|
469
|
-
|
|
428
|
+
> -->
|
|
429
|
+
<!-- support link -->
|
|
430
|
+
<!-- <router-link
|
|
470
431
|
:to="supportLink"
|
|
471
432
|
class="pull-right"
|
|
472
433
|
role="link"
|
|
473
434
|
:aria-label="t('nav.support', {hasSupport: true})"
|
|
474
435
|
>
|
|
475
436
|
{{ t('nav.support', {hasSupport: true}) }}
|
|
476
|
-
</router-link>
|
|
477
|
-
|
|
437
|
+
</router-link> -->
|
|
438
|
+
<!-- version number -->
|
|
439
|
+
<!-- <span
|
|
478
440
|
v-clean-tooltip="{content: displayVersion, placement: 'top'}"
|
|
479
441
|
class="clip version text-muted"
|
|
480
442
|
>
|
|
481
443
|
{{ displayVersion }}
|
|
482
|
-
</span>
|
|
444
|
+
</span> -->
|
|
483
445
|
|
|
484
|
-
|
|
446
|
+
<!-- locale selector -->
|
|
447
|
+
<!-- <LocaleSelector
|
|
485
448
|
v-if="isSingleProduct && hasMultipleLocales && !isStandaloneHarvester"
|
|
486
449
|
mode="login"
|
|
487
450
|
:show-icon="false"
|
|
488
|
-
/>
|
|
489
|
-
</div> -->
|
|
451
|
+
/> -->
|
|
452
|
+
<!-- </div> -->
|
|
490
453
|
<!-- SideNav footer alternative -->
|
|
491
454
|
<!-- <div
|
|
492
455
|
v-else
|
|
@@ -516,7 +479,6 @@ export default {
|
|
|
516
479
|
<style lang="scss" scoped>
|
|
517
480
|
.side-nav {
|
|
518
481
|
display: flex;
|
|
519
|
-
z-index: 10;
|
|
520
482
|
flex-direction: column;
|
|
521
483
|
.nav {
|
|
522
484
|
flex: 1;
|
|
@@ -536,8 +498,9 @@ export default {
|
|
|
536
498
|
|
|
537
499
|
A { padding-left: 0; }
|
|
538
500
|
}
|
|
539
|
-
:deep() A
|
|
501
|
+
:deep() A{
|
|
540
502
|
height: 50px;
|
|
503
|
+
background-color: #fff;
|
|
541
504
|
}
|
|
542
505
|
|
|
543
506
|
.tools {
|
|
@@ -274,12 +274,6 @@ export default {
|
|
|
274
274
|
class="content"
|
|
275
275
|
>
|
|
276
276
|
<span
|
|
277
|
-
v-if="(col.name === 'harvester' || col.name === 'explorer') && col.label === ' '"
|
|
278
|
-
>
|
|
279
|
-
管理
|
|
280
|
-
</span>
|
|
281
|
-
<span
|
|
282
|
-
v-if="!((col.name === 'harvester' || col.name === 'explorer') && col.label === ' ')"
|
|
283
277
|
v-clean-html="labelFor(col)"
|
|
284
278
|
class="text-no-break"
|
|
285
279
|
/>
|