@rancher/shell 3.0.2-rc.6 → 3.0.3

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 (57) hide show
  1. package/assets/styles/global/_layout.scss +3 -1
  2. package/assets/styles/themes/_light.scss +1 -2
  3. package/assets/styles/themes/_suse.scss +1 -0
  4. package/assets/translations/en-us.yaml +18 -3
  5. package/chart/monitoring/prometheus/index.vue +13 -10
  6. package/components/ButtonGroup.vue +4 -0
  7. package/components/FixedBanner.vue +19 -12
  8. package/components/LocaleSelector.vue +2 -0
  9. package/components/SortableTable/THead.vue +2 -0
  10. package/components/SortableTable/index.vue +35 -5
  11. package/components/StatusBadge.vue +71 -0
  12. package/components/__tests__/FixedBanner.test.ts +3 -3
  13. package/components/form/MatchExpressions.vue +4 -0
  14. package/components/form/Select.vue +11 -2
  15. package/components/form/UnitInput.vue +2 -2
  16. package/components/form/__tests__/UnitInput.test.ts +4 -5
  17. package/components/nav/Favorite.vue +5 -1
  18. package/components/nav/Group.vue +4 -0
  19. package/components/nav/Jump.vue +7 -0
  20. package/components/nav/Pinned.vue +1 -1
  21. package/components/nav/TopLevelMenu.vue +1 -12
  22. package/components/nav/Type.vue +1 -0
  23. package/components/nav/__tests__/TopLevelMenu.test.ts +0 -40
  24. package/config/router/routes.js +1 -0
  25. package/core/plugin-routes.ts +5 -115
  26. package/core/plugins.js +1 -1
  27. package/core/types.ts +18 -2
  28. package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +84 -23
  29. package/detail/autoscaling.horizontalpodautoscaler/index.vue +13 -3
  30. package/edit/auth/__tests__/oidc.test.ts +34 -3
  31. package/edit/auth/ldap/__tests__/config.test.ts +0 -14
  32. package/edit/auth/ldap/config.vue +0 -24
  33. package/edit/auth/oidc.vue +1 -1
  34. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +5 -2
  35. package/edit/fleet.cattle.io.clustergroup.vue +5 -3
  36. package/edit/fleet.cattle.io.gitrepo.vue +1 -0
  37. package/edit/logging-flow/Match.vue +1 -1
  38. package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +0 -2
  39. package/edit/provisioning.cattle.io.cluster/rke2.vue +1 -1
  40. package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +5 -2
  41. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +1 -1
  42. package/edit/service.vue +0 -3
  43. package/edit/workload/Job.vue +6 -6
  44. package/edit/workload/__tests__/Job.test.ts +0 -1
  45. package/models/__tests__/logging.banzaicloud.io.flow.test.ts +88 -0
  46. package/models/logging.banzaicloud.io.flow.js +2 -1
  47. package/package.json +2 -2
  48. package/pages/auth/login.vue +1 -9
  49. package/rancher-components/Form/Checkbox/Checkbox.vue +9 -1
  50. package/rancher-components/Form/LabeledInput/LabeledInput.vue +7 -2
  51. package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +2 -2
  52. package/scripts/test-plugins-build.sh +4 -6
  53. package/store/aws.js +9 -2
  54. package/types/shell/index.d.ts +0 -10
  55. package/utils/banners.js +0 -45
  56. package/utils/color.js +9 -8
  57. package/utils/object.js +0 -3
