dashboard-shell-shell 3.0.5-test.40 → 3.0.5-test.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/translations/zh-hans.yaml +7 -0
- package/components/PromptRemove.vue +17 -1
- package/components/form/Select.vue +1 -1
- package/config/product/manager.js +28 -17
- package/package.json +1 -1
- package/rancher-components/Banner/Banner.vue +8 -1
- package/scripts/publish-shell.sh +1 -1
- package/utils/errorTranslate.json +50 -0
|
@@ -595,6 +595,7 @@ assignTo:
|
|
|
595
595
|
workspace: 工作空间
|
|
596
596
|
|
|
597
597
|
stateLabel:
|
|
598
|
+
Waiting: 等待中
|
|
598
599
|
Images preloading: 图像预加载中
|
|
599
600
|
Images preloaded: 图像已预加载
|
|
600
601
|
Waiting Reboot: 等待重启
|
|
@@ -4563,6 +4564,12 @@ promptRemove:
|
|
|
4563
4564
|
promptRemoveApp:
|
|
4564
4565
|
removeCrd: "删除与此应用关联的 CRD"
|
|
4565
4566
|
|
|
4567
|
+
promptRemoveText:
|
|
4568
|
+
globalrole: "角色"
|
|
4569
|
+
globalroles: "角色"
|
|
4570
|
+
roletemplate: "角色"
|
|
4571
|
+
roletemplates: "角色"
|
|
4572
|
+
|
|
4566
4573
|
promptRestore:
|
|
4567
4574
|
title: 还原快照
|
|
4568
4575
|
name: 名称
|
|
@@ -83,6 +83,22 @@ export default {
|
|
|
83
83
|
return this.$store.getters['type-map/labelFor'](schema, this.toRemove.length);
|
|
84
84
|
},
|
|
85
85
|
|
|
86
|
+
typeZh() {
|
|
87
|
+
const typeLabel = this.type
|
|
88
|
+
|
|
89
|
+
const lowerKey = typeLabel.toLowerCase();
|
|
90
|
+
const i18nKey = `promptRemoveText.${lowerKey}`;
|
|
91
|
+
|
|
92
|
+
console.log(i18nKey, ' i18nKey-------------------------');
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
if (this.t(i18nKey)) {
|
|
96
|
+
return this.t(i18nKey);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return typeLabel;
|
|
100
|
+
},
|
|
101
|
+
|
|
86
102
|
selfLinks() {
|
|
87
103
|
return this.toRemove.map((resource) => {
|
|
88
104
|
return get(resource, 'links.self');
|
|
@@ -380,7 +396,7 @@ export default {
|
|
|
380
396
|
:needs-confirm="needsConfirm"
|
|
381
397
|
:value="toRemove"
|
|
382
398
|
:names="names"
|
|
383
|
-
:type="
|
|
399
|
+
:type="typeZh"
|
|
384
400
|
:done-location="doneLocation"
|
|
385
401
|
@errors="e => error = e"
|
|
386
402
|
@done="done"
|
|
@@ -13,6 +13,7 @@ import { DSL } from '@shell/store/type-map';
|
|
|
13
13
|
import { BLANK_CLUSTER } from '@shell/store/store-types.js';
|
|
14
14
|
|
|
15
15
|
export const NAME = 'manager';
|
|
16
|
+
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS')
|
|
16
17
|
|
|
17
18
|
export function init(store) {
|
|
18
19
|
const {
|
|
@@ -60,11 +61,17 @@ export function init(store) {
|
|
|
60
61
|
route: { name: 'c-cluster-manager-cloudCredential' },
|
|
61
62
|
});
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
if (topLevelPermissions && topLevelPermissions === 'superadmin') {
|
|
65
|
+
basicType([
|
|
66
|
+
CAPI.RANCHER_CLUSTER,
|
|
67
|
+
'cloud-credentials',
|
|
68
|
+
'drivers',
|
|
69
|
+
]);
|
|
70
|
+
} else {
|
|
71
|
+
basicType([
|
|
72
|
+
CAPI.RANCHER_CLUSTER,
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
68
75
|
|
|
69
76
|
configureType(SNAPSHOT, { depaginate: true });
|
|
70
77
|
|
|
@@ -111,10 +118,12 @@ export function init(store) {
|
|
|
111
118
|
exact: true
|
|
112
119
|
});
|
|
113
120
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
121
|
+
if (topLevelPermissions && topLevelPermissions === 'superadmin') {
|
|
122
|
+
basicType([
|
|
123
|
+
'rke-kontainer-drivers',
|
|
124
|
+
'rke-node-drivers',
|
|
125
|
+
], 'drivers');
|
|
126
|
+
}
|
|
118
127
|
|
|
119
128
|
weightType(CAPI.MACHINE_DEPLOYMENT, 4, true);
|
|
120
129
|
weightType(CAPI.MACHINE_SET, 3, true);
|
|
@@ -123,14 +132,16 @@ export function init(store) {
|
|
|
123
132
|
weightType(MANAGEMENT.PSA, 5, true);
|
|
124
133
|
weightType(VIRTUAL_TYPES.JWT_AUTHENTICATION, 0, true);
|
|
125
134
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
if (topLevelPermissions && topLevelPermissions === 'superadmin') {
|
|
136
|
+
basicType([
|
|
137
|
+
CAPI.MACHINE_DEPLOYMENT,
|
|
138
|
+
CAPI.MACHINE_SET,
|
|
139
|
+
CAPI.MACHINE,
|
|
140
|
+
CATALOG.CLUSTER_REPO,
|
|
141
|
+
MANAGEMENT.PSA,
|
|
142
|
+
VIRTUAL_TYPES.JWT_AUTHENTICATION
|
|
143
|
+
], 'advanced');
|
|
144
|
+
}
|
|
134
145
|
|
|
135
146
|
weightGroup('advanced', -1, true);
|
|
136
147
|
|
package/package.json
CHANGED
|
@@ -78,7 +78,14 @@ export default defineComponent({
|
|
|
78
78
|
* Return message text as label.
|
|
79
79
|
*/
|
|
80
80
|
messageLabel(): string | void {
|
|
81
|
-
|
|
81
|
+
|
|
82
|
+
let labelStr = this.label
|
|
83
|
+
|
|
84
|
+
if (labelStr === 'waiting for api to be available') {
|
|
85
|
+
labelStr = '等待api可用'
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return !(typeof labelStr === 'string') ? stringify(labelStr) : undefined;
|
|
82
89
|
},
|
|
83
90
|
},
|
|
84
91
|
methods: { nlToBr }
|
package/scripts/publish-shell.sh
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"translations": [
|
|
3
|
+
{
|
|
4
|
+
"pattern": "storageclasses.storage.k8sio \"(\\S+)\" is forbidden: User \"(\\S+)\" cannot patch resource \"(\\S+)\" in APl group \"(\\S+)\" at the cluster scope",
|
|
5
|
+
"replacement": "权限不足",
|
|
6
|
+
"flags": "gi"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"pattern": "virtualmachineimages.harvesterhciio \"(\\S+)\" is forbidden: User \"(\\S+)\" cannot patch resource \"(\\S+)\" in Apl group \"(\\S+)\" in the namespace \"(\\S+)\"",
|
|
10
|
+
"replacement": "权限不足",
|
|
11
|
+
"flags": "gi"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"pattern": "Method POST not supported",
|
|
15
|
+
"replacement": "权限不足",
|
|
16
|
+
"flags": "gi"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"pattern": "Method GET not supported",
|
|
20
|
+
"replacement": "权限不足",
|
|
21
|
+
"flags": "gi"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"pattern": "Method CREATE not supported",
|
|
25
|
+
"replacement": "权限不足",
|
|
26
|
+
"flags": "gi"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"pattern": "Method GET not supported",
|
|
30
|
+
"replacement": "权限不足",
|
|
31
|
+
"flags": "gi"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"pattern": "Method DELETE not supported",
|
|
35
|
+
"replacement": "权限不足",
|
|
36
|
+
"flags": "gi"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"pattern": "Method PUT not supported",
|
|
40
|
+
"replacement": "权限不足",
|
|
41
|
+
"flags": "gi"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"pattern": "failure while starting vmi: arm64 not support this disk bus type, please use virtio or scsi",
|
|
45
|
+
"replacement": "启动虚拟机实例失败:ARM64 架构不支持此磁盘总线类型,请使用 virtio 或 scsi",
|
|
46
|
+
"flags": "gi"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"pattern": "the server could not find the requested resource",
|
|
50
|
+
"replacement": "服务器无法找到请求的资源",
|
|
51
|
+
"flags": "gi"
|
|
52
|
+
},
|
|
3
53
|
{
|
|
4
54
|
"pattern": "failed to create vm backup, error: provisioner nfs.csi.k8s.io is not supported for type backup",
|
|
5
55
|
"replacement": "创建虚拟机备份失败, 错误:nfs存储不支持备份",
|