dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/assets/brand/harvester/favicon.png +0 -0
  2. package/assets/brand/suse/favicon.png +0 -0
  3. package/assets/icons/demo.css +539 -0
  4. package/assets/icons/demo.css:Zone.Identifier +0 -0
  5. package/assets/icons/demo_index.html +1131 -0
  6. package/assets/icons/demo_index.html:Zone.Identifier +0 -0
  7. package/assets/icons/iconfont.css +216 -0
  8. package/assets/icons/iconfont.css:Zone.Identifier +0 -0
  9. package/assets/icons/iconfont.js +1 -0
  10. package/assets/icons/iconfont.js:Zone.Identifier +0 -0
  11. package/assets/icons/iconfont.json +324 -0
  12. package/assets/icons/iconfont.json:Zone.Identifier +0 -0
  13. package/assets/icons/iconfont.ttf +0 -0
  14. package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
  15. package/assets/icons/iconfont.woff +0 -0
  16. package/assets/icons/iconfont.woff2 +0 -0
  17. package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
  18. package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
  19. package/assets/images/API.svg +3 -0
  20. package/assets/images/action.svg +6 -0
  21. package/assets/images/login/password.svg +20 -0
  22. package/assets/images/login/user.svg +6 -0
  23. package/assets/images/login-bg.png +0 -0
  24. package/assets/images/login-left.png +0 -0
  25. package/assets/images/login-logo.svg +19 -0
  26. package/assets/images/logo.png +0 -0
  27. package/assets/images/pl/half-logo.svg +2 -23
  28. package/assets/images/pl/harvester.png +0 -0
  29. package/assets/images/pl/logo.png +0 -0
  30. package/assets/images/promp-yellow.svg +5 -0
  31. package/assets/images/user.png +0 -0
  32. package/assets/styles/all.scss +63 -0
  33. package/assets/styles/app.scss +4 -0
  34. package/assets/styles/base/_basic.scss +2 -2
  35. package/assets/styles/base/_mixins.scss +1 -1
  36. package/assets/styles/base/_typography.scss +2 -1
  37. package/assets/styles/base/_variables.scss +14 -7
  38. package/assets/styles/global/_button.scss +43 -25
  39. package/assets/styles/global/_columns.scss +3 -1
  40. package/assets/styles/global/_form.scss +45 -13
  41. package/assets/styles/global/_labeled-input.scss +54 -26
  42. package/assets/styles/global/_layout.scss +8 -3
  43. package/assets/styles/global/_select.scss +25 -17
  44. package/assets/styles/global/_table.scss +7 -1
  45. package/assets/styles/global/_tooltip.scss +56 -8
  46. package/assets/styles/themes/_dark.scss +3 -0
  47. package/assets/styles/themes/_light.scss +66 -43
  48. package/assets/styles/vendor/vue-select.scss +22 -9
  49. package/assets/translations/en-us.yaml +28 -4
  50. package/assets/translations/zh-hans.yaml +452 -189
  51. package/components/ActionDropdown.vue +2 -1
  52. package/components/ActionMenu.vue +2 -2
  53. package/components/ActionMenuShell.vue +2 -0
  54. package/components/AppModal.vue +46 -5
  55. package/components/BrandImage.vue +1 -0
  56. package/components/ButtonDropdown.vue +26 -4
  57. package/components/ButtonMultiAction.vue +1 -0
  58. package/components/ClusterIconMenu.vue +1 -1
  59. package/components/CodeMirror.vue +20 -6
  60. package/components/ConsumptionGauge.vue +24 -5
  61. package/components/CopyToClipboard.vue +15 -0
  62. package/components/CruResource.vue +9 -8
  63. package/components/CruResourceFooter.vue +2 -2
  64. package/components/DashboardOptions.vue +29 -17
  65. package/components/DotState.vue +84 -0
  66. package/components/Drawer/Chrome.vue +2 -2
  67. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -22
  68. package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
  69. package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
  70. package/components/ExplorerMembers.vue +18 -3
  71. package/components/ExplorerProjectsNamespaces.vue +19 -5
  72. package/components/GlobalRoleBindings.vue +112 -48
  73. package/components/GrafanaDashboard.vue +4 -4
  74. package/components/GrowlManager.vue +3 -1
  75. package/components/HardwareResourceGauge.vue +39 -3
  76. package/components/IndentedPanel.vue +4 -10
  77. package/components/InfoBox.vue +3 -3
  78. package/components/InputOrDisplay.vue +28 -2
  79. package/components/LabelValue.vue +20 -1
  80. package/components/ModalWithCard.vue +12 -3
  81. package/components/PodSecurityAdmission.vue +1 -1
  82. package/components/PromptModal.vue +1 -1
  83. package/components/PromptRemove.vue +30 -11
  84. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
  85. package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
  86. package/components/Resource/Detail/Metadata/index.vue +3 -1
  87. package/components/Resource/Detail/TitleBar/Title.vue +4 -3
  88. package/components/Resource/Detail/TitleBar/Top.vue +2 -0
  89. package/components/Resource/Detail/TitleBar/index.vue +109 -24
  90. package/components/ResourceDetail/Masthead/legacy.vue +181 -38
  91. package/components/ResourceDetail/legacy.vue +32 -14
  92. package/components/ResourceList/Masthead.vue +226 -54
  93. package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
  94. package/components/ResourceTable.vue +24 -2
  95. package/components/SideNav.vue +74 -20
  96. package/components/SortableTable/THead.vue +33 -3
  97. package/components/SortableTable/index.vue +1016 -463
  98. package/components/SortableTable/paging.js +26 -16
  99. package/components/SortableTable/selection.js +2 -2
  100. package/components/Tabbed/Tab.vue +3 -3
  101. package/components/Tabbed/index.vue +47 -29
  102. package/components/YamlEditor.vue +0 -1
  103. package/components/auth/Principal.vue +37 -13
  104. package/components/auth/RoleDetailEdit.vue +58 -7
  105. package/components/auth/SelectPrincipal.vue +1 -0
  106. package/components/breadcrumb/index.vue +316 -0
  107. package/components/form/ArrayList.vue +41 -33
  108. package/components/form/ArrayListGrouped.vue +10 -2
  109. package/components/form/ArrayListSelect.vue +1 -1
  110. package/components/form/BannerSettings.vue +64 -59
  111. package/components/form/ChangePassword.vue +4 -4
  112. package/components/form/ColorInput.vue +32 -8
  113. package/components/form/Footer.vue +11 -8
  114. package/components/form/InputWithSelect.vue +8 -5
  115. package/components/form/KeyValue.vue +47 -7
  116. package/components/form/LabeledSelect.vue +214 -242
  117. package/components/form/Labels.vue +3 -3
  118. package/components/form/MatchExpressions.vue +24 -7
  119. package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
  120. package/components/form/Members/MembershipEditor.vue +1 -1
  121. package/components/form/NameNsDescription.vue +59 -20
  122. package/components/form/Password.vue +16 -7
  123. package/components/form/PodAffinity.vue +4 -5
  124. package/components/form/ResourceQuota/Namespace.vue +4 -4
  125. package/components/form/ResourceQuota/NamespaceRow.vue +18 -17
  126. package/components/form/ResourceQuota/Project.vue +4 -4
  127. package/components/form/ResourceQuota/ProjectRow.vue +3 -6
  128. package/components/form/Select.vue +5 -2
  129. package/components/form/SimpleSecretSelector.vue +29 -9
  130. package/components/form/Taints.vue +2 -1
  131. package/components/form/UnitInput.vue +8 -3
  132. package/components/form/WorkloadPorts.vue +143 -123
  133. package/components/formatter/BadgeStateFormatter.vue +8 -5
  134. package/components/formatter/LiveDate.vue +3 -3
  135. package/components/nav/Favorite.vue +5 -1
  136. package/components/nav/Group.vue +132 -99
  137. package/components/nav/Header.vue +124 -27
  138. package/components/nav/HeaderPageActionMenu.vue +1 -0
  139. package/components/nav/NamespaceFilter.vue +20 -17
  140. package/components/nav/TopLevelMenu.vue +182 -119
  141. package/components/nav/Type.vue +63 -41
  142. package/composables/useClickOutside.ts +1 -1
  143. package/config/private-label.js +15 -11
  144. package/config/product/auth.js +17 -7
  145. package/config/product/settings.js +19 -9
  146. package/config/settings.ts +28 -0
  147. package/config/table-headers.js +3 -2
  148. package/dialog/ForceMachineRemoveDialog.vue +2 -2
  149. package/dialog/ScalePoolDownDialog.vue +2 -2
  150. package/edit/management.cattle.io.user.vue +17 -4
  151. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
  152. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
  153. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
  154. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
  155. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
  156. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
  157. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
  158. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
  159. package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
  160. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
  161. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
  162. package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
  163. package/edit/namespace.vue +1 -2
  164. package/edit/token.vue +31 -12
  165. package/edit/workload/index.vue +4 -4
  166. package/list/management.cattle.io.setting.vue +22 -13
  167. package/list/management.cattle.io.user.vue +7 -3
  168. package/list/namespace.vue +3 -0
  169. package/list/provisioning.cattle.io.cluster.vue +6 -7
  170. package/mixins/brand.js +17 -0
  171. package/package.json +1 -1
  172. package/pages/account/pri.vue +229 -0
  173. package/pages/auth/login.vue +220 -52
  174. package/pages/auth/setup.vue +142 -19
  175. package/pages/c/_cluster/_product/namespaces.vue +5 -5
  176. package/pages/c/_cluster/auth/roles/index.vue +56 -5
  177. package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
  178. package/pages/c/_cluster/settings/banners.vue +174 -102
  179. package/pages/c/_cluster/settings/brand.vue +350 -302
  180. package/pages/c/_cluster/settings/performance.vue +61 -38
  181. package/pages/home.vue +70 -30
  182. package/pages/prefs.vue +27 -25
  183. package/pkg/tsconfig.json +9 -9
  184. package/pkg/vue.config.js +1 -1
  185. package/plugins/dashboard-store/resource-class.js +28 -27
  186. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  187. package/public/index.html +4 -4
  188. package/rancher-components/BadgeState/BadgeState.vue +38 -55
  189. package/rancher-components/Banner/Banner.vue +12 -8
  190. package/rancher-components/Card/Card.vue +7 -8
  191. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
  192. package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
  193. package/rancher-components/Form/Radio/RadioButton.vue +35 -11
  194. package/rancher-components/Form/Radio/RadioGroup.vue +13 -5
  195. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
  196. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
  197. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +12 -4
  198. package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
  199. package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
  200. package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
  201. package/rancher-components/RcDropdown/types.ts +1 -0
  202. package/rancher-components/StringList/StringList.vue +1 -1
  203. package/scripts/publish-shell.sh +1 -1
  204. package/static/favicon.ico +0 -0
  205. package/static/favicon.png +0 -0
  206. package/static/loading-indicator.html +3 -3
  207. package/store/i18n.js +5 -2
  208. package/store/modal.ts +3 -3
  209. package/store/prefs.js +11 -4
  210. package/store/type-map.js +32 -2
  211. package/types/shell/index.d.ts +78 -97
  212. package/utils/error.js +89 -8
  213. package/utils/errorTranslate.json +1351 -0
  214. package/utils/router.js +21 -0
  215. package/utils/select.js +26 -3
  216. package/utils/string.js +8 -5
  217. package/utils/title.ts +1 -1
  218. package/vue.config.js +1 -1
