dashboard-shell-shell 3.0.5-test.13 → 3.0.5-test.16

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 (70) hide show
  1. package/assets/styles/global/_select.scss +1 -1
  2. package/assets/translations/zh-hans.yaml +4 -3
  3. package/components/Drawer/ResourceDetailDrawer/index.vue +2 -2
  4. package/components/ExplorerMembers.vue +10 -1
  5. package/components/SortableTable/index.vue +2 -2
  6. package/components/Tabbed/index.vue +5 -1
  7. package/components/auth/Principal.vue +1 -0
  8. package/components/form/ArrayList.vue +162 -146
  9. package/components/form/Command.vue +4 -5
  10. package/components/form/Footer.vue +1 -0
  11. package/components/form/HealthCheck.vue +0 -2
  12. package/components/form/HookOption.vue +83 -58
  13. package/components/form/InputWithSelect.vue +8 -7
  14. package/components/form/KeyValue.vue +1 -0
  15. package/components/form/MatchExpressions.vue +1 -2
  16. package/components/form/Networking.vue +0 -1
  17. package/components/form/NodeAffinity.vue +29 -28
  18. package/components/form/PodAffinity.vue +19 -21
  19. package/components/form/Probe.vue +15 -11
  20. package/components/form/ResourceSelector.vue +1 -1
  21. package/components/form/ServiceNameSelect.vue +1 -3
  22. package/components/form/ServicePorts.vue +149 -75
  23. package/components/form/Tolerations.vue +12 -9
  24. package/components/form/ValueFromResource.vue +110 -96
  25. package/components/nav/TopLevelMenu.vue +3 -2
  26. package/components/nav/Type.vue +1 -1
  27. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  28. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  29. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  30. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  31. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  32. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  33. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  34. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  35. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  36. package/edit/networking.k8s.io.ingress/Certificate.vue +7 -5
  37. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  38. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  39. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  40. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  41. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  42. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  43. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  44. package/edit/secret/index.vue +2 -2
  45. package/edit/service.vue +4 -1
  46. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  47. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  48. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  49. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  50. package/edit/workload/Job.vue +27 -29
  51. package/edit/workload/Upgrading.vue +3 -3
  52. package/edit/workload/index.vue +2 -2
  53. package/edit/workload/storage/Mount.vue +1 -0
  54. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  55. package/edit/workload/storage/azureDisk.vue +14 -10
  56. package/edit/workload/storage/azureFile.vue +9 -7
  57. package/edit/workload/storage/csi/index.vue +6 -9
  58. package/edit/workload/storage/emptyDir.vue +7 -5
  59. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  60. package/edit/workload/storage/hostPath.vue +7 -5
  61. package/edit/workload/storage/nfs.vue +8 -6
  62. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  63. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +18 -15
  64. package/edit/workload/storage/secret.vue +9 -6
  65. package/edit/workload/storage/vsphereVolume.vue +11 -7
  66. package/package.json +1 -1
  67. package/pages/account/index.vue +10 -0
  68. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
  69. package/scripts/publish-shell.sh +1 -1
  70. package/store/i18n.js +1 -0
