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.
@@ -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="type"
399
+ :type="typeZh"
384
400
  :done-location="doneLocation"
385
401
  @errors="e => error = e"
386
402
  @done="done"
@@ -391,7 +391,7 @@ export default {
391
391
  <style lang="scss" scoped>
392
392
  .unlabeled-select {
393
393
  position: relative;
394
- width: 100%;
394
+ width: 400px;
395
395
 
396
396
  :deep() .vs__actions:after {
397
397
  // padding-top: 2px;
@@ -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
- basicType([
64
- CAPI.RANCHER_CLUSTER,
65
- 'cloud-credentials',
66
- 'drivers',
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
- basicType([
115
- 'rke-kontainer-drivers',
116
- 'rke-node-drivers',
117
- ], 'drivers');
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
- basicType([
127
- CAPI.MACHINE_DEPLOYMENT,
128
- CAPI.MACHINE_SET,
129
- CAPI.MACHINE,
130
- CATALOG.CLUSTER_REPO,
131
- MANAGEMENT.PSA,
132
- VIRTUAL_TYPES.JWT_AUTHENTICATION
133
- ], 'advanced');
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashboard-shell-shell",
3
- "version": "3.0.5-test.40",
3
+ "version": "3.0.5-test.41",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -78,7 +78,14 @@ export default defineComponent({
78
78
  * Return message text as label.
79
79
  */
80
80
  messageLabel(): string | void {
81
- return !(typeof this.label === 'string') ? stringify(this.label) : undefined;
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 }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  # 执行命令示例:
4
- # TAG=shell-pkg-v3.0.5-test.40 ./shell/scripts/publish-shell.sh
4
+ # TAG=shell-pkg-v3.0.5-test.41 ./shell/scripts/publish-shell.sh
5
5
 
6
6
  set -euo pipefail
7
7
 
@@ -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存储不支持备份",