@@ -14,6 +14,18 @@ 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
+
17
29
  components: {
18
30
  Favorite,
19
31
  TypeDescription,
@@ -79,7 +91,12 @@ export default {
79
91
  componentTestid: {
80
92
  type: String,
81
93
  default: 'masthead'
82
- }
94
+ },
95
+
96
+ mainButtonVisible: {
97
+ type: Boolean,
98
+ default: true
99
+ },
83
100
  },
84
101
 
85
102
  data() {
@@ -95,10 +112,16 @@ export default {
95
112
  query: { [AS]: _YAML },
96
113
  };
97
114
 
115
+ const tabList = ['集群配置'];
116
+
117
+ const description = ''
98
118
  return {
99
119
  formRoute,
100
120
  yamlRoute,
101
121
  hasEditComponent,
122
+ tabList,
123
+ description,
124
+ resizeObserver: null
102
125
  };
103
126
  },
104
127
 
@@ -125,6 +148,67 @@ export default {
125
148
 
126
149
  return this.$store.getters['type-map/labelFor'](this.schema, 99);
127
150
  },
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
+ },
128
212
 
129
213
  _isYamlCreatable() {
130
214
  if ( this.isYamlCreatable !== null) {
@@ -165,88 +249,176 @@ export default {
165
249
 
166
250
  return this.createButtonLabel || this.t('resourceList.head.create');
167
251
  },
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
+ }
168
273
  }
