dashboard-shell-shell 3.0.5-test.9 → 3.0.5-tsh.2

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 (164) hide show
  1. package/assets/brand/csp/favicon.png +0 -0
  2. package/assets/icons/iconfont.css +4 -1
  3. package/assets/images/pl/dark/logo.png +0 -0
  4. package/assets/styles/all.scss +23 -3
  5. package/assets/styles/base/_variables.scss +2 -2
  6. package/assets/styles/fonts/_icons.scss +3 -2
  7. package/assets/styles/global/_button.scss +1 -1
  8. package/assets/styles/global/_form.scss +1 -0
  9. package/assets/styles/global/_select.scss +1 -1
  10. package/assets/styles/global/_tooltip.scss +5 -1
  11. package/assets/styles/themes/_light.scss +3 -3
  12. package/assets/styles/vendor/vue-select.scss +2 -1
  13. package/assets/translations/en-us.yaml +60 -0
  14. package/assets/translations/zh-hans.yaml +164 -21
  15. package/components/ButtonDropdown.vue +3 -1
  16. package/components/ClusterIconMenu.vue +1 -1
  17. package/components/CodeMirror.vue +6 -4
  18. package/components/ConsumptionGauge.vue +1 -1
  19. package/components/ContainerResourceLimit.vue +2 -2
  20. package/components/CruResource.vue +3 -2
  21. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -19
  22. package/components/Drawer/ResourceDetailDrawer/index.vue +3 -3
  23. package/components/ExplorerMembers.vue +10 -1
  24. package/components/GlobalRoleBindings.vue +52 -112
  25. package/components/PodSecurityAdmission.vue +1 -1
  26. package/components/PromptRemove.vue +23 -1
  27. package/components/RelatedResources.vue +3 -0
  28. package/components/Resource/Detail/TitleBar/composables.ts +16 -1
  29. package/components/Resource/Detail/TitleBar/index.vue +37 -24
  30. package/components/ResourceDetail/Masthead/index.vue +1 -1
  31. package/components/ResourceDetail/Masthead/latest.vue +1 -1
  32. package/components/ResourceDetail/Masthead/legacy.vue +8 -7
  33. package/components/ResourceDetail/legacy.vue +15 -15
  34. package/components/ResourceList/Masthead.vue +11 -15
  35. package/components/ResourceTable.vue +16 -0
  36. package/components/SideNav.vue +21 -21
  37. package/components/SingleClusterInfo.vue +2 -1
  38. package/components/SortableTable/THead.vue +46 -1
  39. package/components/SortableTable/index.vue +54 -18
  40. package/components/Tabbed/index.vue +6 -1
  41. package/components/auth/Principal.vue +16 -8
  42. package/components/auth/RoleDetailEdit.vue +11 -7
  43. package/components/breadcrumb/index.vue +13 -210
  44. package/components/form/ArrayList.vue +164 -147
  45. package/components/form/ArrayListGrouped.vue +5 -3
  46. package/components/form/ChangePassword.vue +1 -1
  47. package/components/form/ClusterAppearance.vue +4 -3
  48. package/components/form/Command.vue +4 -5
  49. package/components/form/Conditions.vue +15 -1
  50. package/components/form/Footer.vue +1 -0
  51. package/components/form/HealthCheck.vue +0 -2
  52. package/components/form/HookOption.vue +87 -58
  53. package/components/form/InputWithSelect.vue +8 -7
  54. package/components/form/KeyValue.vue +20 -2
  55. package/components/form/LabeledSelect.vue +3 -1
  56. package/components/form/Labels.vue +2 -2
  57. package/components/form/MatchExpressions.vue +4 -4
  58. package/components/form/Members/ClusterMembershipEditor.vue +1 -1
  59. package/components/form/Members/ClusterPermissionsEditor.vue +31 -28
  60. package/components/form/Members/MembershipEditor.vue +3 -3
  61. package/components/form/Members/ProjectMembershipEditor.vue +1 -1
  62. package/components/form/NameNsDescription.vue +4 -2
  63. package/components/form/Networking.vue +6 -9
  64. package/components/form/NodeAffinity.vue +29 -28
  65. package/components/form/PodAffinity.vue +23 -23
  66. package/components/form/Probe.vue +15 -11
  67. package/components/form/ProjectMemberEditor.vue +28 -25
  68. package/components/form/ResourceQuota/Namespace.vue +4 -4
  69. package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
  70. package/components/form/ResourceQuota/Project.vue +4 -4
  71. package/components/form/ResourceQuota/ProjectRow.vue +36 -30
  72. package/components/form/ResourceSelector.vue +1 -1
  73. package/components/form/Security.vue +1 -3
  74. package/components/form/Select.vue +7 -1
  75. package/components/form/ServiceNameSelect.vue +2 -5
  76. package/components/form/ServicePorts.vue +149 -75
  77. package/components/form/Tolerations.vue +13 -9
  78. package/components/form/ValueFromResource.vue +110 -96
  79. package/components/formatter/WorkloadHealthScale.vue +4 -3
  80. package/components/nav/Group.vue +6 -0
  81. package/components/nav/Header.vue +17 -137
  82. package/components/nav/NamespaceFilter.vue +14 -19
  83. package/components/nav/TopLevelMenu.vue +99 -125
  84. package/components/nav/Type.vue +11 -3
  85. package/config/menuRouteMap.js +10 -0
  86. package/config/product/explorer.js +32 -10
  87. package/config/product/manager.js +28 -17
  88. package/config/router/navigation-guards/index.js +61 -3
  89. package/detail/node.vue +28 -23
  90. package/dialog/AddCustomBadgeDialog.vue +17 -9
  91. package/dialog/RollbackWorkloadDialog.vue +1 -1
  92. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  93. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
  94. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  95. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  96. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  97. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  98. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  99. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  100. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  101. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  102. package/edit/configmap.vue +4 -0
  103. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +32 -8
  104. package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
  105. package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
  106. package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
  107. package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
  108. package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
  109. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  110. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  111. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  112. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  113. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  114. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  115. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  116. package/edit/persistentvolume/index.vue +3 -1
  117. package/edit/persistentvolumeclaim.vue +2 -0
  118. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
  119. package/edit/secret/index.vue +2 -2
  120. package/edit/service.vue +4 -1
  121. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  122. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  123. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  124. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  125. package/edit/workload/Job.vue +31 -34
  126. package/edit/workload/Upgrading.vue +5 -5
  127. package/edit/workload/index.vue +19 -15
  128. package/edit/workload/storage/Mount.vue +1 -0
  129. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  130. package/edit/workload/storage/azureDisk.vue +14 -10
  131. package/edit/workload/storage/azureFile.vue +9 -7
  132. package/edit/workload/storage/csi/index.vue +6 -9
  133. package/edit/workload/storage/emptyDir.vue +7 -5
  134. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  135. package/edit/workload/storage/hostPath.vue +7 -5
  136. package/edit/workload/storage/nfs.vue +8 -6
  137. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  138. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
  139. package/edit/workload/storage/secret.vue +9 -6
  140. package/edit/workload/storage/vsphereVolume.vue +11 -7
  141. package/initialize/app-extended.js +7 -1
  142. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
  143. package/mixins/create-edit-view/impl.js +10 -0
  144. package/models/provisioning.cattle.io.cluster.js +19 -18
  145. package/models/workload.js +2 -2
  146. package/package.json +1 -1
  147. package/pages/account/index.vue +93 -58
  148. package/pages/auth/login.vue +1 -1
  149. package/pages/auth/setup.vue +36 -17
  150. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
  151. package/pages/c/_cluster/explorer/index.vue +2 -1
  152. package/pages/c/_cluster/explorer/tools/index.vue +6 -6
  153. package/pages/home.vue +55 -13
  154. package/plugins/dashboard-store/actions.js +1 -1
  155. package/rancher-components/Banner/Banner.vue +14 -2
  156. package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
  157. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
  158. package/scripts/build-pkg.sh +18 -23
  159. package/scripts/publish-shell.sh +1 -1
  160. package/store/i18n.js +1 -0
  161. package/store/type-map.js +0 -2
  162. package/utils/error.js +23 -3
  163. package/utils/errorTranslate.json +377 -8
  164. package/utils/errorTranslateNew.json +39 -0
