dashboard-shell-shell 3.0.5-test.8 → 3.0.5-test.80

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 (220) hide show
  1. package/assets/brand/csp/favicon.png +0 -0
  2. package/assets/icons/iconfont.css +4 -1
  3. package/assets/iconsNew/demo.css +539 -0
  4. package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
  5. package/assets/iconsNew/demo_index.html +303 -0
  6. package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
  7. package/assets/iconsNew/iconfont.css +43 -0
  8. package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
  9. package/assets/iconsNew/iconfont.js +1 -0
  10. package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
  11. package/assets/iconsNew/iconfont.json +44 -0
  12. package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
  13. package/assets/iconsNew/iconfont.ttf +0 -0
  14. package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
  15. package/assets/iconsNew/iconfont.woff +0 -0
  16. package/assets/iconsNew/iconfont.woff2 +0 -0
  17. package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
  18. package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
  19. package/assets/images/login-logo.svg +110 -12
  20. package/assets/images/logo.svg +129 -0
  21. package/assets/images/pl/dark/logo.svg +129 -0
  22. package/assets/images/pl/logo.svg +129 -0
  23. package/assets/styles/all.scss +23 -3
  24. package/assets/styles/app.scss +1 -0
  25. package/assets/styles/base/_helpers.scss +1 -1
  26. package/assets/styles/base/_variables.scss +2 -2
  27. package/assets/styles/fonts/_icons.scss +3 -2
  28. package/assets/styles/global/_button.scss +1 -1
  29. package/assets/styles/global/_form.scss +1 -0
  30. package/assets/styles/global/_select.scss +1 -1
  31. package/assets/styles/global/_tooltip.scss +5 -1
  32. package/assets/styles/themes/_light.scss +3 -3
  33. package/assets/styles/vendor/vue-select.scss +2 -1
  34. package/assets/translations/en-us.yaml +67 -0
  35. package/assets/translations/zh-hans.yaml +226 -24
  36. package/components/ButtonDropdown.vue +3 -1
  37. package/components/ClusterIconMenu.vue +1 -1
  38. package/components/CodeMirror.vue +6 -4
  39. package/components/ConsumptionGauge.vue +1 -1
  40. package/components/ContainerResourceLimit.vue +2 -2
  41. package/components/CruResource.vue +3 -2
  42. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -19
  43. package/components/Drawer/ResourceDetailDrawer/index.vue +3 -3
  44. package/components/ExplorerMembers.vue +10 -1
  45. package/components/GlobalRoleBindings.vue +69 -114
  46. package/components/PodSecurityAdmission.vue +1 -1
  47. package/components/PromptRemove.vue +23 -1
  48. package/components/RelatedResources.vue +3 -0
  49. package/components/Resource/Detail/TitleBar/composables.ts +16 -1
  50. package/components/Resource/Detail/TitleBar/index.vue +37 -24
  51. package/components/ResourceDetail/Masthead/index.vue +1 -1
  52. package/components/ResourceDetail/Masthead/latest.vue +1 -1
  53. package/components/ResourceDetail/Masthead/legacy.vue +8 -7
  54. package/components/ResourceDetail/legacy.vue +15 -15
  55. package/components/ResourceList/Masthead.vue +16 -15
  56. package/components/ResourceTable.vue +16 -0
  57. package/components/SideNav.vue +21 -21
  58. package/components/SingleClusterInfo.vue +2 -1
  59. package/components/SortableTable/THead.vue +46 -1
  60. package/components/SortableTable/index.vue +54 -18
  61. package/components/Tabbed/index.vue +6 -1
  62. package/components/actionButton/index.vue +649 -0
  63. package/components/auth/Principal.vue +16 -8
  64. package/components/auth/RoleDetailEdit.vue +11 -7
  65. package/components/breadcrumb/index.vue +13 -210
  66. package/components/form/ArrayList.vue +164 -147
  67. package/components/form/ArrayListGrouped.vue +5 -3
  68. package/components/form/ChangePassword.vue +1 -1
  69. package/components/form/ClusterAppearance.vue +4 -3
  70. package/components/form/Command.vue +4 -5
  71. package/components/form/Conditions.vue +15 -1
  72. package/components/form/Footer.vue +1 -0
  73. package/components/form/HealthCheck.vue +0 -2
  74. package/components/form/HookOption.vue +87 -58
  75. package/components/form/InputWithSelect.vue +8 -7
  76. package/components/form/KeyValue.vue +20 -2
  77. package/components/form/LabeledSelect.vue +3 -1
  78. package/components/form/Labels.vue +2 -2
  79. package/components/form/MatchExpressions.vue +4 -4
  80. package/components/form/Members/ClusterMembershipEditor.vue +1 -1
  81. package/components/form/Members/ClusterPermissionsEditor.vue +60 -41
  82. package/components/form/Members/MembershipEditor.vue +4 -4
  83. package/components/form/Members/ProjectMembershipEditor.vue +1 -1
  84. package/components/form/NameNsDescription.vue +3 -2
  85. package/components/form/Networking.vue +6 -9
  86. package/components/form/NodeAffinity.vue +29 -28
  87. package/components/form/PodAffinity.vue +23 -23
  88. package/components/form/Probe.vue +15 -11
  89. package/components/form/ProjectMemberEditor.vue +66 -48
  90. package/components/form/ResourceQuota/Namespace.vue +4 -4
  91. package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
  92. package/components/form/ResourceQuota/Project.vue +4 -4
  93. package/components/form/ResourceQuota/ProjectRow.vue +36 -30
  94. package/components/form/ResourceSelector.vue +1 -1
  95. package/components/form/SecretSelector.vue +24 -23
  96. package/components/form/Security.vue +1 -3
  97. package/components/form/Select.vue +7 -1
  98. package/components/form/ServiceNameSelect.vue +2 -5
  99. package/components/form/ServicePorts.vue +149 -75
  100. package/components/form/Tolerations.vue +13 -9
  101. package/components/form/ValueFromResource.vue +110 -96
  102. package/components/formatter/WorkloadHealthScale.vue +4 -3
  103. package/components/nav/Group.vue +8 -1
  104. package/components/nav/Header.vue +51 -174
  105. package/components/nav/NamespaceFilter.vue +14 -19
  106. package/components/nav/TopLevelMenu.vue +100 -126
  107. package/components/nav/Type.vue +11 -3
  108. package/config/menuRouteMap.js +10 -0
  109. package/config/private-label.js +2 -3
  110. package/config/product/explorer.js +32 -10
  111. package/config/product/manager.js +28 -17
  112. package/config/product/uiplugins.js +13 -10
  113. package/config/router/navigation-guards/index.js +61 -3
  114. package/detail/node.vue +28 -23
  115. package/dialog/AddCustomBadgeDialog.vue +17 -9
  116. package/dialog/RollbackWorkloadDialog.vue +1 -1
  117. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  118. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
  119. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  120. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  121. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  122. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  123. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  124. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  125. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  126. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  127. package/edit/configmap.vue +4 -0
  128. package/edit/logging-flow/index.vue +1 -2
  129. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
  130. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
  131. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
  132. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
  133. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
  134. package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
  135. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
  136. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
  137. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
  138. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
  139. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
  140. package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
  141. package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
  142. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
  143. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
  144. package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
  145. package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
  146. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
  147. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
  148. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
  149. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +32 -8
  150. package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
  151. package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
  152. package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
  153. package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
  154. package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
  155. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  156. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  157. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  158. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  159. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  160. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  161. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  162. package/edit/persistentvolume/index.vue +3 -1
  163. package/edit/persistentvolumeclaim.vue +2 -0
  164. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
  165. package/edit/secret/index.vue +2 -2
  166. package/edit/service.vue +4 -1
  167. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  168. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  169. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  170. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  171. package/edit/workload/Job.vue +31 -34
  172. package/edit/workload/Upgrading.vue +5 -5
  173. package/edit/workload/index.vue +19 -15
  174. package/edit/workload/storage/Mount.vue +1 -0
  175. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  176. package/edit/workload/storage/azureDisk.vue +14 -10
  177. package/edit/workload/storage/azureFile.vue +9 -7
  178. package/edit/workload/storage/csi/index.vue +6 -9
  179. package/edit/workload/storage/emptyDir.vue +7 -5
  180. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  181. package/edit/workload/storage/hostPath.vue +7 -5
  182. package/edit/workload/storage/nfs.vue +8 -6
  183. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  184. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
  185. package/edit/workload/storage/secret.vue +9 -6
  186. package/edit/workload/storage/vsphereVolume.vue +11 -7
  187. package/initialize/app-extended.js +7 -1
  188. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
  189. package/mixins/create-edit-view/impl.js +10 -0
  190. package/models/provisioning.cattle.io.cluster.js +19 -18
  191. package/models/workload.js +2 -2
  192. package/package.json +1 -1
  193. package/pages/account/index.vue +93 -58
  194. package/pages/auth/login.vue +25 -28
  195. package/pages/auth/setup.vue +36 -17
  196. package/pages/c/_cluster/auth/roles/index.vue +27 -3
  197. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
  198. package/pages/c/_cluster/explorer/index.vue +2 -1
  199. package/pages/c/_cluster/explorer/tools/index.vue +6 -6
  200. package/pages/home.vue +55 -13
  201. package/pkg/tsconfig.json +9 -9
  202. package/pkg/vue.config.js +1 -1
  203. package/plugins/dashboard-store/actions.js +1 -1
  204. package/public/index.html +1 -1
  205. package/rancher-components/Banner/Banner.vue +14 -2
  206. package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
  207. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
  208. package/scripts/build-pkg.sh +18 -23
  209. package/scripts/publish-shell.sh +1 -1
  210. package/store/i18n.js +1 -0
  211. package/store/index.js +4 -4
  212. package/store/type-map.js +0 -2
  213. package/types/shell/index.d.ts +8 -0
  214. package/utils/error.js +23 -3
  215. package/utils/errorTranslate.json +402 -8
  216. package/utils/errorTranslateNew.json +39 -0
  217. package/utils/roleFiltering.js +33 -0
  218. package/utils/title.ts +1 -1
  219. package/vue.config.js +1 -1
  220. /package/assets/images/{logo.png → pl/dark/logo.png} +0 -0