@@ -128,7 +128,7 @@ export default {
128
128
  </div>
129
129
 
130
130
  <template v-if="selectHook === 'exec'">
131
- <div class="mb-20 single-value">
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
- <h4>{{ t('workload.container.lifecycleHook.httpGet.title') }}</h4>
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
- <LabeledInput
149
- v-model:value="value.httpGet.host"
150
- :label="t('workload.container.lifecycleHook.httpGet.host.label')"
151
- :placeholder="t('workload.container.lifecycleHook.httpGet.host.placeholder')"
152
- :mode="mode"
153
- @update:value="update"
154
- />
155
- <LabeledInput
156
- v-model:value="value.httpGet.path"
157
- :label="t('workload.container.lifecycleHook.httpGet.path.label')"
158
- :placeholder="t('workload.container.lifecycleHook.httpGet.path.placeholder')"
159
- :mode="mode"
160
- @update:value="update"
161
- />
162
- <LabeledInput
163
- v-model:value.number="value.httpGet.port"
164
- type="number"
165
- :label="t('workload.container.lifecycleHook.httpGet.port.label')"
166
- :placeholder="t('workload.container.lifecycleHook.httpGet.port.placeholder')"
167
- :mode="mode"
168
- required
169
- @update:value="update"
170
- />
171
- <LabeledSelect
172
- v-model:value="value.httpGet.scheme"
173
- :label="t('workload.container.lifecycleHook.httpGet.scheme.label')"
174
- :placeholder="t('workload.container.lifecycleHook.httpGet.scheme.placeholder')"
175
- :options="schemeOptions"
176
- :mode="mode"
177
- @update:value="update"
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
- Add Header
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,12 @@ 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
+ }
253
278
  </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 col span-8"
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: 0px solid var(--input-hover-border) !important;
274
+ border: 1px solid var(--input-hover-border) !important;
274
275
  }
275
276
 
276
277
  &.focused {
277
- border: 0px solid var(--outline) !important;
278
+ border: 1px solid var(--outline) !important;
278
279
  }
279
280
 
280
281
  &:hover:not(.focused):not(.disabled) {
281
- border: 0px solid var(--input-hover-border) !important;
282
+ border: 1px solid var(--input-hover-border) !important;
282
283
  }
283
284
 
284
285
  &.focused {
285
- border: 0px solid var(--outline) !important;
286
+ border: 1px solid var(--outline) !important;
286
287
  }
287
288
 
288
289
  &.labeled-select.focused :deep(),
