dashboard-shell-shell 3.0.5-test.5 → 3.0.5-test.51
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/brand/csp/favicon.png +0 -0
- package/assets/icons/iconfont.css +4 -1
- package/assets/images/pl/dark/logo.png +0 -0
- package/assets/styles/all.scss +23 -3
- package/assets/styles/base/_variables.scss +5 -5
- package/assets/styles/fonts/_icons.scss +3 -2
- package/assets/styles/global/_button.scss +2 -2
- package/assets/styles/global/_form.scss +1 -0
- package/assets/styles/global/_select.scss +1 -1
- package/assets/styles/global/_tooltip.scss +5 -1
- package/assets/styles/themes/_light.scss +3 -3
- package/assets/styles/vendor/vue-select.scss +2 -1
- package/assets/translations/en-us.yaml +64 -0
- package/assets/translations/zh-hans.yaml +206 -21
- package/components/ButtonDropdown.vue +3 -1
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +6 -4
- package/components/ConsumptionGauge.vue +1 -1
- package/components/ContainerResourceLimit.vue +2 -2
- package/components/CruResource.vue +3 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +10 -7
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +3 -2
- package/components/ExplorerMembers.vue +10 -1
- package/components/GlobalRoleBindings.vue +69 -114
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptRemove.vue +23 -1
- package/components/RelatedResources.vue +3 -0
- package/components/Resource/Detail/Metadata/index.vue +1 -0
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/composables.ts +16 -1
- package/components/Resource/Detail/TitleBar/index.vue +42 -23
- package/components/ResourceDetail/Masthead/index.vue +1 -1
- package/components/ResourceDetail/Masthead/latest.vue +1 -1
- package/components/ResourceDetail/Masthead/legacy.vue +8 -7
- package/components/ResourceDetail/legacy.vue +15 -15
- package/components/ResourceList/Masthead.vue +13 -17
- package/components/ResourceTable.vue +16 -0
- package/components/SideNav.vue +21 -21
- package/components/SingleClusterInfo.vue +2 -1
- package/components/SortableTable/THead.vue +46 -1
- package/components/SortableTable/index.vue +55 -19
- package/components/Tabbed/index.vue +7 -2
- package/components/auth/Principal.vue +16 -8
- package/components/auth/RoleDetailEdit.vue +11 -7
- package/components/breadcrumb/index.vue +15 -236
- package/components/form/ArrayList.vue +164 -147
- package/components/form/ArrayListGrouped.vue +5 -3
- package/components/form/ChangePassword.vue +1 -1
- package/components/form/ClusterAppearance.vue +4 -3
- package/components/form/Command.vue +4 -5
- package/components/form/Conditions.vue +15 -1
- package/components/form/Footer.vue +1 -0
- package/components/form/HealthCheck.vue +0 -2
- package/components/form/HookOption.vue +87 -58
- package/components/form/InputWithSelect.vue +8 -7
- package/components/form/KeyValue.vue +20 -2
- package/components/form/LabeledSelect.vue +3 -1
- package/components/form/Labels.vue +2 -2
- package/components/form/MatchExpressions.vue +4 -4
- package/components/form/Members/ClusterMembershipEditor.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +60 -41
- package/components/form/Members/MembershipEditor.vue +4 -4
- package/components/form/Members/ProjectMembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +2 -1
- package/components/form/Networking.vue +6 -9
- package/components/form/NodeAffinity.vue +29 -28
- package/components/form/PodAffinity.vue +23 -23
- package/components/form/Probe.vue +15 -11
- package/components/form/ProjectMemberEditor.vue +66 -48
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +36 -30
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/Security.vue +1 -3
- package/components/form/Select.vue +7 -1
- package/components/form/ServiceNameSelect.vue +2 -5
- package/components/form/ServicePorts.vue +149 -75
- package/components/form/Tolerations.vue +13 -9
- package/components/form/ValueFromResource.vue +110 -96
- package/components/formatter/WorkloadHealthScale.vue +4 -3
- package/components/nav/Group.vue +6 -0
- package/components/nav/Header.vue +17 -137
- package/components/nav/NamespaceFilter.vue +15 -21
- package/components/nav/TopLevelMenu.vue +99 -125
- package/components/nav/Type.vue +11 -3
- package/config/menuRouteMap.js +10 -0
- package/config/product/explorer.js +32 -10
- package/config/product/manager.js +28 -17
- package/config/router/navigation-guards/index.js +61 -3
- package/detail/node.vue +28 -23
- package/dialog/AddCustomBadgeDialog.vue +17 -9
- package/dialog/RollbackWorkloadDialog.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
- package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
- package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
- package/edit/configmap.vue +4 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
- package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
- package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/persistentvolume/index.vue +3 -1
- package/edit/persistentvolumeclaim.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
- package/edit/secret/index.vue +2 -2
- package/edit/service.vue +4 -1
- package/edit/storage.k8s.io.storageclass/index.vue +10 -8
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
- package/edit/workload/Job.vue +31 -34
- package/edit/workload/Upgrading.vue +5 -5
- package/edit/workload/index.vue +19 -15
- package/edit/workload/storage/Mount.vue +1 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
- package/edit/workload/storage/azureDisk.vue +14 -10
- package/edit/workload/storage/azureFile.vue +9 -7
- package/edit/workload/storage/csi/index.vue +6 -9
- package/edit/workload/storage/emptyDir.vue +7 -5
- package/edit/workload/storage/gcePersistentDisk.vue +9 -7
- package/edit/workload/storage/hostPath.vue +7 -5
- package/edit/workload/storage/nfs.vue +8 -6
- package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
- package/edit/workload/storage/secret.vue +9 -6
- package/edit/workload/storage/vsphereVolume.vue +11 -7
- package/initialize/app-extended.js +7 -1
- package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
- package/mixins/create-edit-view/impl.js +10 -0
- package/models/provisioning.cattle.io.cluster.js +19 -18
- package/models/workload.js +2 -2
- package/package.json +1 -1
- package/pages/account/index.vue +96 -115
- package/pages/auth/setup.vue +36 -17
- package/pages/c/_cluster/auth/roles/index.vue +65 -8
- package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
- package/pages/c/_cluster/explorer/index.vue +2 -1
- package/pages/c/_cluster/explorer/tools/index.vue +6 -6
- package/pages/home.vue +55 -13
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/rancher-components/Banner/Banner.vue +14 -2
- package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
- package/scripts/build-pkg.sh +18 -23
- package/scripts/publish-shell.sh +1 -1
- package/store/i18n.js +1 -0
- package/store/type-map.js +1 -3
- package/types/shell/index.d.ts +12 -30
- package/utils/error.js +26 -4
- package/utils/errorTranslate.json +390 -6
- package/utils/errorTranslateNew.json +39 -0
- package/utils/roleFiltering.js +33 -0
- package/vue.config.js +1 -1
|
@@ -120,15 +120,16 @@ export default {
|
|
|
120
120
|
|
|
121
121
|
<style lang="scss">
|
|
122
122
|
.array-list-grouped {
|
|
123
|
-
|
|
123
|
+
.box {
|
|
124
|
+
border: 0px solid var(--tabbed-border) !important;
|
|
124
125
|
position: relative;
|
|
125
126
|
display: block;
|
|
126
127
|
|
|
127
128
|
& > .remove {
|
|
128
129
|
position: absolute;
|
|
129
130
|
|
|
130
|
-
top:
|
|
131
|
-
right:
|
|
131
|
+
top: 0px !important;
|
|
132
|
+
right: 0px !important;
|
|
132
133
|
& > .close{
|
|
133
134
|
width: 32px;
|
|
134
135
|
min-width: 32px !important;
|
|
@@ -140,6 +141,7 @@ export default {
|
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
& > .info-box {
|
|
144
|
+
border: 1px solid var(--tabbed-border) !important;
|
|
143
145
|
margin-bottom: 0;
|
|
144
146
|
padding-right: 25px;
|
|
145
147
|
}
|
|
@@ -88,11 +88,12 @@ export default {
|
|
|
88
88
|
<style lang="scss" scoped>
|
|
89
89
|
.cluster-appearance {
|
|
90
90
|
display: flex;
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
|
|
91
|
+
// flex-direction: column;
|
|
92
|
+
// align-items: center;
|
|
93
|
+
// margin: 3px 35px 0px 0px;
|
|
93
94
|
|
|
94
95
|
label {
|
|
95
|
-
margin:
|
|
96
|
+
margin: 10px 10px 0 0;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
&-preview {
|
|
@@ -146,9 +146,9 @@ export default {
|
|
|
146
146
|
</div>
|
|
147
147
|
</div>
|
|
148
148
|
|
|
149
|
-
<div class="row
|
|
149
|
+
<div class="row">
|
|
150
150
|
<div
|
|
151
|
-
class="
|
|
151
|
+
class="span-6"
|
|
152
152
|
data-testid="input-command-workingDir"
|
|
153
153
|
>
|
|
154
154
|
<LabeledInput
|
|
@@ -159,13 +159,13 @@ export default {
|
|
|
159
159
|
@update:value="update"
|
|
160
160
|
/>
|
|
161
161
|
</div>
|
|
162
|
-
<div class="
|
|
162
|
+
<div class="span-6">
|
|
163
163
|
<div
|
|
164
164
|
:style="{ 'align-items': 'center' }"
|
|
165
165
|
class="row"
|
|
166
166
|
>
|
|
167
167
|
<div
|
|
168
|
-
class="col
|
|
168
|
+
class="col"
|
|
169
169
|
data-testid="input-command-stdin"
|
|
170
170
|
>
|
|
171
171
|
<LabeledSelect
|
|
@@ -191,7 +191,6 @@ export default {
|
|
|
191
191
|
</div>
|
|
192
192
|
</div>
|
|
193
193
|
</div>
|
|
194
|
-
<div class="spacer" />
|
|
195
194
|
<h3>{{ t('workload.container.titles.env') }}</h3>
|
|
196
195
|
<EnvVars
|
|
197
196
|
:mode="mode"
|
|
@@ -68,6 +68,20 @@ export default {
|
|
|
68
68
|
};
|
|
69
69
|
});
|
|
70
70
|
},
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
hans(row) {
|
|
74
|
+
const conditionMap = {
|
|
75
|
+
'DiskPressure': '磁盘压力',
|
|
76
|
+
'MemoryPressure': '内存压力',
|
|
77
|
+
'PIDPressure': '进程数压力',
|
|
78
|
+
'Ready': '就绪状态',
|
|
79
|
+
'EtcdIsVoter': 'Etcd投票成员',
|
|
80
|
+
'NetworkUnavailable': '网络不可用',
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return conditionMap[row.condition] || row.condition;
|
|
84
|
+
}
|
|
71
85
|
}
|
|
72
86
|
};
|
|
73
87
|
</script>
|
|
@@ -83,7 +97,7 @@ export default {
|
|
|
83
97
|
:search="false"
|
|
84
98
|
>
|
|
85
99
|
<template #cell:condition="{row}">
|
|
86
|
-
<span :class="{'text-error': row.error}">{{ row
|
|
100
|
+
<span :class="{'text-error': row.error}">{{ hans(row) }}</span>
|
|
87
101
|
</template>
|
|
88
102
|
|
|
89
103
|
<template #cell:status="{row}">
|
|
@@ -128,7 +128,7 @@ export default {
|
|
|
128
128
|
</div>
|
|
129
129
|
|
|
130
130
|
<template v-if="selectHook === 'exec'">
|
|
131
|
-
<div class="
|
|
131
|
+
<div class="col single-value mt-20">
|
|
132
132
|
<h4>{{ t('workload.container.lifecycleHook.exec.title') }}</h4>
|
|
133
133
|
<div>
|
|
134
134
|
<ShellInput
|
|
@@ -143,65 +143,61 @@ export default {
|
|
|
143
143
|
</template>
|
|
144
144
|
|
|
145
145
|
<template v-if="selectHook === 'httpGet'">
|
|
146
|
-
<
|
|
146
|
+
<div class="mt-20"></div>
|
|
147
|
+
<h4 class="mb-10">{{ t('workload.container.lifecycleHook.httpGet.title') }}</h4>
|
|
147
148
|
<div class="var-row">
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
149
|
+
<div class="row">
|
|
150
|
+
<div class="col span-6">
|
|
151
|
+
<LabeledInput
|
|
152
|
+
v-model:value="value.httpGet.host"
|
|
153
|
+
:label="t('workload.container.lifecycleHook.httpGet.host.label')"
|
|
154
|
+
:placeholder="t('workload.container.lifecycleHook.httpGet.host.placeholder')"
|
|
155
|
+
:mode="mode"
|
|
156
|
+
@update:value="update"
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="col span-6">
|
|
160
|
+
<LabeledInput
|
|
161
|
+
v-model:value="value.httpGet.path"
|
|
162
|
+
:label="t('workload.container.lifecycleHook.httpGet.path.label')"
|
|
163
|
+
:placeholder="t('workload.container.lifecycleHook.httpGet.path.placeholder')"
|
|
164
|
+
:mode="mode"
|
|
165
|
+
@update:value="update"
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="row">
|
|
170
|
+
<div class="col span-6">
|
|
171
|
+
<LabeledInput
|
|
172
|
+
v-model:value.number="value.httpGet.port"
|
|
173
|
+
type="number"
|
|
174
|
+
:label="t('workload.container.lifecycleHook.httpGet.port.label')"
|
|
175
|
+
:placeholder="t('workload.container.lifecycleHook.httpGet.port.placeholder')"
|
|
176
|
+
:mode="mode"
|
|
177
|
+
required
|
|
178
|
+
@update:value="update"
|
|
179
|
+
/>
|
|
180
|
+
</div>
|
|
181
|
+
<div class="col span-6">
|
|
182
|
+
<LabeledSelect
|
|
183
|
+
v-model:value="value.httpGet.scheme"
|
|
184
|
+
:label="t('workload.container.lifecycleHook.httpGet.scheme.label')"
|
|
185
|
+
:placeholder="t('workload.container.lifecycleHook.httpGet.scheme.placeholder')"
|
|
186
|
+
:options="schemeOptions"
|
|
187
|
+
:mode="mode"
|
|
188
|
+
@update:value="update"
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
179
192
|
</div>
|
|
180
193
|
|
|
181
|
-
<h4>{{ t('workload.container.lifecycleHook.httpHeaders.title') }}</h4>
|
|
194
|
+
<h4 class="mb-10">{{ t('workload.container.lifecycleHook.httpHeaders.title') }}</h4>
|
|
182
195
|
<div
|
|
183
196
|
v-for="(header, index) in value.httpGet.httpHeaders"
|
|
184
197
|
:key="index"
|
|
185
198
|
class="var-row"
|
|
186
199
|
data-testid="hookoption-header-row"
|
|
187
200
|
>
|
|
188
|
-
<LabeledInput
|
|
189
|
-
v-model:value="value.httpGet.httpHeaders[index].name"
|
|
190
|
-
:label="t('workload.container.lifecycleHook.httpHeaders.name.label')"
|
|
191
|
-
:placeholder="t('workload.container.lifecycleHook.httpHeaders.name.placeholder')"
|
|
192
|
-
class="single-value"
|
|
193
|
-
:mode="mode"
|
|
194
|
-
required
|
|
195
|
-
@update:value="update"
|
|
196
|
-
/>
|
|
197
|
-
<LabeledInput
|
|
198
|
-
v-model:value="value.httpGet.httpHeaders[index].value"
|
|
199
|
-
:label="t('workload.container.lifecycleHook.httpHeaders.value.label')"
|
|
200
|
-
:placeholder="t('workload.container.lifecycleHook.httpHeaders.value.placeholder')"
|
|
201
|
-
class="single-value"
|
|
202
|
-
:mode="mode"
|
|
203
|
-
@update:value="update"
|
|
204
|
-
/>
|
|
205
201
|
<div class="remove">
|
|
206
202
|
<button
|
|
207
203
|
v-if="!isView"
|
|
@@ -213,18 +209,41 @@ export default {
|
|
|
213
209
|
<t k="generic.remove" />
|
|
214
210
|
</button>
|
|
215
211
|
</div>
|
|
212
|
+
<div class="row">
|
|
213
|
+
<div class="col span-6">
|
|
214
|
+
<LabeledInput
|
|
215
|
+
v-model:value="value.httpGet.httpHeaders[index].name"
|
|
216
|
+
:label="t('workload.container.lifecycleHook.httpHeaders.name.label')"
|
|
217
|
+
:placeholder="t('workload.container.lifecycleHook.httpHeaders.name.placeholder')"
|
|
218
|
+
class="single-value"
|
|
219
|
+
:mode="mode"
|
|
220
|
+
required
|
|
221
|
+
@update:value="update"
|
|
222
|
+
/>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="col span-6">
|
|
225
|
+
<LabeledInput
|
|
226
|
+
v-model:value="value.httpGet.httpHeaders[index].value"
|
|
227
|
+
:label="t('workload.container.lifecycleHook.httpHeaders.value.label')"
|
|
228
|
+
:placeholder="t('workload.container.lifecycleHook.httpHeaders.value.placeholder')"
|
|
229
|
+
class="single-value"
|
|
230
|
+
:mode="mode"
|
|
231
|
+
@update:value="update"
|
|
232
|
+
/>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
216
235
|
</div>
|
|
217
236
|
|
|
218
237
|
<div>
|
|
219
238
|
<button
|
|
220
239
|
v-if="!isView"
|
|
221
240
|
type="button"
|
|
222
|
-
class="btn role-link mb-20"
|
|
241
|
+
class="btn role-link mb-20 httpAdd"
|
|
223
242
|
:disabled="mode === 'view'"
|
|
224
243
|
data-testid="hookoption-add-header-button"
|
|
225
244
|
@click.stop="addHeader"
|
|
226
245
|
>
|
|
227
|
-
|
|
246
|
+
添加HTTP头
|
|
228
247
|
</button>
|
|
229
248
|
</div>
|
|
230
249
|
</template>
|
|
@@ -233,11 +252,11 @@ export default {
|
|
|
233
252
|
|
|
234
253
|
<style lang='scss' scoped>
|
|
235
254
|
.var-row{
|
|
236
|
-
display: grid;
|
|
237
|
-
grid-template-columns: 1fr 1fr 1fr 1fr 100px;
|
|
238
|
-
grid-column-gap: 20px;
|
|
239
|
-
margin-bottom: 20px;
|
|
240
|
-
align-items: center;
|
|
255
|
+
// display: grid;
|
|
256
|
+
// grid-template-columns: 1fr 1fr 1fr 1fr 100px;
|
|
257
|
+
// grid-column-gap: 20px;
|
|
258
|
+
// margin-bottom: 20px;
|
|
259
|
+
// align-items: center;
|
|
241
260
|
|
|
242
261
|
.single-value {
|
|
243
262
|
grid-column: span 2;
|
|
@@ -248,6 +267,16 @@ export default {
|
|
|
248
267
|
}
|
|
249
268
|
.remove BUTTON {
|
|
250
269
|
padding: 0px;
|
|
270
|
+
min-width: auto;
|
|
251
271
|
}
|
|
252
272
|
}
|
|
273
|
+
.httpAdd{
|
|
274
|
+
background: var(--accent-btn);
|
|
275
|
+
border: solid 1px var(--primary);
|
|
276
|
+
color: var(--primary);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
H4{
|
|
280
|
+
font-size: 14px;
|
|
281
|
+
}
|
|
253
282
|
</style>
|
|
@@ -30,7 +30,7 @@ export default {
|
|
|
30
30
|
|
|
31
31
|
selectLabel: {
|
|
32
32
|
type: String,
|
|
33
|
-
default: '',
|
|
33
|
+
default: ' ',
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
selectValue: {
|
|
@@ -164,11 +164,12 @@ export default {
|
|
|
164
164
|
:v-bind="$attrs"
|
|
165
165
|
@update:value="change"
|
|
166
166
|
/>
|
|
167
|
+
<div style="width: 100%;height: 24px;"></div>
|
|
167
168
|
<LabeledInput
|
|
168
169
|
v-if="textLabel || textRules.length > 0"
|
|
169
170
|
ref="text"
|
|
170
171
|
v-model:value="string"
|
|
171
|
-
class="input-string
|
|
172
|
+
class="input-string span-8"
|
|
172
173
|
:label="textLabel"
|
|
173
174
|
:placeholder="placeholder"
|
|
174
175
|
:disabled="disabled || textDisabled"
|
|
@@ -204,7 +205,7 @@ export default {
|
|
|
204
205
|
|
|
205
206
|
&.select-after {
|
|
206
207
|
height: 100%;
|
|
207
|
-
flex-direction: row-reverse;
|
|
208
|
+
// flex-direction: row-reverse;
|
|
208
209
|
|
|
209
210
|
& .input-string {
|
|
210
211
|
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
@@ -270,19 +271,19 @@ export default {
|
|
|
270
271
|
margin-right: 0;
|
|
271
272
|
|
|
272
273
|
&:hover:not(.focused):not(.disabled):not(.view) {
|
|
273
|
-
border:
|
|
274
|
+
border: 1px solid var(--input-hover-border) !important;
|
|
274
275
|
}
|
|
275
276
|
|
|
276
277
|
&.focused {
|
|
277
|
-
border:
|
|
278
|
+
border: 1px solid var(--outline) !important;
|
|
278
279
|
}
|
|
279
280
|
|
|
280
281
|
&:hover:not(.focused):not(.disabled) {
|
|
281
|
-
border:
|
|
282
|
+
border: 1px solid var(--input-hover-border) !important;
|
|
282
283
|
}
|
|
283
284
|
|
|
284
285
|
&.focused {
|
|
285
|
-
border:
|
|
286
|
+
border: 1px solid var(--outline) !important;
|
|
286
287
|
}
|
|
287
288
|
|
|
288
289
|
&.labeled-select.focused :deep(),
|
|
@@ -390,6 +390,17 @@ export default {
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
+
rows = rows.map((item) => {
|
|
394
|
+
if (item?.key?.includes('harvester')) {
|
|
395
|
+
item.key = item.key?.replace('harvester', 'cloud');
|
|
396
|
+
}
|
|
397
|
+
if (item?.value?.includes('harvester')) {
|
|
398
|
+
item.value = item.value?.replace('harvester', 'cloud');
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return item;
|
|
402
|
+
});
|
|
403
|
+
|
|
393
404
|
return rows;
|
|
394
405
|
},
|
|
395
406
|
|
|
@@ -400,6 +411,8 @@ export default {
|
|
|
400
411
|
[this.valueName]: value,
|
|
401
412
|
};
|
|
402
413
|
|
|
414
|
+
obj.key = obj.key?.replace('harvester', 'cloud');
|
|
415
|
+
obj.value = obj.value?.replace('harvester', 'cloud');
|
|
403
416
|
obj.binary = false;
|
|
404
417
|
obj.canEncode = this.handleBase64;
|
|
405
418
|
obj.supported = true;
|
|
@@ -481,8 +494,8 @@ export default {
|
|
|
481
494
|
// let value = (row[valueName] || '');
|
|
482
495
|
// const key = (row[keyName] || '').trim();
|
|
483
496
|
|
|
484
|
-
const key = (row[keyName] || '').trim();
|
|
485
|
-
let value = (row[valueName] || '').trim();
|
|
497
|
+
const key = (row[keyName]?.replace('cloud', 'harvester') || '').trim();
|
|
498
|
+
let value = (row[valueName]?.replace('cloud', 'harvester') || '').trim();
|
|
486
499
|
|
|
487
500
|
if (value && typeOf(value) === 'object') {
|
|
488
501
|
out[key] = JSON.parse(JSON.stringify(value));
|
|
@@ -1001,6 +1014,7 @@ export default {
|
|
|
1001
1014
|
.remove {
|
|
1002
1015
|
text-align: center;
|
|
1003
1016
|
BUTTON {
|
|
1017
|
+
min-width: auto;
|
|
1004
1018
|
padding: 0px;
|
|
1005
1019
|
}
|
|
1006
1020
|
}
|
|
@@ -1040,4 +1054,8 @@ export default {
|
|
|
1040
1054
|
border-collapse: separate;
|
|
1041
1055
|
z-index: 0; // Prevent label from cover other elements outside of the input
|
|
1042
1056
|
}
|
|
1057
|
+
|
|
1058
|
+
h3{
|
|
1059
|
+
font-size: 14px;
|
|
1060
|
+
}
|
|
1043
1061
|
</style>
|
|
@@ -161,8 +161,8 @@ export default {
|
|
|
161
161
|
<div :class="containerClass">
|
|
162
162
|
<div :class="defaultSectionClass">
|
|
163
163
|
<div class="labels">
|
|
164
|
-
<div class="labels__header">
|
|
165
|
-
<div v-if="showLabelTitle">
|
|
164
|
+
<div class="labels__header mb-20">
|
|
165
|
+
<div v-if="showLabelTitle" style="font-size: 14px;">
|
|
166
166
|
<t k="labels.labels.title" />
|
|
167
167
|
</div>
|
|
168
168
|
<ToggleSwitch
|
|
@@ -330,7 +330,7 @@ export default {
|
|
|
330
330
|
:data-testid="`input-match-type-field-${index}`"
|
|
331
331
|
>
|
|
332
332
|
<div v-if="isView">
|
|
333
|
-
{{ row.matching }}
|
|
333
|
+
{{ row.matching.replace('harvester', 'cloud') }}
|
|
334
334
|
</div>
|
|
335
335
|
<LabeledSelect
|
|
336
336
|
v-else
|
|
@@ -345,7 +345,7 @@ export default {
|
|
|
345
345
|
:data-testid="`input-match-expression-key-${index}`"
|
|
346
346
|
>
|
|
347
347
|
<div v-if="isView" class="view-item-value">
|
|
348
|
-
{{ row.key }}
|
|
348
|
+
{{ row.key.replace('harvester', 'cloud') }}
|
|
349
349
|
</div>
|
|
350
350
|
<input
|
|
351
351
|
v-else-if="!hasKeySelectOptions"
|
|
@@ -365,6 +365,7 @@ export default {
|
|
|
365
365
|
/>
|
|
366
366
|
</div>
|
|
367
367
|
<div
|
|
368
|
+
style="width: 400px;"
|
|
368
369
|
:data-testid="`input-match-expression-operator-${index}`"
|
|
369
370
|
>
|
|
370
371
|
<div v-if="isView" class="view-item-value">
|
|
@@ -413,7 +414,7 @@ export default {
|
|
|
413
414
|
v-if="!isView"
|
|
414
415
|
type="button"
|
|
415
416
|
class="btn role-link"
|
|
416
|
-
:style="{padding:'0px'}"
|
|
417
|
+
:style="{padding:'0px', minWidth: 'auto'}"
|
|
417
418
|
|
|
418
419
|
:disabled="mode==='view'"
|
|
419
420
|
:data-testid="`input-match-expression-remove-control-${index}`"
|
|
@@ -425,7 +426,6 @@ export default {
|
|
|
425
426
|
</div>
|
|
426
427
|
<div
|
|
427
428
|
v-if="!isView && showAddButton"
|
|
428
|
-
class="mmt-4"
|
|
429
429
|
>
|
|
430
430
|
<button
|
|
431
431
|
type="button"
|
|
@@ -143,30 +143,46 @@ export default {
|
|
|
143
143
|
return [this.permissionGroup];
|
|
144
144
|
},
|
|
145
145
|
options() {
|
|
146
|
+
|
|
146
147
|
const customRoles = this.customRoles.map((role) => ({
|
|
147
148
|
label: role.nameDisplay,
|
|
148
149
|
description: role.description || role.metadata?.annotations?.[DESCRIPTION] || this.t('members.clusterPermissions.noDescription'),
|
|
149
150
|
value: role.id
|
|
150
151
|
}));
|
|
151
152
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
153
|
+
let optionList = [{
|
|
154
|
+
label: this.t('members.clusterPermissions.cluster-tenant.label'),
|
|
155
|
+
description: this.t('members.clusterPermissions.cluster-tenant.description'),
|
|
156
|
+
value: 'cluster-tenant'
|
|
157
|
+
}];
|
|
158
|
+
|
|
159
|
+
if (sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
|
|
160
|
+
optionList = [
|
|
161
|
+
{
|
|
162
|
+
label: this.t('members.clusterPermissions.cluster-tenant.label'),
|
|
163
|
+
description: this.t('members.clusterPermissions.cluster-tenant.description'),
|
|
164
|
+
value: 'cluster-tenant'
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: this.t('members.clusterPermissions.owner.label'),
|
|
168
|
+
description: this.t('members.clusterPermissions.owner.description'),
|
|
169
|
+
value: 'owner'
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
label: this.t('members.clusterPermissions.member.label'),
|
|
173
|
+
description: this.t('members.clusterPermissions.member.description'),
|
|
174
|
+
value: 'member'
|
|
175
|
+
},
|
|
176
|
+
...customRoles,
|
|
177
|
+
{
|
|
178
|
+
label: this.t('members.clusterPermissions.custom.label'),
|
|
179
|
+
description: this.t('members.clusterPermissions.custom.description'),
|
|
180
|
+
value: 'custom'
|
|
181
|
+
}
|
|
182
|
+
];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return optionList
|
|
170
186
|
},
|
|
171
187
|
principal() {
|
|
172
188
|
const principalId = this.principalId.replace(/\//g, '%2F');
|
|
@@ -258,31 +274,34 @@ export default {
|
|
|
258
274
|
</div>
|
|
259
275
|
</template>
|
|
260
276
|
<template v-slot:body>
|
|
261
|
-
<
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
class="custom-permissions ml-20 mt-10"
|
|
269
|
-
:class="{'two-column': useTwoColumnsForCustom}"
|
|
270
|
-
>
|
|
277
|
+
<div style="max-height: 250px; overflow: auto;">
|
|
278
|
+
<RadioGroup
|
|
279
|
+
v-model:value="permissionGroup"
|
|
280
|
+
:options="options"
|
|
281
|
+
:flexDirection="'column'"
|
|
282
|
+
name="permission-group"
|
|
283
|
+
/>
|
|
271
284
|
<div
|
|
272
|
-
v-
|
|
273
|
-
|
|
285
|
+
v-if="permissionGroup === 'custom'"
|
|
286
|
+
class="custom-permissions ml-20 mt-10"
|
|
287
|
+
:class="{'two-column': useTwoColumnsForCustom}"
|
|
274
288
|
>
|
|
275
|
-
<
|
|
276
|
-
v-
|
|
277
|
-
:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
289
|
+
<div
|
|
290
|
+
v-for="(permission, i) in customPermissionsUpdate"
|
|
291
|
+
:key="i"
|
|
292
|
+
>
|
|
293
|
+
<Checkbox
|
|
294
|
+
v-model:value="permission.value"
|
|
295
|
+
:disabled="permission.locked"
|
|
296
|
+
class="mb-5"
|
|
297
|
+
:label="permission.label"
|
|
298
|
+
/>
|
|
299
|
+
<i
|
|
300
|
+
v-if="permission.locked"
|
|
301
|
+
v-clean-tooltip="permission.tooltip"
|
|
302
|
+
class="icon icon-lock icon-fw"
|
|
303
|
+
/>
|
|
304
|
+
</div>
|
|
286
305
|
</div>
|
|
287
306
|
</div>
|
|
288
307
|
</template>
|