@@ -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
@@ -33,6 +33,10 @@ export default {
33
33
  TabTitle
34
34
  },
35
35
  props: {
36
+ actionsPositioning: {
37
+ type: String,
38
+ required: '-48px',
39
+ },
36
40
  resource: {
37
41
  type: String,
38
42
  required: true,
@@ -156,37 +160,36 @@ export default {
156
160
  demoDisplay() {
157
161
 
158
162
  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);
163
+ const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation?.params?.resource);
164
+ console.log(product, 'product')
165
+ console.log(productId, 'productId')
166
+ console.log(this._createLocation?.params?.resource, 'this._createLocation?.params?.resource')
165
167
 
166
- // const parts = productId?.split('::') || [];
167
- // const newString = 'root';
168
+ const parts = productId?.split('::') || [];
169
+ const newString = 'root';
168
170
 
171
+ if (!parts) {
172
+ if (this.$route.path.includes('/c/local/explorer/secret')) {
173
+ parts = ['storage']
174
+ }
175
+ }
169
176
 
170
177
  const breadcrumbList = {
171
178
  'harvesterhci.io.management.cluster': {
172
179
  origin: 'Harvester 集群',
173
180
  bread: ['虚拟化管理'],
174
- description: '提供虚拟化集群的实时健康状态监控、版本号管理及资源负载管理,支持批量导入/删除集群、配置调优与权限分级功能,实现高效运维管控。'
175
181
  },
176
182
  'management.cattle.io.user': {
177
183
  origin: '用户',
178
184
  bread: ['用户 & 认证'],
179
- description: '用于管理用户账号,支持创建、维护用户信息,可设置用户权限、管理密码等,保障系统资源仅由授权用户访问,提升系统安全性。'
180
185
  },
181
186
  'management.cattle.io.setting':{
182
187
  origin: '基础设置',
183
188
  bread: ['全局设置'],
184
- description: '统一配置平台基础选项与全局设置,支持CA证书、密码规则、域名、Token时效等核心配置。'
185
189
  },
186
190
  'management.cattle.io.feature':{
187
191
  origin: '功能开关',
188
192
  bread: ['全局设置'],
189
- description: '还没有添加描述。。。。'
190
193
  },
191
194
  }
192
195
  const resourcePath = this.$route.params.resource || ''
@@ -194,7 +197,6 @@ export default {
194
197
  const breadcrumb = []
195
198
  if (breadcrumbList[resourcePath] && Object.keys(breadcrumbList[resourcePath]).length > 0) {
196
199
  breadcrumb.push(...breadcrumbList[resourcePath].bread)
197
- this.description = breadcrumbList[resourcePath].description
198
200
  return breadcrumb
199
201
  } else {
200
202
  if (!parts?.includes(newString)) {
@@ -261,8 +263,6 @@ export default {
261
263
  for (const entry of entries) {
262
264
  const width = entry?.contentRect?.width && entry.contentRect.width > 0 ? entry.contentRect.width + 10 : 0
263
265
 
264
- console.log(width, ' width----------------------------')
265
-
266
266
  this.$store.commit('type-map/setActionsWidth', width)
267
267
  }
268
268
  })
@@ -326,6 +326,7 @@ export default {
326
326
  <div
327
327
  ref="actionsContainer"
328
328
  v-if="!(tabList.includes(_typeDisplay))"
329
+ :style="{ bottom: actionsPositioning ? actionsPositioning : '-48px' }"
329
330
  class="actions-container actions-positioning"
330
331
  style="min-height: 32px;align-self: flex-end;"
331
332
  >
@@ -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;