169
274
  };
170
275
  </script>
171
276
 
172
277
  <template>
173
278
  <header class="with-subheader">
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'"
279
+ <div style="display: flex;width: 100%;">
280
+ <div style="flex: 1;">
281
+ <!-- 标题区域 -->
282
+ <div class="title">
283
+ <div class="excram-list">
284
+ <span
285
+ v-for="(item,index) in demoDisplay"
286
+ :key="index"
214
287
  >
215
- {{ t("resourceList.head.createFromYaml") }}
216
- </router-link>
217
- </slot>
288
+ <span v-if="item">{{ item }}</span>
289
+ <span v-if="item">/</span>
290
+ </span>
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
+
218
320
  </div>
219
- </slot>
321
+
322
+
323
+ </div>
324
+
325
+ <!-- 操作按钮区域 -->
326
+ <div
327
+ ref="actionsContainer"
328
+ v-if="!(tabList.includes(_typeDisplay))"
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>
220
357
  </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
+ />
221
362
  </header>
222
363
  </template>
223
364
 
224
365
  <style lang="scss" scoped>
225
366
  .title {
226
- align-items: center;
227
- display: flex;
367
+ /* align-items: center;
368
+ display: flex; */
228
369
  h1 {
229
370
  margin: 0;
230
371
  }
231
372
  }