package/edit/service.vue CHANGED
@@ -521,9 +521,6 @@ export default {
521
521
  "
522
522
  :label="t('servicesPage.affinity.timeout.label')"
523
523
  :placeholder="t('servicesPage.affinity.timeout.placeholder')"
524
- @input="
525
- (e) => value.spec.sessionAffinityConfig.clientIP.timeoutSeconds = e
526
- "
527
524
  />
528
525
  </div>
529
526
  </div>
@@ -161,7 +161,7 @@ export default {
161
161
  :suffix="t('suffix.times', {count: completions})"
162
162
  label-key="workload.job.completions.label"
163
163
  tooltip-key="workload.job.completions.tip"
164
- @input="update"
164
+ @update:value="update"
165
165
  />
166
166
  </div>
167
167
  <div
@@ -174,7 +174,7 @@ export default {
174
174
  :suffix="t('suffix.times', {count: parallelism})"
175
175
  label-key="workload.job.parallelism.label"
176
176
  tooltip-key="workload.job.parallelism.tip"
177
- @input="update"
177
+ @update:value="update"
178
178
  />
179
179
  </div>
180
180
  </div>
@@ -189,7 +189,7 @@ export default {
189
189
  :suffix="t('suffix.times', {count: backoffLimit})"
190
190
  label-key="workload.job.backoffLimit.label"
191
191
  tooltip-key="workload.job.backoffLimit.tip"
192
- @input="update"
192
+ @update:value="update"
193
193
  />
194
194
  </div>
195
195
  <div
@@ -202,7 +202,7 @@ export default {
202
202
  :suffix="t('suffix.seconds', {count: activeDeadlineSeconds})"
203
203
  label-key="workload.job.activeDeadlineSeconds.label"
204
204
  tooltip-key="workload.job.activeDeadlineSeconds.tip"
205
- @input="update"
205
+ @update:value="update"
206
206
  />
207
207
  </div>
208
208
  </div>
@@ -245,7 +245,7 @@ export default {
245
245
  :suffix="t('suffix.seconds', {count: startingDeadlineSeconds})"
246
246
  label-key="workload.job.startingDeadlineSeconds.label"
247
247
  tooltip-key="workload.job.startingDeadlineSeconds.tip"
248
- @input="update"
248
+ @update:value="update"
249
249
  />
250
250
  </div>
251
251
  <div
@@ -257,7 +257,7 @@ export default {
257
257
  :suffix="t('suffix.seconds', { count: terminationGracePeriodSeconds })"
258
258
  :label="t('workload.upgrading.activeDeadlineSeconds.label')"
259
259
  :mode="mode"
260
- @input="update"
260
+ @update:value="update"
261
261
  >
262
262
  <template #label>
263
263
  <label
@@ -64,7 +64,6 @@ describe('component: Job', () => {
64
64
  const newValue = 123;
65
65
 
66
66
  input.setValue(newValue);
67
- input.trigger('blur');
68
67
 
69
68
  expect(wrapper.emitted('update:value')).toHaveLength(1);
70
69
  });
@@ -0,0 +1,88 @@
1
+ import LogFlow from '@shell/models/logging.banzaicloud.io.flow';
2
+
3
+ describe('class LogFlow', () => {
4
+ it('prop "outputs" should take namespace in consideration when filtering logging v2 "outputs"', () => {
5
+ const logOutputs = [
6
+ {
7
+ apiVersion: 'logging.banzaicloud.io/v1beta1',
8
+ kind: 'Output',
9
+ metadata: {
10
+ creationTimestamp: '2025-03-17T10:51:55Z',
11
+ namespace: 'default',
12
+ name: 'output1',
13
+ uid: '927b4a2e-6be0-476f-9bdd-cf30c4a27d8b'
14
+ },
15
+ name: 'output1',
16
+ spec: { awsElasticsearch: { endpoint: {} } },
17
+ status: { active: false }
18
+ },
19
+ {
20
+ apiVersion: 'logging.banzaicloud.io/v1beta1',
21
+ kind: 'Output',
22
+ metadata: {
23
+ creationTimestamp: '2025-03-17T10:51:55Z',
24
+ namespace: 'cattle-fleet-system',
25
+ name: 'output2',
26
+ uid: '927b4a2e-6be0-476f-9bdd-cf30c4a27d8c'
27
+ },
28
+ name: 'output2',
29
+ spec: { awsElasticsearch: { endpoint: {} } },
30
+ status: { active: false }
31
+ },
32
+ {
33
+ apiVersion: 'logging.banzaicloud.io/v1beta1',
34
+ kind: 'Output',
35
+ metadata: {
36
+ creationTimestamp: '2025-03-17T10:51:55Z',
37
+ namespace: 'cattle-fleet-system',
38
+ name: 'output3',
39
+ uid: '927b4a2e-6be0-476f-9bdd-cf30c4a27d8d'
40
+ },
41
+ name: 'output3',
42
+ spec: { awsElasticsearch: { endpoint: {} } },
43
+ status: { active: false }
44
+ },
45
+ {
46
+ apiVersion: 'logging.banzaicloud.io/v1beta1',
47
+ kind: 'Output',
48
+ metadata: {
49
+ creationTimestamp: '2025-03-17T10:51:55Z',
50
+ namespace: 'kube-system',
51
+ name: 'output4',
52
+ uid: '927b4a2e-6be0-476f-9bdd-cf30c4a27d8e'
53
+ },
54
+ name: 'output4',
55
+ spec: { awsElasticsearch: { endpoint: {} } },
56
+ status: { active: false }
57
+ },
58
+ ];
59
+
60
+ const logFlowData = {
61
+ apiVersion: 'logging.banzaicloud.io/v1beta1',
62
+ kind: 'Flow',
63
+ metadata: {
64
+ name: 'flow2',
65
+ creationTimestamp: '2025-03-17T10:53:02Z',
66
+ generation: 1,
67
+ namespace: 'cattle-fleet-system',
68
+ resourceVersion: '4070',
69
+ uid: 'fdf7d553-d101-4c37-91b0-784f95dc950a',
70
+ fields: [
71
+ 'flow2', true, null
72
+ ]
73
+ },
74
+ spec: {
75
+ localOutputRefs: [
76
+ 'output2',
77
+ 'output3'
78
+ ]
79
+ }
80
+ };
81
+
82
+ const logFlow = new LogFlow(logFlowData);
83
+
84
+ jest.spyOn(logFlow, 'allOutputs', 'get').mockReturnValue(logOutputs);
85
+
86
+ expect(logFlow.outputs).toStrictEqual([logOutputs[1], logOutputs[2]]);
87
+ });
88
+ });
@@ -64,7 +64,8 @@ export default class LogFlow extends SteveModel {
64
64
  get outputs() {
65
65
  const localOutputRefs = this.spec?.localOutputRefs || [];
66
66
 
67
- return this.allOutputs.filter((output) => localOutputRefs.includes(output.name));
67
+ return this.allOutputs.filter((output) => localOutputRefs.includes(output.name) &&
68
+ output.metadata?.namespace === this.metadata?.namespace);
68
69
  }
69
70
 
70
71
  get outputsSortable() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rancher/shell",
3
- "version": "3.0.2-rc.6",
3
+ "version": "3.0.3",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -85,7 +85,7 @@
85
85
  "eslint-plugin-import": "2.31.0",
86
86
  "eslint-plugin-jest": "24.4.0",
87
87
  "eslint-plugin-n": "15.2.0",
88
- "eslint-plugin-vue": "9.10.0",
88
+ "eslint-plugin-vue": "9.32.0",
89
89
  "eslint": "7.32.0",
90
90
  "event-target-shim": "5.0.1",
91
91
  "express": "4.17.1",
@@ -30,7 +30,6 @@ import {
30
30
  } from '@shell/config/private-label';
31
31
  import loadPlugins from '@shell/plugins/plugin';
32
32
  import Loading from '@shell/components/Loading';
33
- import { getGlobalBannerFontSizes } from '@shell/utils/banners';
34
33
  import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
35
34
 
36
35
  export default {
@@ -133,13 +132,6 @@ export default {
133
132
  hasLoginMessage() {
134
133
  return this.errorToDisplay || this.loggedOut || this.timedOut;
135
134
  },
136
-
137
- // Apply bottom margin so that the locale secletor control lifts up to avoid the footer fixed banner, if it is shown
138
- localeSelectorStyle() {
139
- const globalBannerSettings = getGlobalBannerFontSizes(this.$store);
140
-
141
- return { marginBottom: globalBannerSettings?.footerFont };
142
- }
143
135
  },
144
136
 
145
137
  async fetch() {
@@ -509,7 +501,6 @@ export default {
509
501
  class="locale-selector"
510
502
  >
511
503
  <LocaleSelector
512
- :style="localeSelectorStyle"
513
504
  mode="login"
514
505
  />
515
506
  </div>
@@ -526,6 +517,7 @@ export default {
526
517
  <style lang="scss" scoped>
527
518
  .login {
528
519
  overflow: hidden;
520
+ position: relative; // Used to keep the locale selector positioned correctly
529
521
 
530
522
  .row {
531
523
  align-items: center;
@@ -128,6 +128,10 @@ export default defineComponent({
128
128
 
129
129
  emits: ['update:value'],
130
130
 
131
+ data() {
132
+ return { describedById: `described-by-${ generateRandomAlphaString(12) }` };
133
+ },
134
+
131
135
  computed: {
132
136
  /**
133
137
  * Determines if the checkbox is disabled.
@@ -270,6 +274,7 @@ export default defineComponent({
270
274
  :aria-label="replacementLabel"
271
275
  :aria-checked="!!value"
272
276
  :aria-labelledby="labelKey || label ? idForLabel : undefined"
277
+ :aria-describedby="descriptionKey || description ? describedById : undefined"
273
278
  role="checkbox"
274
279
  />
275
280
  <span
@@ -311,10 +316,13 @@ export default defineComponent({
311
316
  >
312
317
  <t
313
318
  v-if="descriptionKey"
319
+ :id="describedById"
314
320
  :k="descriptionKey"
315
321
  />
316
322
  <template v-else-if="description">
317
- {{ description }}
323
+ <p :id="describedById">
324
+ {{ description }}
325
+ </p>
318
326
  </template>
319
327
  </div>
320
328
  <div class="checkbox-outer-container-extra">
@@ -148,7 +148,8 @@ export default defineComponent({
148
148
  return {
149
149
  updated: false,
150
150
  validationErrors: '',
151
- inputId: `input-${ generateRandomAlphaString(12) }`
151
+ inputId: `input-${ generateRandomAlphaString(12) }`,
152
+ describedById: `described-by-${ generateRandomAlphaString(12) }`
152
153
  };
153
154
  },
154
155
 
@@ -380,6 +381,7 @@ export default defineComponent({
380
381
  :placeholder="_placeholder"
381
382
  autocapitalize="off"
382
383
  :class="{ conceal: type === 'multiline-password' }"
384
+ :aria-describedby="cronHint || subLabel ? describedById : undefined"
383
385
  @update:value="onInput"
384
386
  @focus="onFocus"
385
387
  @blur="onBlur"
@@ -400,6 +402,7 @@ export default defineComponent({
400
402
  autocomplete="off"
401
403
  autocapitalize="off"
402
404
  :data-lpignore="ignorePasswordManagers"
405
+ :aria-describedby="cronHint || subLabel ? describedById : undefined"
403
406
  @input="onInput"
404
407
  @focus="onFocus"
405
408
  @blur="onBlur"
@@ -428,13 +431,15 @@ export default defineComponent({
428
431
  >
429
432
  <div
430
433
  v-if="cronHint"
434
+ :id="describedById"
431
435
  role="alert"
432
436
  :aria-label="cronHint"
433
437
  >
434
438
  {{ cronHint }}
435
439
  </div>
436
440
  <div
437
- v-if="subLabel"
441
+ v-else-if="subLabel"
442
+ :id="describedById"
438
443
  v-clean-html="subLabel"
439
444
  />
440
445
  </div>
@@ -38,7 +38,7 @@ Common labels
38
38
  helm.sh/chart: {{ include "extension-server.chart" . }}
39
39
  {{ include "extension-server.selectorLabels" . }}
40
40
  {{- if .Chart.AppVersion }}
41
- app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41
+ app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" | quote }}
42
42
  {{- end }}
43
43
  app.kubernetes.io/managed-by: {{ .Release.Service }}
44
44
  {{- end }}
@@ -60,4 +60,4 @@ Pkg annotations
60
60
  {{ $key }}: {{ $value | quote }}
61
61
  {{- end }}
62
62
  {{- end }}
63
- {{- end }}
63
+ {{- end }}
@@ -238,11 +238,9 @@ function clone_repo_test_extension_build() {
238
238
  # Don't forget to add the unit tests exception to clone_repo_test_extension_build function if a new extension has those
239
239
  clone_repo_test_extension_build "rancher" "kubewarden-ui" "kubewarden"
240
240
  clone_repo_test_extension_build "rancher" "elemental-ui" "elemental"
241
- # TODO #13141: Enable neuvector tests after issues have been resolved
242
- # clone_repo_test_extension_build "neuvector" "manager-ext" "neuvector-ui-ext"
243
- # TODO: #13173: Enable capi, stackstate, and harvester after `entities` resolution has been set
244
- # clone_repo_test_extension_build "rancher" "capi-ui-extension" "capi"
245
- # clone_repo_test_extension_build "StackVista" "rancher-extension-stackstate" "observability"
246
- # clone_repo_test_extension_build "harvester" "harvester-ui-extension" "harvester"
241
+ clone_repo_test_extension_build "neuvector" "manager-ext" "neuvector-ui-ext"
242
+ clone_repo_test_extension_build "rancher" "capi-ui-extension" "capi"
243
+ clone_repo_test_extension_build "StackVista" "rancher-extension-stackstate" "observability"
244
+ clone_repo_test_extension_build "harvester" "harvester-ui-extension" "harvester"
247
245
 
248
246
  echo "All done"
package/store/aws.js CHANGED
@@ -241,8 +241,15 @@ export const actions = {
241
241
  }
242
242
 
243
243
  addObjects(out, res[key]);
244
- opt.NextToken = res.NextToken;
245
- hasNext = !!res.NextToken;
244
+ if (res.NextToken) {
245
+ opt.NextToken = res.NextToken;
246
+ hasNext = true;
247
+ } else if (res.Marker) {
248
+ opt.Marker = res.Marker;
249
+ hasNext = true;
250
+ } else {
251
+ hasNext = false;
252
+ }
246
253
  }
247
254
 
248
255
  return out;
@@ -3446,13 +3446,6 @@ export function getIndividualBanners(store: any): {};
3446
3446
  * Overlay settings from the individual banner settings onto the single banner setting
3447
3447
  */
3448
3448
  export function overlayIndividualBanners(parsedBanner: any, banners: any): void;
3449
- /**
3450
- * Get banner font sizes - used to add margins when header and footer banners are present
3451
- **/
3452
- export function getGlobalBannerFontSizes(store: any): {
3453
- headerFont: string;
3454
- footerFont: string;
3455
- };
3456
3449
  }
3457
3450
 
3458
3451
  // @shell/utils/clipboard
@@ -4001,9 +3994,6 @@ export function deepToRaw(obj: any, cache?: any): any;
4001
3994
  * More info: https://github.com/lodash/lodash/issues/1313
4002
3995
  *
4003
3996
  * This helper function addresses the issue by always replacing the old array with the new array during the merge process.
4004
- *
4005
- * This helper is used for another case in rke2.vue to handle merging addon chart default values with the user's current values.
4006
- * It fixed https://github.com/rancher/dashboard/issues/12418
4007
3997
  */
4008
3998
  export function mergeWithReplaceArrays(obj1?: {}, obj2?: {}): any;
4009
3999
  export { isEqualBasic as isEqual };
package/utils/banners.js CHANGED
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  import { MANAGEMENT } from '@shell/config/types';
8
- import { SETTING } from '@shell/config/settings';
9
8
 
10
9
  const BANNER_HEADER = 'bannerHeader';
11
10
  const BANNER_FOOTER = 'bannerFooter';
@@ -57,47 +56,3 @@ export function overlayIndividualBanners(parsedBanner, banners) {
57
56
  } catch {}
58
57
  });
59
58
  }
60
-
61
- /**
62
- * Converts a pixel value to an em value based on the default font size.
63
- * @param {number} elementFontSize - The font size of the element in pixels.
64
- * @param {number} [defaultFontSize=14] - The default font size in pixels.
65
- * @returns {string} The converted value in em units.
66
- */
67
- function pxToEm(elementFontSize, defaultFontSize = 14) {
68
- const lineHeightInPx = 2 * parseInt(elementFontSize);
69
- const lineHeightInEm = lineHeightInPx / defaultFontSize;
70
-
71
- return `${ lineHeightInEm }em`;
72
- }
73
-
74
- /**
75
- * Get banner font sizes - used to add margins when header and footer banners are present
76
- **/
77
- export function getGlobalBannerFontSizes(store) {
78
- const settings = store.getters['management/all'](MANAGEMENT.SETTING);
79
- const bannerSettings = settings?.find((s) => s.id === SETTING.BANNERS);
80
- const individualBannerSettings = getIndividualBanners(store);
81
-
82
- if (bannerSettings) {
83
- const parsed = JSON.parse(bannerSettings.value);
84
-
85
- overlayIndividualBanners(parsed, individualBannerSettings);
86
-
87
- const {
88
- showFooter, showHeader, bannerFooter, bannerHeader, banner
89
- } = parsed;
90
-
91
- // add defaults to accommodate older JSON structures for banner definitions without breaking the UI
92
- // https://github.com/rancher/dashboard/issues/10140
93
- const bannerHeaderFontSize = bannerHeader?.fontSize || banner?.fontSize || '14px';
94
- const bannerFooterFontSize = bannerFooter?.fontSize || banner?.fontSize || '14px';
95
-
96
- return {
97
- headerFont: showHeader === 'true' ? pxToEm(bannerHeaderFontSize) : '0px',
98
- footerFont: showFooter === 'true' ? pxToEm(bannerFooterFontSize) : '0px'
99
- };
100
- }
101
-
102
- return undefined;
103
- }
package/utils/color.js CHANGED
@@ -19,14 +19,15 @@ export function createCssVars(color, theme = 'light', name = 'primary') {
19
19
  const contrastOpts = theme === 'light' ? LIGHT_CONTRAST_COLORS : DARK_CONTRAST_COLORS;
20
20
 
21
21
  return {
22
- [`--${ name }`]: color,
23
- [`--${ name }-text `]: contrastColor(color, contrastOpts),
24
- [`--${ name }-hover-bg`]: lighten(color, -10),
25
- [`--${ name }-active-bg`]: lighten(color, -25),
26
- [`--${ name }-active-text`]: contrastColor(lighten(color, -25), contrastOpts),
27
- [`--${ name }-border`]: color,
28
- [`--${ name }-banner-bg`]: opacity(color, 0.15),
29
- [`--${ name }-light-bg`]: opacity(color, 0.05),
22
+ [`--${ name }`]: color,
23
+ [`--${ name }-text `]: contrastColor(color, contrastOpts),
24
+ [`--${ name }-hover-bg`]: lighten(color, -10),
25
+ [`--${ name }-active-bg`]: lighten(color, -25),
26
+ [`--${ name }-active-text`]: contrastColor(lighten(color, -25), contrastOpts),
27
+ [`--${ name }-border`]: color,
28
+ [`--${ name }-banner-bg`]: opacity(color, 0.15),
29
+ [`--${ name }-light-bg`]: opacity(color, 0.05),
30
+ [`--${ name }-keyboard-focus`]: lighten(color, -10),
30
31
  };
31
32
  }
32
33
 
package/utils/object.js CHANGED
@@ -488,9 +488,6 @@ export function deepToRaw(obj, cache = new WeakSet()) {
488
488
  * More info: https://github.com/lodash/lodash/issues/1313
489
489
  *
490
490
  * This helper function addresses the issue by always replacing the old array with the new array during the merge process.
491
- *
492
- * This helper is used for another case in rke2.vue to handle merging addon chart default values with the user's current values.
493
- * It fixed https://github.com/rancher/dashboard/issues/12418
494
491
  */
495
492
  export function mergeWithReplaceArrays(obj1 = {}, obj2 = {}) {
496
493
  return mergeWith(obj1, obj2, (obj1Value, obj2Value) => {