@@ -1014,6 +1014,7 @@ export default {
1014
1014
  .remove {
1015
1015
  text-align: center;
1016
1016
  BUTTON {
1017
+ min-width: auto;
1017
1018
  padding: 0px;
1018
1019
  }
1019
1020
  }
@@ -413,7 +413,7 @@ export default {
413
413
  v-if="!isView"
414
414
  type="button"
415
415
  class="btn role-link"
416
- :style="{padding:'0px'}"
416
+ :style="{padding:'0px', minWidth: 'auto'}"
417
417
 
418
418
  :disabled="mode==='view'"
419
419
  :data-testid="`input-match-expression-remove-control-${index}`"
@@ -425,7 +425,6 @@ export default {
425
425
  </div>
426
426
  <div
427
427
  v-if="!isView && showAddButton"
428
- class="mmt-4"
429
428
  >
430
429
  <button
431
430
  type="button"
@@ -236,7 +236,6 @@ export default {
236
236
  </div>
237
237
  </div>
238
238
  </div>
239
- <div class="spacer" />
240
239
 
241
240
  <div class="mt-20">
242
241
  <div class="row">
@@ -210,33 +210,31 @@ export default {
210
210
  @remove="remove"
211
211
  >
212
212
  <template #default="props">
213
- <div class="row">
214
- <div class="col span-9">
215
- <LabeledSelect
216
- :options="affinityOptions"
217
- :value="priorityDisplay(props.row.value)"
218
- :label="t('workload.scheduling.affinity.priority')"
219
- :mode="mode"
220
- :data-testid="`node-affinity-priority-index${props.i}`"
221
- @update:value="(changePriority(props.row.value))"
222
- />
223
- </div>
224
- <div
225
- v-if="'weight' in props.row.value"
226
- class="col span-3"
227
- >
228
- <LabeledInput
229
- v-model:value.number="props.row.value.weight"
230
- :mode="mode"
231
- type="number"
232
- min="1"
233
- max="100"
234
- :label="t('workload.scheduling.affinity.weight.label')"
235
- :placeholder="t('workload.scheduling.affinity.weight.placeholder')"
236
- :data-testid="`node-affinity-weight-index${props.i}`"
237
- @update:value="update"
238
- />
239
- </div>
213
+ <div class="col">
214
+ <LabeledSelect
215
+ :options="affinityOptions"
216
+ :value="priorityDisplay(props.row.value)"
217
+ :label="t('workload.scheduling.affinity.priority')"
218
+ :mode="mode"
219
+ :data-testid="`node-affinity-priority-index${props.i}`"
220
+ @update:value="(changePriority(props.row.value))"
221
+ />
222
+ </div>
223
+ <div
224
+ v-if="'weight' in props.row.value"
225
+ class="col"
226
+ >
227
+ <LabeledInput
228
+ v-model:value.number="props.row.value.weight"
229
+ :mode="mode"
230
+ type="number"
231
+ min="1"
232
+ max="100"
233
+ :label="t('workload.scheduling.affinity.weight.label')"
234
+ :placeholder="t('workload.scheduling.affinity.weight.placeholder')"
235
+ :data-testid="`node-affinity-weight-index${props.i}`"
236
+ @update:value="update"
237
+ />
240
238
  </div>
241
239
  <MatchExpressions
242
240
  :value="matchingSelectorDisplay ? props.row.value : props.row.value.matchExpressions"
@@ -254,5 +252,8 @@ export default {
254
252
  </div>
255
253
  </template>
256
254
 
257
- <style>
255
+ <style lang="scss" scoped>
256
+ .weight_input{
257
+ margin-left: 10px;
258
+ }
258
259
  </style>
@@ -370,27 +370,25 @@ export default {
370
370
  @remove="remove"
371
371
  >
372
372
  <template #default="props">
373
- <div class="row mt-20">
374
- <div class="col span-6">
375
- <LabeledSelect
376
- :mode="mode"
377
- :options="[t('workload.scheduling.affinity.affinityOption'),t('workload.scheduling.affinity.antiAffinityOption')]"
378
- :value="props.row.value._anti ?t('workload.scheduling.affinity.antiAffinityOption') :t('workload.scheduling.affinity.affinityOption') "
379
- :label="t('workload.scheduling.affinity.type')"
380
- :data-testid="`pod-affinity-type-index${props.i}`"
381
- @update:value="props.row.value._anti = !props.row.value._anti"
382
- />
383
- </div>
384
- <div class="col span-6">
385
- <LabeledSelect
386
- :mode="mode"
387
- :options="[t('workload.scheduling.affinity.preferred'),t('workload.scheduling.affinity.required')]"
388
- :value="priorityDisplay(props.row.value)"
389
- :label="t('workload.scheduling.affinity.priority')"
390
- :data-testid="`pod-affinity-priority-index${props.i}`"
391
- @update:value="changePriority(props.row.value, props.i)"
392
- />
393
- </div>
373
+ <div class="col">
374
+ <LabeledSelect
375
+ :mode="mode"
376
+ :options="[t('workload.scheduling.affinity.affinityOption'),t('workload.scheduling.affinity.antiAffinityOption')]"
377
+ :value="props.row.value._anti ?t('workload.scheduling.affinity.antiAffinityOption') :t('workload.scheduling.affinity.affinityOption') "
378
+ :label="t('workload.scheduling.affinity.type')"
379
+ :data-testid="`pod-affinity-type-index${props.i}`"
380
+ @update:value="props.row.value._anti = !props.row.value._anti"
381
+ />
382
+ </div>
383
+ <div class="col">
384
+ <LabeledSelect
385
+ :mode="mode"
386
+ :options="[t('workload.scheduling.affinity.preferred'),t('workload.scheduling.affinity.required')]"
387
+ :value="priorityDisplay(props.row.value)"
388
+ :label="t('workload.scheduling.affinity.priority')"
389
+ :data-testid="`pod-affinity-priority-index${props.i}`"
390
+ @update:value="changePriority(props.row.value, props.i)"
391
+ />
394
392
  </div>
395
393
  <div class="row mb-20">
396
394
  <RadioGroup
@@ -160,7 +160,7 @@ export default {
160
160
  <div class="row">
161
161
  <div
162
162
  data-testid="input-probe-kind"
163
- class="col span-11-of-23"
163
+ class="span-9-of-23"
164
164
  >
165
165
  <LabeledSelect
166
166
  v-model:value="kind"
@@ -240,7 +240,7 @@ export default {
240
240
  </div>
241
241
  </div>
242
242
 
243
- <div class="col span-1-of-13">
243
+ <div class="span-1-of-13">
244
244
  <hr
245
245
  v-if="kind && kind!=='none'"
246
246
  :style="{'position':'relative', 'margin':'0px'}"
@@ -252,12 +252,12 @@ export default {
252
252
  <!-- none -->
253
253
  <div
254
254
  v-if="!isNone"
255
- class="col span-11-of-23"
255
+ class="span-11-of-23 ml-30"
256
256
  >
257
257
  <div class="row">
258
258
  <div
259
259
  data-testid="input-probe-periodSeconds"
260
- class="col span-4"
260
+ class="col"
261
261
  >
262
262
  <UnitInput
263
263
  v-model:value="probe.periodSeconds"
@@ -269,9 +269,12 @@ export default {
269
269
  @update:value="update"
270
270
  />
271
271
  </div>
272
+ </div>
273
+
274
+ <div class="row">
272
275
  <div
273
276
  data-testid="input-probe-initialDelaySeconds"
274
- class="col span-4"
277
+ class="col"
275
278
  >
276
279
  <UnitInput
277
280
  v-model:value="probe.initialDelaySeconds"
@@ -283,9 +286,11 @@ export default {
283
286
  @update:value="update"
284
287
  />
285
288
  </div>
289
+ </div>
290
+ <div class="row">
286
291
  <div
287
292
  data-testid="input-probe-timeoutSeconds"
288
- class="col span-4"
293
+ class="col"
289
294
  >
290
295
  <UnitInput
291
296
  v-model:value="probe.timeoutSeconds"
@@ -299,12 +304,10 @@ export default {
299
304
  </div>
300
305
  </div>
301
306
 
302
- <div class="spacer-small" />
303
-
304
307
  <div class="row">
305
308
  <div
306
309
  data-testid="input-probe-successThreshold"
307
- class="col span-6"
310
+ class="col"
308
311
  >
309
312
  <LabeledInput
310
313
  v-model:value.number="probe.successThreshold"
@@ -316,9 +319,11 @@ export default {
316
319
  @update:value="update"
317
320
  />
318
321
  </div>
322
+ </div>
323
+ <div class="row">
319
324
  <div
320
325
  data-testid="input-probe-failureThreshold"
321
- class="col span-6"
326
+ class="col"
322
327
  >
323
328
  <LabeledInput
324
329
  v-model:value.number="probe.failureThreshold"
@@ -333,7 +338,6 @@ export default {
333
338
  </div>
334
339
 
335
340
  <template v-if="kind === 'HTTP' || kind === 'HTTPS'">
336
- <div class="spacer-small" />
337
341
 
338
342
  <div class="row">
339
343
  <div class="col span-12">
@@ -125,7 +125,7 @@ export default {
125
125
  </div>
126
126
  </div>
127
127
  <div class="row">
128
- <div class="col span-12">
128
+ <div class="span-12">
129
129
  <Banner :color="(matchingResources.none ? 'warning' : 'success')">
130
130
  <span v-clean-html="t('generic.selectors.matchingResources.matchesSome', matchingResources)" />
131
131
  </Banner>
@@ -122,9 +122,7 @@ export default {
122
122
  <div>
123
123
  <div class="spacer" />
124
124
  <div class="row mb-10">
125
- <h3 class="col span-6">
126
- {{ t('workload.serviceAccountName.label') }}
127
- </h3>
125
+ <h3>{{ t('workload.serviceAccountName.label') }}</h3>
128
126
  </div>
129
127
  <div class="row span-6">
130
128
  <LabeledSelect