dashboard-shell-shell 3.0.5-test.8 → 3.0.5-tsh.1

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 (167) 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 +24 -0
  105. package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +39 -0
  106. package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +32 -0
  107. package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +16 -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/pkg/tsconfig.json +9 -9
  155. package/pkg/vue.config.js +1 -1
  156. package/plugins/dashboard-store/actions.js +1 -1
  157. package/rancher-components/Banner/Banner.vue +14 -2
  158. package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
  159. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
  160. package/scripts/build-pkg.sh +18 -23
  161. package/scripts/publish-shell.sh +1 -1
  162. package/store/i18n.js +1 -0
  163. package/store/type-map.js +0 -2
  164. package/utils/error.js +23 -3
  165. package/utils/errorTranslate.json +377 -8
  166. package/utils/errorTranslateNew.json +39 -0
  167. package/vue.config.js +1 -1
@@ -2,7 +2,6 @@
2
2
 
3
3
  SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
4
4
  BASE_DIR="$( cd $SCRIPT_DIR && cd ../.. & pwd)"
5
- SHELL_DIR=$BASE_DIR/shell/
6
5
  EXIT_CODE=0
7
6
  FORMATS="umd-min"
8
7
 
@@ -19,12 +18,18 @@ done
19
18
 
20
19
  shift $((OPTIND-1))
21
20
 
22
- # Use shell folder in node modules when we have @rancher/shell installed as a node module
23
- # rather than the use-case of the mono-repo with the shell folder at the top-level
24
- if [ ! -d ${SHELL_DIR} ]; then
25
- SHELL_DIR=$BASE_DIR/node_modules/@rancher/shell/
26
- SHELL_DIR=$(cd -P ${SHELL_DIR} && pwd)
21
+ # ---- 修改这里 ----
22
+ # 优先使用顶级 shell 文件夹,如果不存在则使用 node_modules/dashboard-shell-shell
23
+ SHELL_DIR=$BASE_DIR/shell/
24
+ if [ ! -d "${SHELL_DIR}" ]; then
25
+ SHELL_DIR=$BASE_DIR/node_modules/dashboard-shell-shell/
26
+ if [ ! -d "${SHELL_DIR}" ]; then
27
+ echo "Error: dashboard-shell-shell not found in node_modules"
28
+ exit 1
29
+ fi
27
30
  fi
31
+ # 转为绝对路径,防止符号链接循环
32
+ SHELL_DIR=$(cd -P "${SHELL_DIR}" && pwd)
28
33
 
29
34
  CREATE_TARBALL=${2}
30
35
 
@@ -46,18 +51,14 @@ if [ -d "${BASE_DIR}/pkg/${1}" ]; then
46
51
 
47
52
  pushd pkg/${1}
48
53
 
49
- # Check that the .shell link exists and points to the correct place
50
- if [ -e ".shell" ]; then
51
- LINK=$(readlink .shell)
52
- if [ "${LINK}" != "${SHELL_DIR}" ]; then
53
- echo ".shell symlink exists but does not point to expected location - please check and fix"
54
- popd
55
- exit -1
56
- fi
57
- else
58
- ln -s ${SHELL_DIR} .shell
54
+ # 删除旧的 .shell,防止循环
55
+ if [ -L ".shell" ] || [ -e ".shell" ]; then
56
+ rm -rf .shell
59
57
  fi
60
58
 
59
+ # 创建新的符号链接
60
+ ln -s "${SHELL_DIR}" .shell
61
+
61
62
  FILE=index.js
62
63
  if [ -f ./index.ts ]; then
63
64
  FILE=index.ts
@@ -72,7 +73,7 @@ if [ -d "${BASE_DIR}/pkg/${1}" ]; then
72
73
  cp -f ./package.json ${PKG_DIST}/package.json
73
74
  node ${SCRIPT_DIR}/pkgfile.js ${PKG_DIST}/package.json