232
373
 
233
374
  header {
234
- margin-bottom: 20px;
375
+ /* margin-bottom: 20px; */
235
376
  }
236
377
 
237
378
  header.with-subheader {
238
- grid-template-areas:
379
+ /* grid-template-areas:
239
380
  'type-banner type-banner'
240
381
  'title actions'
241
382
  'sub-header sub-header'
242
- 'state-banner state-banner';
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; */
243
409
  }
244
410
 
245
411
  .sub-header {
246
- grid-area: sub-header;
247
-
248
- a {
249
- display: inline-block;
412
+ font-size: 16px;
413
+ margin-left: 5px;
414
+ .btn {
415
+ text-align: left !important;
250
416
  }
251
417
  }
418
+
419
+ .actions-positioning {
420
+ position: absolute;
421
+ bottom: -48px;
422
+ z-index: 15;
423
+ }
252
424
  </style>
@@ -77,7 +77,7 @@ export default {
77
77
  <template>
78
78
  <div
79
79
  v-if="count && !haveAll"
80
- class="ml-10 resource-loading-indicator"
80
+ class="resource-loading-indicator"
81
81
  >
82
82
  <div class="inner">
83
83
  <div class="resource-loader">
@@ -118,10 +118,12 @@ export default {
118
118
  .resource-loader {
119
119
  padding: 1px 10px;
120
120
  width: max-content;
121
+ height: 20px;
121
122
 
122
123
  .rl-fg, .rl-bg {
123
- align-content: center;
124
124
  display: flex;
125
+ align-content: center;
126
+ font-size: 12px;
125
127
 
126
128
  > i {
127
129
  font-size: 18px;
@@ -129,6 +131,7 @@ export default {
129
131
  }
130
132
 
131
133
  > span {
134
+ margin-top: 2px;
132
135
  margin-left: 5px;
133
136
  }
134
137
  }
@@ -55,6 +55,12 @@ export default {
55
55
  ],
56
56
 
57
57
  props: {
58
+ searchPlaceholder: {
59
+ // search框内的输入提示
60
+ type: String,
61
+ default: '名称'
62
+ },
63
+
58
64
  schema: {
59
65
  type: Object,
60
66
  default: null,
@@ -258,6 +264,10 @@ export default {
258
264
  },
259
265
 
260
266
  computed: {
267
+ actionsWidth() {
268
+ return this.$store.getters['type-map/actionsWidth'] // 从 getter 里拿
269
+ },
270
+
261
271
  options() {
262
272
  return this.$store.getters[`type-map/optionsFor`](this.schema, this.externalPaginationEnabled);
263
273
  },
@@ -454,6 +464,11 @@ export default {
454
464
  const namespaceGroupable = this.$store.getters['isMultipleNamespaces'] && this.isNamespaced;
455
465
  const customGroupable = !!this.options?.listGroups?.length;
456
466
 
467
+ // sshkey去掉分组按钮
468
+ if(this.parsedPagingParams.singularLabel === 'SSH Key' || this.parsedPagingParams.singularLabel === '负载均衡器'){
469
+ return false
470
+ }
471
+
457
472
  return namespaceGroupable || customGroupable || this.groupOptions?.length;
458
473
  }
459
474
 
@@ -617,6 +632,7 @@ export default {
617
632
  :headers="_headers"
618
633
  :rows="filteredRows"
619
634
  :loading="loading"
635
+ :search-placeholder="searchPlaceholder"
620
636
  :alt-loading="altLoading"
621
637
  :group-by="computedGroupBy"
622
638
  :group="group"
@@ -646,6 +662,11 @@ export default {
646
662
  @group-value-change="group = $event"
647
663
  @enter="handleEnterKeyPress"
648
664
  >
665
+
666
+ <template #search-main-button>
667
+ <div :style="{ width: actionsWidth + 'px' }"></div>
668
+ </template>
669
+
649
670
  <template
650
671
  v-if="showGrouping && _groupOptions.length > 1"
651
672
  #header-middle
@@ -655,6 +676,7 @@ export default {
655
676
  <ButtonGroup
656
677
  v-model:value="group"
657
678
  :options="_groupOptions"
679
+ v-if="parsedPagingParams.singularLabel !== 'PCI设备'"
658
680
  />
659
681
  </template>
660
682
 
@@ -707,11 +729,11 @@ export default {
707
729
  class="hide"
708
730
  @shortkey="keyAction('edit')"
709
731
  />
710
- <button
732
+ <!-- <button
711
733
  v-shortkey.once="['y']"
712
734
  class="hide"
713
735
  @shortkey="keyAction('yaml')"
714
- />
736
+ /> -->
715
737
  <button
716
738
  v-if="_showBulkActions"
717
739
  v-shortkey.once="['del']"
@@ -20,6 +20,9 @@ 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
+
23
26
 
24
27
  export default {
25
28
  name: 'SideNav',
@@ -112,10 +115,14 @@ export default {
112
115
 
113
116
  computed: {
114
117
  ...mapState(['managementReady', 'clusterReady']),
115
- ...mapGetters(['isStandaloneHarvester', 'productId', 'clusterId', 'currentProduct', 'rootProduct', 'isSingleProduct', 'namespaceMode', 'isExplorer', 'isVirtualCluster']),
118
+ ...mapGetters(['isStandaloneHarvester', 'productId', 'clusterId', 'currentProduct', 'rootProduct', 'currentCluster', 'isSingleProduct', 'namespaceMode', 'isExplorer', 'isVirtualCluster']),
116
119
  ...mapGetters({ locale: 'i18n/selectedLocaleLabel', hasMultipleLocales: 'i18n/hasMultipleLocales' }),
117
120
  ...mapGetters('type-map', ['activeProducts']),
118
121
 
122
+ principal() {
123
+ return this.$store.getters['rancher/byId'](NORMAN.PRINCIPAL, this.$store.getters['auth/principalId']) || {};
124
+ },
125
+
119
126
  favoriteTypes: mapPref(FAVORITE_TYPES),
120
127
 
121
128
  supportLink() {
@@ -184,6 +191,12 @@ export default {
184
191
  allNavLinksIds() {
185
192
  return this.allNavLinks.map((a) => a.id);
186
193
  },
194
+
195
+ prod() {
196
+ const name = this.rootProduct.name;
197
+
198
+ return this.$store.getters['i18n/withFallback'](`product."${ name }"`, null, ucFirst(name));
199
+ },
187
200
  },
188
201
 
189
202
  methods: {
@@ -231,9 +244,32 @@ export default {
231
244
 
232
245
  replaceWith(this.groups, ...sortBy(out, ['weight:desc', 'label']));
233
246
 
247
+ // if (this.principal.loginName !== 'admin') {
248
+ // // 递归过滤函数(根据 label)
249
+ // this.groups = this.filterMenus(this.groups);
250
+ // }
251
+
252
+
234
253
  this.gettingGroups = false;
235
254
  },
236
255
 
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
+
237
273
  getProductsGroups(out, loadProducts, namespaceMode, productMap) {
238
274
  const clusterId = this.$store.getters['clusterId'];
239
275
  const currentType = this.$route.params.resource || '';
@@ -399,30 +435,37 @@ export default {
399
435
  role="navigation"
400
436
  :aria-label="t('nav.ariaLabel.sideNav')"
401
437
  >
438
+ <div class="side-all-title">
439
+ {{ prod == 'Cloud' && currentCluster ? '控制台' : prod }}
440
+ </div>
441
+
402
442
  <!-- Actual nav -->
403
443
  <div class="nav">
404
444
  <template
405
- v-for="(g) in groups"
406
- :key="g.name"
445
+ v-for="(g) in groups"
446
+ :key="g.name"
407
447
  >
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
- />
448
+ <template v-if="principal.loginName && principal.loginName !== 'admin' && g.label === 'RBAC'">
449
+ </template>
450
+ <template v-else>
451
+ <Group
452
+ ref="groups"
453
+ id-prefix=""
454
+ class="package"
455
+ :group="g"
456
+ :can-collapse="!g.isRoot"
457
+ :show-header="!g.isRoot"
458
+ @selected="groupSelected($event)"
459
+ @expand="groupSelected($event)"
460
+ />
461
+ </template>
418
462
  </template>
419
463
  </div>
420
464
  <!-- SideNav footer area (seems to be tied to harvester) -->
421
- <div
465
+ <!-- <div
422
466
  v-if="showProductFooter"
423
467
  class="footer"
424
468
  >
425
- <!-- support link -->
426
469
  <router-link
427
470
  :to="supportLink"
428
471
  class="pull-right"
@@ -431,7 +474,6 @@ export default {
431
474
  >
432
475
  {{ t('nav.support', {hasSupport: true}) }}
433
476
  </router-link>
434
- <!-- version number -->
435
477
  <span
436
478
  v-clean-tooltip="{content: displayVersion, placement: 'top'}"
437
479
  class="clip version text-muted"
@@ -439,15 +481,14 @@ export default {
439
481
  {{ displayVersion }}
440
482
  </span>
441
483
 
442
- <!-- locale selector -->
443
484
  <LocaleSelector
444
485
  v-if="isSingleProduct && hasMultipleLocales && !isStandaloneHarvester"
445
486
  mode="login"
446
487
  :show-icon="false"
447
488
  />
448
- </div>
489
+ </div> -->
449
490
  <!-- SideNav footer alternative -->
450
- <div
491
+ <!-- <div
451
492
  v-else
452
493
  class="version text-muted flex"
453
494
  >
@@ -468,13 +509,14 @@ export default {
468
509
  (Harvester-{{ harvesterVersion }})
469
510
  </span>
470
511
  </template>
471
- </div>
512
+ </div> -->
472
513
  </nav>
473
514
  </template>
474
515
 
475
516
  <style lang="scss" scoped>
476
517
  .side-nav {
477
518
  display: flex;
519
+ z-index: 10;
478
520
  flex-direction: column;
479
521
  .nav {
480
522
  flex: 1;
@@ -494,6 +536,9 @@ export default {
494
536
 
495
537
  A { padding-left: 0; }
496
538
  }
539
+ :deep() A:not(.menuRouterLink){
540
+ height: 50px;
541
+ }
497
542
 
498
543
  .tools {
499
544
  display: flex;
@@ -569,4 +614,13 @@ export default {
569
614
  display: flex;
570
615
  }
571
616
 
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
+ }
572
626
  </style>