@@ -254,7 +254,7 @@ export default {
254
254
  },
255
255
 
256
256
  parent() {
257
- const displayName = this.value?.parentNameOverride || this.$store.getters['type-map/labelFor'](this.schema);
257
+ let displayName = this.value?.parentNameOverride || this.$store.getters['type-map/labelFor'](this.schema);
258
258
  const product = this.$store.getters['currentProduct'].name;
259
259
 
260
260
  const defaultLocation = {
@@ -418,14 +418,14 @@ export default {
418
418
  demoDisplay() {
419
419
  const product = this.$store.getters['productId'];
420
420
 
421
- const resources = this.location?.params?.resource || ''
421
+ const resources = this.location?.params?.resource || this.$route.params?.resource || ''
422
422
 
423
423
  const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], resources);
424
424
 
425
425
  if (productId === undefined) {
426
426
  return '';
427
427
  }
428
- const parts = productId.split('::');
428
+ const parts = productId?.split('::') || [];
429
429
  const newString = 'root';
430
430
 
431
431
  if (!parts?.includes(newString)) {
@@ -441,9 +441,10 @@ export default {
441
441
  menuIcon() {
442
442
  const product = this.$store.getters['productId'];
443
443
 
444
- const resources = this.location?.params?.resource || ''
444
+ const resources = this.location?.params?.resource || this.$route.params?.resource || ''
445
445
 
446
- return this.$store.getters['type-map/groupsForVirTypes'](product, resources);
446
+
447
+ return this.$store.getters['type-map/groupsForVirTypes'](product, resources) || 'default menuIcon';
447
448
  },
448
449
 
449
450
  location() {
@@ -506,7 +507,7 @@ export default {
506
507
  <span>/</span>
507
508
  </span>
508
509
  <span class="excram-last-name">
509
- {{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent.displayName }}
510
+ {{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent?.displayName }}
510
511
  </span>
511
512
  </div>
512
513
  <header>
@@ -530,7 +531,7 @@ export default {
530
531
  :class="'icon-'+ menuIcon + ' detailIcon'"
531
532
  />
532
533
  </span>
533
- <span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
534
+ <span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent?.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
534
535
  <span v-if="realMode !== 'create'">
535
536
  <span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
536
537
  <t
@@ -523,21 +523,21 @@ export default {
523
523
  />
524
524
 
525
525
  <component
526
- :is="showComponent"
527
- v-else
528
- ref="comp"
529
- v-model:value="value"
530
- v-bind="$data"
531
- :done-params="doneParams"
532
- :done-route="doneRoute"
533
- :mode="mode"
534
- :initial-value="initialModel"
535
- :live-value="liveModel"
536
- :real-mode="realMode"
537
- :class="{'flex-content': flexContent}"
538
- @update:value="$emit('input', $event)"
539
- @update:mode="setMode"
540
- @set-subtype="setSubtype"
526
+ :is="showComponent"
527
+ v-else
528
+ ref="comp"
529
+ v-model:value="value"
530
+ v-bind="$data"
531
+ :done-params="doneParams"
532
+ :done-route="doneRoute"
533
+ :mode="mode"
534
+ :initial-value="initialModel"
535
+ :live-value="liveModel"
536
+ :real-mode="realMode"
537
+ :class="{'flex-content': flexContent}"
538
+ @update:value="$emit('input', $event)"
539
+ @update:mode="setMode"
540
+ @set-subtype="setSubtype"
541
541
  />
542
542
 
543
543
  <button
@@ -156,37 +156,36 @@ export default {
156
156
  demoDisplay() {
157
157
 
158
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);
159
+ const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation?.params?.resource);
160
+ console.log(product, 'product')
161
+ console.log(productId, 'productId')
162
+ console.log(this._createLocation?.params?.resource, 'this._createLocation?.params?.resource')
165
163
 
166
- // const parts = productId?.split('::') || [];
167
- // const newString = 'root';
164
+ const parts = productId?.split('::') || [];
165
+ const newString = 'root';
168
166
 
167
+ if (!parts) {
168
+ if (this.$route.path.includes('/c/local/explorer/secret')) {
169
+ parts = ['storage']
170
+ }
171
+ }
169
172
 
170
173
  const breadcrumbList = {
171
174
  'harvesterhci.io.management.cluster': {
172
175
  origin: 'Harvester 集群',
173
176
  bread: ['虚拟化管理'],
174
- description: '提供虚拟化集群的实时健康状态监控、版本号管理及资源负载管理,支持批量导入/删除集群、配置调优与权限分级功能,实现高效运维管控。'
175
177
  },
176
178
  'management.cattle.io.user': {
177
179
  origin: '用户',
178
180
  bread: ['用户 & 认证'],
179
- description: '用于管理用户账号,支持创建、维护用户信息,可设置用户权限、管理密码等,保障系统资源仅由授权用户访问,提升系统安全性。'
180
181
  },
181
182
  'management.cattle.io.setting':{
182
183
  origin: '基础设置',
183
184
  bread: ['全局设置'],
184
- description: '统一配置平台基础选项与全局设置,支持CA证书、密码规则、域名、Token时效等核心配置。'
185
185
  },
186
186
  'management.cattle.io.feature':{
187
187
  origin: '功能开关',
188
188
  bread: ['全局设置'],
189
- description: '还没有添加描述。。。。'
190
189
  },
191
190
  }
192
191
  const resourcePath = this.$route.params.resource || ''
@@ -194,7 +193,6 @@ export default {
194
193
  const breadcrumb = []
195
194
  if (breadcrumbList[resourcePath] && Object.keys(breadcrumbList[resourcePath]).length > 0) {
196
195
  breadcrumb.push(...breadcrumbList[resourcePath].bread)
197
- this.description = breadcrumbList[resourcePath].description
198
196
  return breadcrumb
199
197
  } else {
200
198
  if (!parts?.includes(newString)) {
@@ -261,8 +259,6 @@ export default {
261
259
  for (const entry of entries) {
262
260
  const width = entry?.contentRect?.width && entry.contentRect.width > 0 ? entry.contentRect.width + 10 : 0
263
261
 
264
- console.log(width, ' width----------------------------')
265
-
266
262
  this.$store.commit('type-map/setActionsWidth', width)
267
263
  }
268
264
  })
@@ -689,6 +689,22 @@ export default {
689
689
  />
690
690
  </template>
691
691
 
692
+ <template
693
+ v-if="showGrouping"
694
+ #header-button-left
695
+ >
696
+ <slot
697
+ name="header-button-left"
698
+ />
699
+ </template>
700
+
701
+ <template #banner>
702
+ <slot
703
+ name="banner"
704
+ />
705
+ </template>
706
+
707
+
692
708
  <template
693
709
  v-if="externalPaginationEnabled"
694
710
  #watch-controls
@@ -244,31 +244,31 @@ export default {
244
244
 
245
245
  replaceWith(this.groups, ...sortBy(out, ['weight:desc', 'label']));
246
246
 
247
- // if (this.principal.loginName !== 'admin') {
248
- // // 递归过滤函数(根据 label)
249
- // this.groups = this.filterMenus(this.groups);
250
- // }
247
+
248
+ if (sessionStorage.getItem('TOPLEVELPERMISSIONS') !== 'superadmin') {
249
+ // 递归过滤函数(根据 label)
250
+ this.groups = this.filterMenus(this.groups);
251
+ }
251
252
 
252
253
 
253
254
  this.gettingGroups = false;
254
255
  },
255
256
 
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
- // },
257
+ filterMenus(menus) {
258
+ return menus.filter(item => item.name !== 'inUse' && item.name !== 'apps') // 过滤掉顶层 inUse 和 apps
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
272
 
273
273
  getProductsGroups(out, loadProducts, namespaceMode, productMap) {
274
274
  const clusterId = this.$store.getters['clusterId'];
@@ -436,7 +436,7 @@ export default {
436
436
  :aria-label="t('nav.ariaLabel.sideNav')"
437
437
  >
438
438
  <div class="side-all-title">
439
- {{ prod == 'Cloud' && currentCluster ? '控制台' : prod }}
439
+ {{ (prod == 'Cloud' || prod == 'Harvester') && currentCluster ? '控制台' : prod }}
440
440
  </div>
441
441
 
442
442
  <!-- Actual nav -->
@@ -148,7 +148,8 @@ export default {
148
148
  :to="clusterToolsLink"
149
149
  class="cluster-link"
150
150
  >
151
- {{ t('nav.clusterTools') }}
151
+ <!-- 禅道 3539 隐藏集群工具 -->
152
+ <!-- {{ t('nav.clusterTools') }} -->
152
153
  </router-link>
153
154
  </div>
154
155
  </div>
@@ -208,9 +208,54 @@ export default {
208
208
  return null;
209
209
  }
210
210
 
211
+ // 创建英文到中文的映射
212
+ const tooltipMap = {
213
+ 'The minimum number of pods that must be available': '必须可用的 Pod 最小数量',
214
+ 'The maximum number of pods that may be unavailable': '允许不可用的 Pod 最大数量',
215
+ 'Calculated number of pods that may be disrupted at this time': '当前允许中断的 Pod 数量',
216
+ 'Request represents a minimum amount of cpu/memory that a container may consume': 'Request 表示容器必须保证的最小 CPU/内存资源量',
217
+ 'Limits control the maximum amount of cpu/memory that a container may use independent of contention on the node': 'Limits 控制容器可使用的 CPU/内存最大资源量,该限制与节点上的资源竞争情况无关',
218
+ 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object': '如果引用对象的一部分而不是整个对象,则此字符串应包含有效的JSON/Go字段访问语句,例如desiredState.manifest.containers[2]。例如,如果对象引用指向pod中的一个容器,则其值为:“spec.containers{name}”(其中“name”表示触发事件的容器的名称),或者如果没有指定容器名称,则为“spec.containers[2]”(此pod中索引为2的容器)。选择此语法只是为了有一些定义良好的方式来引用对象的一部分',
219
+ 'The number of times this event has occurred': '此事件发生的次数',
220
+ 'The component reporting this event. Should be a short machine understandable string': '用于报告此事件的组件名称,应为简短且可被程序识别的字符串',
221
+ 'The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)': '事件首次被记录的时间。(服务器接收时间为TypeMeta。)',
222
+ 'Information when was the last time the job was successfully scheduled': '上次成功调度的任务信息',
223
+ 'The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron': '以 Cron 格式表示的调度,详见 https://en.wikipedia.org/wiki/Cron',
224
+ 'The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready': '运行该守护 Pod 且至少有一个 Pod 就绪的节点数量',
225
+ 'The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/': '运行至少一个守护 Pod 且应运行该 Pod 的节点数量。详情:https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/',
226
+ 'The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/': '应运行该守护 Pod 的节点总数(含已正确运行的节点)。详情:https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/',
227
+ 'Number of the pod with ready state': '就绪 Pod 数量',
228
+ 'Total number of non-terminated pods targeted by this deployment that have the desired template spec': '该 Deployment 管理的符合模板规范的未终止 Pod 总数',
229
+ 'Total number of available pods (ready for at least minReadySeconds) targeted by this deployment': '该 Deployment 管理的可用 Pod 数(至少就绪 minReadySeconds 秒)',
230
+ 'The number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs': '已完成(Succeeded)的 Pod 数量,通常单调增加,但弹性索引 Job 缩减时可能减少。',
231
+ 'The aggregate readiness state of this pod for accepting traffic': 'Pod 接收流量的就绪状态',
232
+ 'The number of times the containers in this pod have been restarted and when the last container in this pod has restarted': 'Pod 容器重启次数及最后重启时间',
233
+ 'podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated': 'Pod 分配的 IP 地址(集群内可路由),未分配时为空。',
234
+ 'phase represents the current phase of PersistentVolumeClaim': 'phase 表示 PersistentVolumeClaim 的当前阶段',
235
+ 'volumeName is the binding reference to the PersistentVolume backing this claim': 'volumeName是支持此声明的持久卷的绑定引用',
236
+ 'capacity represents the actual resources of the underlying volume': 'capacity 表示底层卷的实际资源',
237
+ 'accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1': '卷的实际访问模式(支撑该 PVC)。详情:https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1',
238
+ 'StorageClass of the pvc': 'PVC 的存储类',
239
+ 'VolumeAttributesClass of the pvc': 'PVC 的卷属性类',
240
+ 'volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec': 'PVC 卷模式,未指定时默认为 Filesystem',
241
+ 'Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace': '选择此 NetworkPolicy 作用的 Pod。所选 Pod 会应用所有 ingress 规则。多个 NetworkPolicy 可选择同一 Pod 集合,其 ingress 规则会叠加。该字段必填,空 podSelector 匹配命名空间内所有 Pod。',
242
+ 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata ': '对象创建时间的时间戳(UTC,RFC3339 格式),表示对象创建时的服务器时间。 系统自动填充,仅可读,客户端不可设置,不保证跨操作的先后顺序。列表对象该字段为 null。 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata',
243
+ 'The time at which the most recent occurrence of this event was recorded': '事件最近记录时间',
244
+ };
245
+
211
246
  const exists = this.$store.getters['i18n/exists'];
212
247
 
213
- return exists(col.tooltip) ? this.t(col.tooltip) : col.tooltip;
248
+ // 如果 tooltip 是语言包键名
249
+ if (exists(col.tooltip)) {
250
+ return this.t(col.tooltip);
251
+ }
252
+
253
+ // 如果 tooltip 是英文文本,使用映射
254
+ if (tooltipMap[col.tooltip]) {
255
+ return tooltipMap[col.tooltip];
256
+ }
257
+
258
+ return col.tooltip; // 回退到原始文本
214
259
  },
215
260
  }
216
261
 
@@ -654,6 +654,14 @@ export default {
654
654
  namespaces() {
655
655
  return this.$store.getters['activeNamespaceCache'];
656
656
  },
657
+
658
+ // 正确的总数显示
659
+ totalCount() {
660
+ if (this.externalPaginationEnabled && this.externalPaginationResult) {
661
+ return this.externalPaginationResult.total || this.externalPaginationResult.count || 0;
662
+ }
663
+ return this.rows ? this.rows.length : 0;
664
+ },
657
665
 
658
666
  initalLoad() {
659
667
  return !!(!this.isLoading && !this._didinit && this.rows?.length);
@@ -884,6 +892,14 @@ export default {
884
892
  // this.$router.replace(route);
885
893
  // }
886
894
  // },
895
+ // 设置当前页码
896
+ setPage(pageNum) {
897
+ if (pageNum >= 1 && pageNum <= this.totalPages) {
898
+ this.page = pageNum;
899
+ this.inputPage = ''; // 清空输入框
900
+ this.debouncedPaginationChanged();
901
+ }
902
+ },
887
903
  onTableScroll(table, e) {
888
904
  // 记录最后滚动的距离
889
905
  let lastScrollTop = 0;
@@ -1074,12 +1090,22 @@ export default {
1074
1090
  if ( col.labelKey ) {
1075
1091
  return this.t(col.labelKey, undefined, true);
1076
1092
  } else if ( col.label ) {
1077
- return col.label;
1093
+ // 判断 label 是否为中文
1094
+ if (this.isChinese(col.label)) {
1095
+ return col.label;
1096
+ } else {
1097
+ return this.t(`tableHeaders.${col.label.replace(/\s+/g, '').toLowerCase()}`, undefined, true);
1098
+ }
1078
1099
  }
1079
1100
 
1080
1101
  return ucFirst(col.name);
1081
1102
  },
1082
1103
 
1104
+ // 判断字符串是否包含中文
1105
+ isChinese(str) {
1106
+ return /[\u4e00-\u9fa5]/.test(str);
1107
+ },
1108
+
1083
1109
  valueFor(row, col, isLabel) {
1084
1110
  if (typeof col.value === 'function') {
1085
1111
  return col.value(row);
@@ -1259,15 +1285,15 @@ export default {
1259
1285
  >
1260
1286
  <!-- 主标题和过滤器区域 -->
1261
1287
  <div
1262
- :class="{'titled': $slots.title && $slots.title.length, 'mb-40': isFilterLabel}"
1263
- class="sortable-table-header mb-20"
1288
+ :class="{'titled': $slots.title && $slots.title.length, 'mb-40': isFilterLabel }"
1289
+ class="sortable-table-header"
1264
1290
  >
1265
1291
  <slot name="title" />
1266
1292
 
1267
1293
  <!-- 顶部功能行区域 -->
1268
1294
  <div
1269
1295
  v-if="showHeaderRow"
1270
- class="fixed-header-table-actions"
1296
+ class="fixed-header-table-actions mb-20"
1271
1297
  :class="{button: !!$slots['header-button'], 'advanced-filtering': hasAdvancedFiltering, }"
1272
1298
  style="display: flex;"
1273
1299
  >
@@ -1280,6 +1306,8 @@ export default {
1280
1306
  style="max-height: 32px;"
1281
1307
  >
1282
1308
 
1309
+ <slot name="search-main-button" />
1310
+
1283
1311
  <!-- 已应用的高级筛选 -->
1284
1312
  <ul
1285
1313
  v-if="hasAdvancedFiltering"
@@ -1367,9 +1395,6 @@ export default {
1367
1395
  <slot name="header-button" />
1368
1396
 
1369
1397
  <div style="display: flex;">
1370
-
1371
- <slot name="search-main-button" />
1372
-
1373
1398
  <!-- 搜索输入框 -->
1374
1399
  <input
1375
1400
  v-if="search"
@@ -1398,14 +1423,18 @@ export default {
1398
1423
 
1399
1424
  </div>
1400
1425
 
1401
- <!-- 中间区域插槽 -->
1402
- <div
1403
- v-if="!hasAdvancedFiltering && $slots['header-middle']"
1404
- class="middle"
1405
- style="margin-left: 10px;"
1406
- >
1407
- <slot name="header-middle" />
1408
- </div>
1426
+ <div style="display: flex;">
1427
+ <slot name="header-button-left" />
1428
+
1429
+ <!-- 中间区域插槽 -->
1430
+ <div
1431
+ v-if="!hasAdvancedFiltering && $slots['header-middle']"
1432
+ class="middle"
1433
+ style="margin-left: 10px;"
1434
+ >
1435
+ <slot name="header-middle" />
1436
+ </div>
1437
+ </div>
1409
1438
  </div>
1410
1439
  </div>
1411
1440
 
@@ -1841,7 +1870,7 @@ export default {
1841
1870
  class="paging"
1842
1871
  >
1843
1872
  <div style="height: 100%; align-content: center;">
1844
- 共 {{ filteredRows.length }} 条
1873
+ 共 {{ totalCount ? totalCount : 0 }} 条
1845
1874
  </div>
1846
1875
 
1847
1876
  <button
@@ -2201,6 +2230,9 @@ export default {
2201
2230
  td {
2202
2231
  padding: 8px 5px;
2203
2232
  border: 0;
2233
+ white-space: normal;
2234
+ word-break: break-all;
2235
+ overflow-wrap: break-word;
2204
2236
 
2205
2237
  &:first-child {
2206
2238
  padding-left: 10px;
@@ -2217,8 +2249,9 @@ export default {
2217
2249
 
2218
2250
  tbody {
2219
2251
  tr {
2220
- border-bottom: 1px solid var(--sortable-table-top-divider);
2252
+ border-bottom: 1px solid var(--sortable-table-top-divider) !important;
2221
2253
  background-color: var(--sortable-table-row-bg);
2254
+ height: 60px;
2222
2255
 
2223
2256
  &.main-row.has-sub-row {
2224
2257
  border-bottom: 0;
@@ -2282,6 +2315,7 @@ export default {
2282
2315
 
2283
2316
  &:first-child {
2284
2317
  border-bottom: 2px solid var(--sortable-table-row-bg);
2318
+ height: 40px;
2285
2319
  }
2286
2320
 
2287
2321
  &:not(:first-child) {
@@ -2658,7 +2692,9 @@ export default {
2658
2692
 
2659
2693
  .pageSelect{
2660
2694
  &:deep() .vs__actions:after{
2661
- padding-top: 10px;
2695
+ // padding-top: 10px;
2696
+ display: flex;
2697
+ align-items: center;
2662
2698
  }
2663
2699
  }
2664
2700
  .sort-table-div{
@@ -384,12 +384,13 @@ export default {
384
384
 
385
385
  &.horizontal {
386
386
  border: solid thin var(--border);
387
- border-bottom: 0;
387
+ // border-bottom: 0;
388
388
  display: flex;
389
389
  flex-direction: row;
390
390
 
391
391
  + .tab-container {
392
392
  border: solid thin var(--border);
393
+ border-top: 0px;
393
394
  }
394
395
 
395
396
  .tab.active {
@@ -504,6 +505,8 @@ margin: 0px -20px;
504
505
  display: flex;
505
506
  border-bottom:1px solid #d7d7d7;
506
507
  padding: 0 0 0 20px;
508
+ // overflow: auto;
509
+ // overflow-y: hidden;
507
510
  /* flex: 1 0; */
508
511
  /* flex-direction: column; */
509
512
 
@@ -571,6 +574,8 @@ margin: 0px -20px;
571
574
  li {
572
575
  display: flex;
573
576
  flex: 1;
577
+ border-left: 1px solid var(--border);
578
+ border-right: 1px solid var(--border);
574
579
 
575
580
  .btn {
576
581
  flex: 1 1;
@@ -3,6 +3,10 @@ import { NORMAN } from '@shell/config/types';
3
3
 
4
4
  export default {
5
5
  props: {
6
+ userLogo: {
7
+ type: Boolean,
8
+ default: false,
9
+ },
6
10
  value: {
7
11
  type: String,
8
12
  required: true,
@@ -20,7 +24,11 @@ export default {
20
24
  isShowPass: {
21
25
  type: Boolean,
22
26
  default: false,
23
- }
27
+ },
28
+ userLogoSize: {
29
+ type: Number,
30
+ default: 20,
31
+ },
24
32
  },
25
33
 
26
34
  async fetch() {
@@ -90,8 +98,9 @@ export default {
90
98
  </template>
91
99
 
92
100
  <template v-else-if="principal">
93
- <div class="avatar">
101
+ <div v-if="userLogo" :style="userLogoSize === 79 ? { width: '287px' } : {}" class="avatar">
94
102
  <img
103
+ :style="{ width: userLogoSize + 'px', height: userLogoSize + 'px', marginRight: '10px' }"
95
104
  src="@shell/assets/images/user.png"
96
105
  :class="{'round': principal.roundAvatar}"
97
106
  :alt="t('principal.alt.avatar')"
@@ -166,16 +175,15 @@ export default {
166
175
  </template>
167
176
 
168
177
  <style lang="scss" scoped>
169
- $size: 20px;
178
+ $size: 24px;
170
179
 
171
180
  .principal {
172
181
  display: grid;
173
182
  grid-template-areas:
174
183
  "avatar name"
175
184
  "avatar description";
176
- grid-template-columns: $size auto;
185
+ grid-template-columns: min-content auto;
177
186
  // grid-template-rows: auto math.div($size, 2);
178
- column-gap: 10px;
179
187
 
180
188
  th {
181
189
  text-align: left;
@@ -209,7 +217,7 @@ export default {
209
217
  .avatar {
210
218
  /* grid-area: avatar;
211
219
  text-align: center; */
212
- width: 287px;
220
+ // width: 287px;
213
221
  display: flex;
214
222
  justify-content: center;
215
223
  align-items: center;
@@ -231,13 +239,13 @@ export default {
231
239
 
232
240
  .name {
233
241
  grid-area: name;
234
- line-height: math.div($size, 2);
242
+ line-height: 16px;
235
243
  overflow-wrap: anywhere;
236
244
  }
237
245
 
238
246
  .description {
239
247
  grid-area: description;
240
- line-height: math.div($size, 2);
248
+ line-height: 16px;
241
249
  }
242
250
  }
243
251
  </style>