74
75
  rm -rf ${PKG_DIST}/*.bak
75
- rm .shell
76
+ rm -rf .shell
76
77
 
77
78
  popd
78
79
  fi
@@ -81,22 +82,16 @@ if [ $EXIT_CODE -ne 0 ]; then
81
82
  exit $EXIT_CODE
82
83
  fi
83
84
 
84
-
85
85
  if [ -n "${CREATE_TARBALL}" ]; then
86
86
  echo $COMMIT $COMMIT_BRANCH > ${PKG_DIST}/version-commit.txt
87
87
 
88
88
  TARBALL=${NAME}.tar.gz
89
89
 
90
90
  pushd ${PKG_DIST}
91
-
92
91
  rm -f ../$TARBALL
93
-
94
92
  echo "Compressing to ${TARBALL}..."
95
-
96
93
  tar -czf ../${TARBALL} .
97
-
98
94
  popd
99
-
100
95
  fi
101
96
 
102
97
  exit $EXIT_CODE
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  # 执行命令示例:
4
- # TAG=shell-pkg-v3.0.5-test.8 ./shell/scripts/publish-shell.sh
4
+ # TAG=shell-pkg-v3.0.5-test.45 ./shell/scripts/publish-shell.sh
5
5
 
6
6
  set -euo pipefail
7
7
 
package/store/i18n.js CHANGED
@@ -108,6 +108,7 @@ export const getters = {
108
108
  ...args
109
109
  };
110
110
 
111
+ moreArgs['count'] = moreArgs['count'] !== undefined ? moreArgs['count'] : 1
111
112
  return formatter.format(moreArgs);
112
113
  } else {
113
114
  return '?';
package/store/type-map.js CHANGED
@@ -823,9 +823,7 @@ export const getters = {
823
823
  }
824
824
 
825
825
  if ( icon ) {
826
- console.log(icon)
827
826
  label = `<i class="icon icon-fw icon-${ icon }"></i>${ label }`;
828
- console.log(label)
829
827
  }
830
828
 
831
829
  return label;
package/utils/error.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { isArray } from '@shell/utils/array';
2
2
 
3
3
  import translations from './errorTranslate.json';
4
+ import errorTranslateNew from './errorTranslateNew.json';
4
5
 
5
6
  export class ClusterNotFoundError extends Error {
6
7
  static NAME = 'ClusterNotFoundError'
@@ -49,6 +50,7 @@ export class ApiError extends Error {
49
50
  }
50
51
 
51
52
  export function stringify(err) {
53
+
52
54
  let str;
53
55
  if ( typeof err === 'string' ) {
54
56
  str = err;
@@ -146,8 +148,25 @@ export function translateError(error) {
146
148
  }).replace('internal error occurred: ', "");
147
149
  console.log('00044', error);
148
150
 
151
+ // 1. 资源配额错误(最高优先级)
152
+ if (originError.includes('exceeded quota')) {
153
+ return '资源配额超限:请求的资源超过了命名空间的配额限制';
154
+ }
155
+
156
+ // 2. 权限不足错误
157
+ const permissionDeniedPatterns = [
158
+ /"\S+" is forbidden:.*cannot.*(patch|update|create|delete|get|list|watch).*resource/i,
159
+ /is forbidden:.*user.*cannot.*(patch|update|create|delete|get|list|watch)/i
160
+ ];
161
+
162
+ if (permissionDeniedPatterns.some(pattern => pattern.test(originError))) {
163
+ return "权限不足";
164
+ }
165
+
149
166
 
150
- if (error.includes('spec and status of disks on node') && error.includes('are being syncing and please retry later')) {
167
+ if (error.includes("a lowercase rfc 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character")) {
168
+ error = "无效的名称不符合 RFC 1123 命名规则。名称只能包含小写字母、数字或 '-',并且必须以字母或数字开头和结尾(例如 'my-name' 或 '123-abc')。"
169
+ } else if (error.includes('spec and status of disks on node') && error.includes('are being syncing and please retry later')) {
151
170
  error = error.replace('spec and status of disks on node','').replace('are being syncing and please retry later','')
152
171
  error = '节点' + error + '上的硬盘规格和状态正在同步,请稍后重试'
153
172
  } else if (error.includes('same granularity as schedule') && error.includes('and offset less than')) {
@@ -174,7 +193,7 @@ export function translateError(error) {
174
193
 
175
194
  error = `子网 '${subnetName}' 配置无效:1) 名称禁止以数字开头;2) 排除IP[${idx}] 不能为空且必须是合法 IPv4/IPv6 地址或地址段`;
176
195
  }
177
-
196
+
178
197
  // error = error.replace(/admission webhook(.*?)denied the request:/g, (match, p1) => {
179
198
  // return '';
180
199
  // })
@@ -187,8 +206,9 @@ export function translateError(error) {
187
206
  error = error.substring(errorIndex + 4);
188
207
  }
189
208
 
209
+ const translationsList = [...errorTranslateNew.translations, ...translations.translations]
190
210
 
191
- for (const translation of translations.translations) {
211
+ for (const translation of translationsList) {
192
212
 
193
213
  // if (error.includes(translation.pattern)) {
194
214
  // error = error.replace(translation.pattern, translation.replacement);
@@ -1,5 +1,366 @@
1
1
  {
2
2
  "translations": [
3
+ {
4
+ "pattern": "can't delete vlanconfig (\\S+) because the storage network nad (\\S+) is still attached",
5
+ "replacement": "无法删除 VLAN 配置 '$1':存储网络附加定义 '$2' 仍在使用",
6
+ "flags": "gi"
7
+ },
8
+ {
9
+ "pattern": "please stop all workloads before configuring the storage-network setting",
10
+ "replacement": "配置存储网络设置前,请先停止所有工作负载",
11
+ "flags": "gi"
12
+ },
13
+ {
14
+ "pattern": "failure while starting vmi: arm64 not support this disk bus type, please use virtio or scsi",
15
+ "replacement": "启动虚拟机实例失败:ARM64 架构不支持此磁盘总线类型,请使用 virtio 或 scsi",
16
+ "flags": "gi"
17
+ },
18
+ {
19
+ "pattern": "the server could not find the requested resource",
20
+ "replacement": "服务器无法找到请求的资源",
21
+ "flags": "gi"
22
+ },
23
+ {
24
+ "pattern": "failed to create vm backup, error: provisioner nfs.csi.k8s.io is not supported for type backup",
25
+ "replacement": "创建虚拟机备份失败, 错误:nfs存储不支持备份",
26
+ "flags": "gi"
27
+ },
28
+ {
29
+ "pattern": "maximum call stack size exceeded",
30
+ "replacement": "超出最大调用堆栈大小",
31
+ "flags": "gi"
32
+ },
33
+ {
34
+ "pattern": "([^\\s]+) in excludeips is not a valid ip range",
35
+ "replacement": "excludeIPs 中的地址段 '$1' 不是有效的 IP 范围",
36
+ "flags": "gi"
37
+ },
38
+ {
39
+ "pattern": "fail to create service, error: service &quot;([^&]+)&quot; is invalid: metadata\\.name: invalid value: &quot;([^&]+)&quot;: a dns-1035 label must consist of lower case alphanumeric characters or &#39;-&#39;, start with an alphabetic character, and end with an alphanumeric character",
40
+ "replacement": "创建服务失败:服务名称 \"$2\" 不符合 DNS-1035 规则,只能使用小写字母、数字或 '-',并以字母开头、字母或数字结尾",
41
+ "flags": "gi"
42
+ },
43
+ {
44
+ "pattern": "(\\S+) \"(\\S+)\" is forbidden: user \"(\\S+)\" cannot update resource \"(\\S+)\" in api group \"(\\S+)\" at the cluster scope",
45
+ "replacement": "$1 \"$2\" 被禁止:用户 \"$3\" 无权在集群范围内更新 API 组 \"$5\" 中的资源 \"$4\"",
46
+ "flags": "gi"
47
+ },
48
+ {
49
+ "pattern": "virtualmachine\\.kubevirt\\.io \"([^\"]+)\" is invalid:\\[metadata\\.labels: invalid value: \"([^\"]+)\": name part must consist of alphanumeric characters, '-', '_' or '\\.', and must start and end with an alphanumeric character\\]",
50
+ "replacement": "虚拟机 \"$1\" 标签值 \"$2\" 无效:只能包含字母、数字、'-','_'或'.',且以字母/数字开头和结尾",
51
+ "flags": "gi"
52
+ },
53
+ {
54
+ "pattern": "failed to list objects with param:[\\s\\S]*?invalidaccesskeyid[\\s\\S]*?the access key id you provided does not exist in our records(?:[\\s\\S]*?403 [a-f0-9]+)?",
55
+ "replacement": "列举对象失败:AccessKey ID 不存在,请检查密钥是否正确",
56
+ "flags": "gi"
57
+ },
58
+ {
59
+ "pattern": "failed to list objects with param:[\\s\\S]*?signaturedoesnotmatch[\\s\\S]*?check your key and signing method(?:[\\s\\S]*?403 [a-f0-9]+)?",
60
+ "replacement": "列举对象失败:签名不匹配,请确认 AccessKey、SecretKey 及签名方法配置正确",
61
+ "flags": "gi"
62
+ },
63
+ {
64
+ "pattern": "ip (\\S+) in excludeips is not a valid address",
65
+ "replacement": "排除 IP中的地址 '$1' 无效",
66
+ "flags": "gi"
67
+ },
68
+ {
69
+ "pattern": "name part必须 consist of alphanumeric characters, '-', '_'或'.',和must开始and end with an alphanumeric character",
70
+ "replacement": "只能包含字母、数字、'-','_'或'.',且以字母/数字开头和结尾",
71
+ "flags": "gi"
72
+ },
73
+ {
74
+ "pattern": "failure while starting vmi: ",
75
+ "replacement": "虚拟机启动失败:",
76
+ "flags": "gi"
77
+ },
78
+ {
79
+ "pattern": "virtualmachineinstance\\.kubevirt\\.io \"([^\"]+)\" is invalid:\\[metadata\\.labels: invalid value: \"([^\"]+)\": name part must consist of alphanumeric characters, '-', '_' or '\\.', and must start and end with an alphanumeric character",
80
+ "replacement": "'$1' 标签值 '$2' 无效,只能包含字母、数字、'-','_'或'.',且以字母/数字开头和结尾",
81
+ "flags": "gi"
82
+ },
83
+ {
84
+ "pattern": "failed calling webhook \"([^\"]+)\": failed to call webhook: post \"([^\"]+)\": no endpoints available for service \"([^\"]+)\"",
85
+ "replacement": "调用准入钩子 '$1' 失败:服务 '$3' 无可用端点,请检查对应服务状态",
86
+ "flags": "gi"
87
+ },
88
+ {
89
+ "pattern": "failed to list objects with param:[\\s\\S]*?unsupported protocol scheme \"([^\"]+)\"",
90
+ "replacement": "列举对象失败:不支持协议方案 \"$1\",请检查 URL 协议是否正确",
91
+ "flags": "gi"
92
+ },
93
+ {
94
+ "pattern": "subnet (\\S+) cidr (\\S+) is conflict with subnet (\\S+) cidr (\\S+)",
95
+ "replacement": "子网 '$1' CIDR $2 与子网 '$3' CIDR $4 冲突",
96
+ "flags": "gi"
97
+ },
98
+ {
99
+ "pattern": "virtualmachine\\.kubevirt\\.io \"([^\"]+)\" is invalid: metadata\\.annotations: invalid value: \"([^\"]+)\": name part must consist of alphanumeric characters, '-', '_' or '\\.', and must start and end with an alphanumeric character",
100
+ "replacement": "虚拟机 '$1' 注解值 '$2' 无效:只能包含字母、数字、'-','_'或'.',且以字母/数字开头和结尾",
101
+ "flags": "gi"
102
+ },
103
+ {
104
+ "pattern": "storage class must contain (csi\\.storage\\.k8s\\.io/(?:provisioner|node-stage|node-publish)-secret-(?:name|namespace)(?:,\\s*|$))+",
105
+ "replacement": "密钥不能为空",
106
+ "flags": "gi"
107
+ },
108
+ {
109
+ "pattern": "can't delete vlanconfig (\\S+) because it is blocked by vm\\(s\\) ([^,]+(?:,\\s*[^,\\s]+)*) which must be stopped at first",
110
+ "replacement": "无法删除 VLAN 配置 '$1':需先停止虚拟机 '$2'",
111
+ "flags": "gi"
112
+ },
113
+ {
114
+ "pattern": "spec\\.template\\.spec\\.podaffinity\\.requiredduringschedulingignoredduringexecution\\[(\\d+)\\]\\.topologykey: required value: can not be empty[\\s\\S]*?invalid value: \"\"[\\s\\S]*?must start and end with an alphanumeric character",
115
+ "replacement": "拓扑键不能为空",
116
+ "flags": "gi"
117
+ },
118
+ {
119
+ "pattern": "can't delete vlanconfig (\\S+) because it is blocked by vm\\(s\\) ([^,]+(?:,\\s*[^,\\s]+)*) which must be stopped at first",
120
+ "replacement": "无法删除 VLAN 配置 '$1':需先停止虚拟机 '$2'",
121
+ "flags": "gi"
122
+ },
123
+ {
124
+ "pattern": "spec\\.template\\.spec\\.podaffinity\\.requiredduringschedulingignoredduringexecution\\[(\\d+)\\]\\.topologykey: required value: can not be empty[\\s\\S]*?invalid value: \"\"[\\s\\S]*?must start and end with an alphanumeric character",
125
+ "replacement": "拓扑键不能为空",
126
+ "flags": "gi"
127
+ },
128
+ {
129
+ "pattern": "failed to list objects with param:[\\s\\S]*?authorizationheadermalformed[\\s\\S]*?the region is wrong; expecting '([^']+)'[\\s\\S]*",
130
+ "replacement": "参数错误,无法连接到服务器",
131
+ "flags": "gi"
132
+ },
133
+ {
134
+ "pattern": "has timed out progressing.",
135
+ "replacement": "状态更新超时。",
136
+ "flags": "gi"
137
+ },
138
+ {
139
+ "pattern": "The new password must not be the same as the current password",
140
+ "replacement": "新密码不能与当前密码相同,请重新设置",
141
+ "flags": "gi"
142
+ },
143
+ {
144
+ "pattern": "guest memory is greater than the configured maxguest memory",
145
+ "replacement": "内存已超过所配置的最大客户机内存",
146
+ "flags": "gi"
147
+ },
148
+ {
149
+ "pattern": "memory hotplug is only available for vms with at least (\\d+[a-z]*) of guest memory",
150
+ "replacement": "内存热插拔仅适用于客户机内存至少为 $1 的虚拟机",
151
+ "flags": "gi"
152
+ },
153
+ {
154
+ "pattern": "storage class must contain csi\\.storage\\.k8s\\.io/(provisioner-secret-name|provisioner-secret-namespace|node-stage-secret-name|node-stage-secret-namespace|node-publish-secret-name|node-publish-secret-namespace)(?:,\\s*)?(.*)",
155
+ "replacement": "存储池必须包含以下 CSI 密钥注解:$1$2",
156
+ "flags": "gi"
157
+ },
158
+ {
159
+ "pattern": "sourceimagename is required when image source type is \"clone\"",
160
+ "replacement": "镜像来源类型为“克隆”时,必须填写源镜像名称",
161
+ "flags": "gi"
162
+ },
163
+ {
164
+ "pattern": "([^\"\\s]+) exceeds the file size limit of (\\d+) bytes",
165
+ "replacement": "文件 '$1' 超过大小限制 $2 字节",
166
+ "flags": "gi"
167
+ },
168
+ {
169
+ "pattern": "failure while starting vmi: virtualmachineinstance\\.kubevirt\\.io \"([^\"]+)\" is invalid: metadata\\.labels: invalid value: \"([^\"]+)\": name part must consist of alphanumeric characters, '-', '_' or '\\.', and must start and end with an alphanumeric character",
170
+ "replacement": "启动虚拟机实例失败:'$1' 标签值 '$2' 无效,只能包含字母、数字、'-','_'或'.',且以字母/数字开头和结尾",
171
+ "flags": "gi"
172
+ },
173
+ {
174
+ "pattern": "virtualmachine\\.kubevirt\\.io \"([^\"]+)\" is invalid:[\\s\\S]*?metadata\\.labels: invalid value: \"([^\"]*)\"[\\s\\S]*?regex used for validation is '([^']+)'",
175
+ "replacement": "虚拟机 '$1' 标签值 '$2' 无效:只能包含字母、数字、'-','_' 或 '.',且以字母/数字开头结尾(正则:$3)",
176
+ "flags": "gi"
177
+ },
178
+ {
179
+ "pattern": "virtualmachine\\.kubevirt\\.io \"([^\"]+)\" is invalid:[\\s\\S]*?spec\\.template: Invalid value: corev1\\.PodTemplateSpec \\{[\\s\\S]*?spec: corev1\\.PodSpec \\{[\\s\\S]*?containers: \\[corev1\\.Container \\{[\\s\\S]*?image: \"([^\"]*)\",[\\s\\S]*?\\}\\],[\\s\\S]*?nodeSelector: map\\[([^:]+): ([^\\]]+)\\],[\\s\\S]*?\\},[\\s\\S]*?\\},[\\s\\S]*?\\},[\\s\\S]*?regex used for validation is '([^']+)'",
180
+ "replacement": "虚拟机 '$1' 的镜像 '$2' 无法在节点标签 '$3=$4' 的节点上运行(正则:$5)",
181
+ "flags": "gi"
182
+ },
183
+ {
184
+ "pattern": "role is locked and cannot be assigned",
185
+ "replacement": "角色已被锁定,不能再分配",
186
+ "flags": "gi"
187
+ },
188
+ {
189
+ "pattern": "invalid current password",
190
+ "replacement": "当前密码输入错误,请重新输入",
191
+ "flags": "gi"
192
+ },
193
+ {
194
+ "pattern": "spec\\.template\\.spec\\.podaffinity\\.requiredduringschedulingignoredduringexecution\\[(\\d+)\\]\\.topologykey: required value: can not be empty[\\s\\S]*?regex used for validation is '([^']+)'",
195
+ "replacement": "拓扑键不能为空",
196
+ "flags": "gi"
197
+ },
198
+ {
199
+ "pattern": "pcidevice ([^\\s]+) has no iommugroup available",
200
+ "replacement": "PCI 设备 '$1' 没有可用的 IOMMU 组",
201
+ "flags": "gi"
202
+ },
203
+ {
204
+ "pattern": "invalidbodycontent 422: failed to parse totalsnapshotsizequota: quantities must match the regular expression '\\^\\(\\[\\+\\-\\]\\?\\[0-9\\.\\]\\+\\)\\(\\[eeinumkkmgtp\\]\\*\\[\\-\\+\\]\\?\\[0-9\\]\\*\\)\\$'",
205
+ "replacement": "快照配额不能为空",
206
+ "flags": "gi"
207
+ },
208
+ {
209
+ "pattern": "secrets \"([^\"]+)\" already exists",
210
+ "replacement": "密钥 \"$1\" 已存在",
211
+ "flags": "gi"
212
+ },
213
+ {
214
+ "pattern": "backup target is invalid",
215
+ "replacement": "备份目标无效",
216
+ "flags": "gi"
217
+ },
218
+ {
219
+ "pattern": "failed to list objects with param:[\\s\\S]*?server gave http response to https client",
220
+ "replacement": "列举对象失败:服务器返回 HTTP 响应,但客户端使用 HTTPS,请检查协议配置",
221
+ "flags": "gi"
222
+ },
223
+ {
224
+ "pattern": "clusternetwork\\.network\\.harvesterhci\\.io \"([^\"]+)\" is invalid: metadata\\.name: invalid value: \"([^\"]*)\": a lowercase rfc 1123 subdomain must consist of lower case alphanumeric characters, '-' or '\\.', and must start and end with an alphanumeric character",
225
+ "replacement": "集群网络名称 '$1' 无效:须符合 RFC 1123 子域名规则,只能使用小写字母、数字、'-' 或 '.',且以字母或数字开头和结尾",
226
+ "flags": "gi"
227
+ },
228
+ {
229
+ "pattern": "loadbalancer\\.loadbalancer\\.harvesterhci\\.io \"([^\"]+)\" is invalid: \\[spec\\.listeners\\[(\\d+)\\]\\.(backendport|port): required value[^\\]]*\\]",
230
+ "replacement": "负载均衡器 '$1' 配置无效:第 $2 个监听器的 $3 为必填项",
231
+ "flags": "gi"
232
+ },
233
+ {
234
+ "pattern": "can't delete cluster network (\\S+) because vlanconfig\\(s\\) \\[(.*?)\\] under this clusternetwork are still existing",
235
+ "replacement": "无法删除集群网络 '$1',因其下仍存在 VLAN 配置 [$2]",
236
+ "flags": "gi"
237
+ },
238
+ {
239
+ "pattern": "value: (\\d+) must be in range \\[1 \\.\\. (\\d+)\\]",
240
+ "replacement": "值 $1 超出范围,必须在 1–$2 之间",
241
+ "flags": "gi"
242
+ },
243
+ {
244
+ "pattern": "can't delete vlanconfig (\\S+) because it is blocked by vm\\(s\\) ([^/]+)/(\\S+) which must be stopped at first",
245
+ "replacement": "无法删除 VLAN 配置 '$1':需先停止虚拟机 '$2/$3'",
246
+ "flags": "gi"
247
+ },
248
+ {
249
+ "pattern": "cannot find nfs path",
250
+ "replacement": "无法找到 NFS 路径",
251
+ "flags": "gi"
252
+ },
253
+ {
254
+ "pattern": "get \"([^\"]+)\": unsupported protocol scheme \"\"",
255
+ "replacement": "url 无效",
256
+ "flags": "gi"
257
+ },
258
+ {
259
+ "pattern": "cannot mount nfs ([^\\s]+)[\\s\\S]*?no such file or directory[\\s\\S]*?cannot mount using nfsv4",
260
+ "replacement": "备份存储的端点无法访问",
261
+ "flags": "gi"
262
+ },
263
+ {
264
+ "pattern": "can't create nad ([^/]+)/([^\\s]+) because the gateway ([^\\s]+) is invalid",
265
+ "replacement": "无法创建虚拟网络 '$1/$2',因为网关 '$3' 无效",
266
+ "flags": "gi"
267
+ },
268
+ {
269
+ "pattern": "can't create nad ([^/]+)/([^\\s]+) because the cidr ([^\\s]+) is invalid",
270
+ "replacement": "无法创建虚拟网络 '$1/$2',因为 CIDR '$3' 无效",
271
+ "flags": "gi"
272
+ },
273
+ {
274
+ "pattern": "no matching backup found for url ([^\\s]+) and backing image ([^\\s]+)",
275
+ "replacement": "未找到与 URL $1 和镜像 $2 匹配的备份",
276
+ "flags": "gi"
277
+ },
278
+ {
279
+ "pattern": "take virtual machine snapshot ([^\\s]+) successfully\\.",
280
+ "replacement": "虚拟机快照 '$1' 创建成功。",
281
+ "flags": "gi"
282
+ },
283
+ {
284
+ "pattern": "delete virtual machine snapshot ([^\\s]+) successfully\\.",
285
+ "replacement": "虚拟机快照 '$1' 删除成功。",
286
+ "flags": "gi"
287
+ },
288
+ {
289
+ "pattern": "restore virtual machine snapshot ([^\\s]+) successfully\\.",
290
+ "replacement": "虚拟机快照 '$1' 恢复成功。",
291
+ "flags": "gi"
292
+ },
293
+ {
294
+ "pattern": "update virtual machine snapshot ([^\\s]+) successfully\\.",
295
+ "replacement": "虚拟机快照 '$1' 更新成功。",
296
+ "flags": "gi"
297
+ },
298
+ {
299
+ "pattern": "failed to create subnet ([^\\s]+), conflict with existing subnet ([^\\s]+)",
300
+ "replacement": "创建子网 '$1' 失败,地址段与现有子网 '$2' 冲突",
301
+ "flags": "gi"
302
+ },
303
+ {
304
+ "pattern": "subnet\\.kubeovn\\.io \"([^\"]*)\" is invalid: metadata\\.name: invalid value: \"([^\"]*)\": metadata\\.name in body should match '\\^\\[\\^0-9\\]'",
305
+ "replacement": "子网名称 '$1' 无效:名称不能以数字开头",
306
+ "flags": "gi"
307
+ },
308
+ {
309
+ "pattern": "(\\S+) conflict with v4 loopback cidr (\\S+)",
310
+ "replacement": "地址段 $1 与 IPv4 回环地址段 $2 冲突",
311
+ "flags": "gi"
312
+ },
313
+ {
314
+ "pattern": "can't delete subnet when any ips in using",
315
+ "replacement": "子网中仍有 IP 地址正在使用,无法删除",
316
+ "flags": "gi"
317
+ },
318
+ {
319
+ "pattern": "subnet ([^\\s]+) is still using the nad ([^\\s]+) default",
320
+ "replacement": "子网 '$1' 正在使用虚拟网络 '$2',请先删除子网 '$1' ",
321
+ "flags": "gi"
322
+ },
323
+ {
324
+ "pattern": "can't delete vpc when any subnet in the vpc",
325
+ "replacement": "VPC 内仍存在子网,无法删除该 VPC",
326
+ "flags": "gi"
327
+ },
328
+ {
329
+ "pattern": "(\\S+) in allowsubnets is not a valid address",
330
+ "replacement": "允许互通子网地址 $1 无效",
331
+ "flags": "gi"
332
+ },
333
+ {
334
+ "pattern": "gateway (\\S+) is not in cidr (\\S+)",
335
+ "replacement": "网关地址 $1 不在 CIDR $2 范围内",
336
+ "flags": "gi"
337
+ },
338
+ {
339
+ "pattern": "subnet ([^\\s]+) is using the provider ([^\\s]+) already",
340
+ "replacement": "子网 '$1' 已使用虚拟网络 '$2'",
341
+ "flags": "gi"
342
+ },
343
+ {
344
+ "pattern": "invalid next hop ip",
345
+ "replacement": "无效的下一跳地址",
346
+ "flags": "gi"
347
+ },
348
+ {
349
+ "pattern": "number of sockets in cpu topology is greater than the maximum sockets allowed, number of sockets in cpu topology is greater than the maximum sockets allowed",
350
+ "replacement": "CPU 拓扑中的 socket 数量已超过最大允许值",
351
+ "flags": "gi"
352
+ },
353
+ {
354
+ "pattern": "number of sockets in cpu topology is greater than the maximum sockets allowed",
355
+ "replacement": "CPU 拓扑中的 socket 数量已超过最大允许值",
356
+ "flags": "gi"
357
+ },
358
+
359
+ {
360
+ "pattern": "not a default subnet join as provider is ([^\\s]+)",
361
+ "replacement": "非默认子网,当前以提供者 $1 加入",
362
+ "flags": "gi"
363
+ },
3
364
  {
4
365
  "pattern": "subnet ([^\\s]+) cidr ([^\\s]+) is invalid, due to invalid cidr address: ([^\\s]+)",
5
366
  "replacement": "子网 '$1' 的 CIDR 地址 '$2' 无效:不是合法的 CIDR 格式",
@@ -7,12 +368,12 @@
7
368
  },
8
369
  {
9
370
  "pattern": "validation failed in api: vpc.kubeovn.io \"([^\"]*)\" is invalid: metadata\\.name: invalid value: \"([^\"]*)\": a lowercase rfc 1123 subdomain must consist of lower case alphanumeric characters, '-' or '\\.', and must start and end with an alphanumeric character \\(e\\.g\\..*?\\)",
10
- "replacement": "API 校验失败:VPC 名称 \"$1\" 不符合 RFC 1123 子域名规则,只能使用小写字母、数字、'-' 或 '.',且必须以字母/数字开头和结尾",
371
+ "replacement": "校验失败:VPC 名称 \"$1\" 不符合 RFC 1123 子域名规则,只能使用小写字母、数字、'-' 或 '.',且必须以字母/数字开头和结尾",
11
372
  "flags": "gi"
12
373
  },
13
374
  {
14
375
  "pattern": "validation 失败 in api",
15
- "replacement": "API 校验失败",
376
+ "replacement": "校验失败",
16
377
  "flags": "gi"
17
378
  },
18
379
  {
@@ -832,11 +1193,11 @@
832
1193
  },
833
1194
  {
834
1195
  "pattern": "virtualmachinebackup.harvesterhci.io",
835
- "replacement": "虚拟机备份"
1196
+ "replacement": "虚拟机备份恢复"
836
1197
  },
837
1198
  {
838
1199
  "pattern": "virtualmachinebackup.cloudhci.io",
839
- "replacement": "虚拟机备份"
1200
+ "replacement": "虚拟机备份恢复"
840
1201
  },
841
1202
  {
842
1203
  "pattern": "vlanconfigs.network.harvesterhci.io",
@@ -1191,6 +1552,10 @@
1191
1552
  "pattern": "could not",
1192
1553
  "replacement": "无法"
1193
1554
  },
1555
+ {
1556
+ "pattern": "MissingRequired",
1557
+ "replacement": "缺少"
1558
+ },
1194
1559
  {
1195
1560
  "pattern": "cannot",
1196
1561
  "replacement": "不能"
@@ -1259,10 +1624,6 @@
1259
1624
  "pattern": "nad ",
1260
1625
  "replacement": "虚拟网络"
1261
1626
  },
1262
- {
1263
- "pattern": " is",
1264
- "replacement": "是"
1265
- },
1266
1627
  {
1267
1628
  "pattern": "please ",
1268
1629
  "replacement": "请"
@@ -1343,6 +1704,14 @@
1343
1704
  "pattern": "&quot;备份&quot; 是必填项。",
1344
1705
  "replacement": "\"快照/备份\" 是必填项"
1345
1706
  },
1707
+ {
1708
+ "pattern": "namespaces",
1709
+ "replacement": "资源组"
1710
+ },
1711
+ {
1712
+ "pattern": "replicaset",
1713
+ "replacement": "副本集"
1714
+ },
1346
1715
  {
1347
1716
  "pattern": "%",
1348
1717
  "replacement": ""
@@ -0,0 +1,39 @@
1
+ {
2
+ "translations": [
3
+ {
4
+ "pattern": "Method (POST|GET|CREATE|DELETE|PUT|PATCH|OPTIONS|HEAD|TRACE|CONNECT) not supported",
5
+ "replacement": "权限不足",
6
+ "flags": "gi"
7
+ },
8
+ {
9
+ "pattern": "Cluster agent is not connected",
10
+ "replacement": "集群agent未连接",
11
+ "flags": "gi"
12
+ },
13
+ {
14
+ "pattern": "waiting for api to be available",
15
+ "replacement": "等待api可用",
16
+ "flags": "gi"
17
+ },
18
+ {
19
+ "pattern": "MissingRequired Cluster name",
20
+ "replacement": "缺少集群名称",
21
+ "flags": "gi"
22
+ },
23
+ {
24
+ "pattern": "users\\.management\\.cattle\\.io.*forbidden.*user.*cannot update resource.*users.*management\\.cattle\\.io.*cluster scope",
25
+ "replacement": "权限不足:当前用户无权修改用户资源。",
26
+ "flags": "gi"
27
+ },
28
+ {
29
+ "pattern": "Cluster agent is not connected",
30
+ "replacement": "集群agent未连接",
31
+ "flags": "gi"
32
+ },
33
+ {
34
+ "pattern": "waiting for api to be available",
35
+ "replacement": "等待api可用",
36
+ "flags": "gi"
37
+ }
38
+ ]
39
+ }
package/vue.config.js CHANGED
@@ -157,7 +157,7 @@ const getLoaders = (SHELL_ABS) => [
157
157
  test: /\.m?[tj]sx?$/,
158
158
  // This excludes no modules except for node_modules/@rancher/... so that plugins can properly compile
159
159
  // when referencing @rancher/shell
160
- exclude: /node_modules\/(?!(@rancher)\/).*/,
160
+ exclude: /node_modules\/(?!(dashboard-shell-shell)\/).*/,
161
161
  use: [
162
162
  {
163
163
  loader: 'cache-loader',