@rancher/shell 3.0.2-rc.2 → 3.0.2-rc.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 (141) hide show
  1. package/assets/styles/base/_basic.scss +5 -7
  2. package/assets/styles/global/_button.scss +10 -0
  3. package/assets/styles/global/_tooltip.scss +2 -2
  4. package/assets/styles/themes/_dark.scss +14 -2
  5. package/assets/styles/themes/_light.scss +7 -2
  6. package/assets/styles/vendor/vue-select.scss +4 -0
  7. package/assets/translations/en-us.yaml +44 -5
  8. package/components/BannerGraphic.vue +0 -42
  9. package/components/ButtonMultiAction.vue +1 -1
  10. package/components/Carousel.vue +36 -29
  11. package/components/CommunityLinks.vue +6 -1
  12. package/components/GrowlManager.vue +9 -2
  13. package/components/LocaleSelector.vue +8 -1
  14. package/components/PaginatedResourceTable.vue +4 -7
  15. package/components/ProgressBarMulti.vue +14 -0
  16. package/components/Questions/Reference.vue +57 -28
  17. package/components/SelectIconGrid.vue +12 -1
  18. package/components/SideNav.vue +12 -38
  19. package/components/SortableTable/index.vue +1 -0
  20. package/components/Tabbed/index.vue +12 -1
  21. package/components/YamlEditor.vue +1 -0
  22. package/components/auth/Principal.vue +5 -3
  23. package/components/fleet/FleetClusters.vue +82 -1
  24. package/components/fleet/FleetRepos.vue +13 -30
  25. package/components/fleet/ForceDirectedTreeChart/index.vue +2 -2
  26. package/components/form/ChangePassword.vue +2 -0
  27. package/components/form/ColorInput.vue +24 -1
  28. package/components/form/FileSelector.vue +2 -0
  29. package/components/form/KeyValue.vue +230 -160
  30. package/components/form/LabeledSelect.vue +1 -1
  31. package/components/form/PlusMinus.vue +14 -2
  32. package/components/form/ResourceLabeledSelect.vue +13 -53
  33. package/components/form/ResourceSelector.vue +1 -0
  34. package/components/form/ResourceTabs/index.vue +79 -36
  35. package/components/form/SecretSelector.vue +2 -2
  36. package/components/form/__tests__/KeyValue.test.ts +1 -1
  37. package/components/formatter/FleetClusterSummaryGraph.vue +2 -2
  38. package/components/formatter/FleetSummaryGraph.vue +6 -7
  39. package/components/formatter/WorkloadHealthScale.vue +7 -0
  40. package/components/nav/Group.vue +30 -4
  41. package/components/nav/Header.vue +82 -114
  42. package/components/nav/HeaderPageActionMenu.vue +27 -131
  43. package/components/nav/NamespaceFilter.vue +1 -1
  44. package/components/nav/Type.vue +15 -0
  45. package/config/home-links.js +21 -13
  46. package/config/labels-annotations.js +2 -0
  47. package/config/page-actions.js +1 -0
  48. package/config/pagination-table-headers.js +15 -1
  49. package/config/product/explorer.js +7 -17
  50. package/config/table-headers.js +6 -0
  51. package/config/version.js +5 -1
  52. package/core/plugin.ts +41 -1
  53. package/core/plugins.js +125 -72
  54. package/core/types-provisioning.ts +91 -2
  55. package/core/types.ts +55 -0
  56. package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +12 -3
  57. package/detail/catalog.cattle.io.app.vue +1 -1
  58. package/detail/fleet.cattle.io.cluster.vue +3 -3
  59. package/detail/namespace.vue +13 -19
  60. package/detail/networking.k8s.io.ingress.vue +13 -53
  61. package/detail/provisioning.cattle.io.cluster.vue +12 -1
  62. package/detail/workload/index.vue +3 -3
  63. package/dialog/AddCustomBadgeDialog.vue +5 -1
  64. package/edit/auth/ldap/__tests__/config.test.ts +18 -0
  65. package/edit/auth/ldap/config.vue +24 -0
  66. package/edit/auth/saml.vue +8 -6
  67. package/edit/fleet.cattle.io.gitrepo.vue +7 -1
  68. package/edit/logging-flow/index.vue +4 -19
  69. package/edit/networking.k8s.io.ingress/index.vue +18 -65
  70. package/edit/networking.k8s.io.networkpolicy/index.vue +4 -5
  71. package/edit/provisioning.cattle.io.cluster/index.vue +13 -1
  72. package/edit/provisioning.cattle.io.cluster/rke2.vue +31 -115
  73. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +2 -2
  74. package/edit/provisioning.cattle.io.cluster/tabs/networking/ACE.vue +14 -28
  75. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +25 -12
  76. package/edit/service.vue +1 -2
  77. package/list/networking.k8s.io.ingress.vue +1 -1
  78. package/list/node.vue +15 -8
  79. package/list/persistentvolume.vue +12 -4
  80. package/list/service.vue +1 -1
  81. package/list/workload.vue +4 -0
  82. package/mixins/chart.js +4 -1
  83. package/models/catalog.cattle.io.app.js +3 -1
  84. package/models/catalog.cattle.io.clusterrepo.js +56 -7
  85. package/models/fleet.cattle.io.bundle.js +0 -11
  86. package/models/fleet.cattle.io.cluster.js +17 -1
  87. package/models/fleet.cattle.io.gitrepo.js +86 -50
  88. package/models/provisioning.cattle.io.cluster.js +47 -2
  89. package/models/service.js +1 -0
  90. package/models/workload.js +19 -1
  91. package/package.json +5 -4
  92. package/pages/c/_cluster/apps/charts/index.vue +4 -0
  93. package/pages/c/_cluster/explorer/ConfigBadge.vue +8 -7
  94. package/pages/c/_cluster/explorer/index.vue +13 -6
  95. package/pages/c/_cluster/fleet/GitRepoGraphConfig.js +3 -3
  96. package/pages/c/_cluster/fleet/index.vue +75 -89
  97. package/pages/c/_cluster/settings/links.vue +2 -2
  98. package/pages/diagnostic.vue +17 -15
  99. package/pages/home.vue +32 -6
  100. package/plugins/clean-html.js +50 -0
  101. package/plugins/dashboard-store/resource-class.js +4 -0
  102. package/plugins/plugin.js +54 -49
  103. package/plugins/steve/mutations.js +1 -1
  104. package/plugins/steve/steve-class.js +8 -0
  105. package/plugins/steve/steve-pagination-utils.ts +3 -1
  106. package/rancher-components/Accordion/Accordion.vue +4 -4
  107. package/rancher-components/BadgeState/BadgeState.vue +7 -0
  108. package/rancher-components/Card/Card.vue +27 -1
  109. package/rancher-components/Form/Checkbox/Checkbox.vue +9 -2
  110. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +18 -1
  111. package/rancher-components/Form/LabeledInput/LabeledInput.vue +18 -1
  112. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +39 -2
  113. package/rancher-components/RcButton/RcButton.vue +90 -0
  114. package/rancher-components/RcButton/index.ts +2 -0
  115. package/rancher-components/RcButton/types.ts +17 -0
  116. package/rancher-components/RcDropdown/RcDropdown.vue +111 -0
  117. package/rancher-components/RcDropdown/RcDropdownItem.vue +127 -0
  118. package/rancher-components/RcDropdown/RcDropdownSeparator.vue +6 -0
  119. package/rancher-components/RcDropdown/RcDropdownTrigger.vue +43 -0
  120. package/rancher-components/RcDropdown/index.ts +4 -0
  121. package/rancher-components/RcDropdown/types.ts +22 -0
  122. package/rancher-components/RcDropdown/useDropdownCollection.ts +45 -0
  123. package/rancher-components/RcDropdown/useDropdownContext.ts +83 -0
  124. package/scripts/test-plugins-build.sh +2 -0
  125. package/scripts/typegen.sh +2 -0
  126. package/store/catalog.js +1 -1
  127. package/tsconfig.json +2 -1
  128. package/types/components/paginatedResourceTable.ts +25 -0
  129. package/types/components/resourceLabeledSelect.ts +48 -0
  130. package/types/resources/fleet.d.ts +17 -0
  131. package/types/shell/index.d.ts +61 -0
  132. package/utils/auth.js +5 -1
  133. package/utils/cluster.js +106 -0
  134. package/utils/fleet.ts +35 -3
  135. package/utils/ingress.ts +64 -0
  136. package/utils/uiplugins.ts +56 -44
  137. package/utils/validators/cron-schedule.js +7 -2
  138. package/utils/validators/formRules/__tests__/index.test.ts +53 -17
  139. package/utils/validators/formRules/index.ts +20 -5
  140. package/vue.config.js +1 -1
  141. package/components/RelatedWorkloadsTable.vue +0 -50
@@ -25,10 +25,7 @@ import {
25
25
  clone, diff, set, get, isEmpty, mergeWithReplaceArrays
26
26
  } from '@shell/utils/object';
27
27
  import { allHash } from '@shell/utils/promise';
28
- import { sortBy } from '@shell/utils/sort';
29
-
30
- import { compare, sortable } from '@shell/utils/version';
31
- import { isHarvesterSatisfiesVersion, labelForAddon } from '@shell/utils/cluster';
28
+ import { getAllOptionsAfterCurrentVersion, filterOutDeprecatedPatchVersions, isHarvesterSatisfiesVersion, labelForAddon } from '@shell/utils/cluster';
32
29
 
33
30
  import { BadgeState } from '@components/BadgeState';
34
31
  import { Banner } from '@components/Banner';
@@ -321,15 +318,15 @@ export default {
321
318
  const existingK3s = this.mode === _EDIT && cur.includes('k3s');
322
319
  const isAzure = this.agentConfig?.['cloud-provider-name'] === 'azure';
323
320
 
324
- let allValidRke2Versions = this.getAllOptionsAfterCurrentVersion(this.rke2Versions, (existingRke2 ? cur : null), this.defaultRke2);
325
- let allValidK3sVersions = this.getAllOptionsAfterCurrentVersion(this.k3sVersions, (existingK3s ? cur : null), this.defaultK3s);
321
+ let allValidRke2Versions = getAllOptionsAfterCurrentVersion(this.$store, this.rke2Versions, (existingRke2 ? cur : null), this.defaultRke2);
322
+ let allValidK3sVersions = getAllOptionsAfterCurrentVersion(this.$store, this.k3sVersions, (existingK3s ? cur : null), this.defaultK3s);
326
323
 
327
324
  if (!this.showDeprecatedPatchVersions) {
328
325
  // Normally, we only want to show the most recent patch version
329
326
  // for each Kubernetes minor version. However, if the user
330
327
  // opts in to showing deprecated versions, we don't filter them.
331
- allValidRke2Versions = this.filterOutDeprecatedPatchVersions(allValidRke2Versions, cur);
332
- allValidK3sVersions = this.filterOutDeprecatedPatchVersions(allValidK3sVersions, cur);
328
+ allValidRke2Versions = filterOutDeprecatedPatchVersions(allValidRke2Versions, cur);
329
+ allValidK3sVersions = filterOutDeprecatedPatchVersions(allValidK3sVersions, cur);
333
330
  }
334
331
 
335
332
  if (isAzure) {
@@ -711,7 +708,7 @@ export default {
711
708
  const first = all[0]?.value;
712
709
  const preferred = all.find((x) => x.value === this.defaultRke2)?.value;
713
710
 
714
- const rke2 = this.getAllOptionsAfterCurrentVersion(this.rke2Versions, null);
711
+ const rke2 = getAllOptionsAfterCurrentVersion(this.$store, this.rke2Versions, null);
715
712
  const showRke2 = rke2.length;
716
713
  let out;
717
714
 
@@ -984,6 +981,10 @@ export default {
984
981
  if (this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName === undefined) {
985
982
  this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName = '';
986
983
  }
984
+
985
+ if ( isEmpty(this.value?.spec?.localClusterAuthEndpoint) ) {
986
+ set(this.value, 'spec.localClusterAuthEndpoint', { enabled: false });
987
+ }
987
988
  },
988
989
 
989
990
  /**
@@ -1111,6 +1112,17 @@ export default {
1111
1112
  }
1112
1113
  },
1113
1114
 
1115
+ enableLocalClusterAuthEndpoint(neu) {
1116
+ this.localValue.spec.localClusterAuthEndpoint.enabled = neu;
1117
+ if (!neu) {
1118
+ delete this.localValue.spec.localClusterAuthEndpoint.caCerts;
1119
+ delete this.localValue.spec.localClusterAuthEndpoint.fqdn;
1120
+ } else {
1121
+ this.localValue.spec.localClusterAuthEndpoint.caCerts = '';
1122
+ this.localValue.spec.localClusterAuthEndpoint.fqdn = '';
1123
+ }
1124
+ },
1125
+
1114
1126
  /**
1115
1127
  * Get machine pools from the cluster configuration
1116
1128
  * this.value.spec.rkeConfig.machinePools
@@ -1792,110 +1804,6 @@ export default {
1792
1804
  this.value.spec.rkeConfig.registries.configs = configs;
1793
1805
  },
1794
1806
 
1795
- getAllOptionsAfterCurrentVersion(versions, currentVersion, defaultVersion) {
1796
- const out = (versions || []).filter((obj) => !!obj.serverArgs).map((obj) => {
1797
- let disabled = false;
1798
- let experimental = false;
1799
- let isCurrentVersion = false;
1800
- let label = obj.id;
1801
-
1802
- if (currentVersion) {
1803
- disabled = compare(obj.id, currentVersion) < 0;
1804
- isCurrentVersion = compare(obj.id, currentVersion) === 0;
1805
- }
1806
-
1807
- if (defaultVersion) {
1808
- experimental = compare(defaultVersion, obj.id) < 0;
1809
- }
1810
-
1811
- if (isCurrentVersion) {
1812
- label = `${ label } ${ this.t('cluster.kubernetesVersion.current') }`;
1813
- }
1814
-
1815
- if (experimental) {
1816
- label = `${ label } ${ this.t('cluster.kubernetesVersion.experimental') }`;
1817
- }
1818
-
1819
- return {
1820
- label,
1821
- value: obj.id,
1822
- sort: sortable(obj.id),
1823
- serverArgs: obj.serverArgs,
1824
- agentArgs: obj.agentArgs,
1825
- charts: obj.charts,
1826
- disabled,
1827
- };
1828
- });
1829
-
1830
- if (currentVersion && !out.find((obj) => obj.value === currentVersion)) {
1831
- out.push({
1832
- label: `${ currentVersion } ${ this.t('cluster.kubernetesVersion.current') }`,
1833
- value: currentVersion,
1834
- sort: sortable(currentVersion),
1835
- });
1836
- }
1837
-
1838
- const sorted = sortBy(out, 'sort:desc');
1839
-
1840
- const mostRecentPatchVersions = this.getMostRecentPatchVersions(sorted);
1841
-
1842
- const sortedWithDeprecatedLabel = sorted.map((optionData) => {
1843
- const majorMinor = `${ semver.major(optionData.value) }.${ semver.minor(optionData.value) }`;
1844
-
1845
- if (mostRecentPatchVersions[majorMinor] === optionData.value) {
1846
- return optionData;
1847
- }
1848
-
1849
- return {
1850
- ...optionData,
1851
- label: `${ optionData.label } ${ this.t('cluster.kubernetesVersion.deprecated') }`
1852
- };
1853
- });
1854
-
1855
- return sortedWithDeprecatedLabel;
1856
- },
1857
-
1858
- getMostRecentPatchVersions(sortedVersions) {
1859
- // Get the most recent patch version for each Kubernetes minor version.
1860
- const versionMap = {};
1861
-
1862
- sortedVersions.forEach((version) => {
1863
- const majorMinor = `${ semver.major(version.value) }.${ semver.minor(version.value) }`;
1864
-
1865
- if (!versionMap[majorMinor]) {
1866
- // Because we start with a sorted list of versions, we know the
1867
- // highest patch version is first in the list, so we only keep the
1868
- // first of each minor version in the list.
1869
- versionMap[majorMinor] = version.value;
1870
- }
1871
- });
1872
-
1873
- return versionMap;
1874
- },
1875
-
1876
- filterOutDeprecatedPatchVersions(allVersions, currentVersion) {
1877
- // Get the most recent patch version for each Kubernetes minor version.
1878
- const mostRecentPatchVersions = this.getMostRecentPatchVersions(allVersions);
1879
-
1880
- const filteredVersions = allVersions.filter((version) => {
1881
- // Always show pre-releases
1882
- if (semver.prerelease(version.value)) {
1883
- return true;
1884
- }
1885
-
1886
- const majorMinor = `${ semver.major(version.value) }.${ semver.minor(version.value) }`;
1887
-
1888
- // Always show current version, else show if we haven't shown anything for this major.minor version yet
1889
- if (version.value === currentVersion || mostRecentPatchVersions[majorMinor] === version.value) {
1890
- return true;
1891
- }
1892
-
1893
- return false;
1894
- });
1895
-
1896
- return filteredVersions;
1897
- },
1898
-
1899
1807
  generateYaml() {
1900
1808
  const resource = this.value;
1901
1809
  const inStore = this.$store.getters['currentStore'](resource);
@@ -2393,8 +2301,16 @@ export default {
2393
2301
  :mode="mode"
2394
2302
  :selected-version="selectedVersion"
2395
2303
  :truncate-limit="truncateLimit"
2396
- @update:value="$emit('input', $event)"
2397
- @truncate-hostname="truncateHostname"
2304
+ @truncate-hostname-changed="truncateHostname"
2305
+ @cluster-cidr-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-cidr'] = val"
2306
+ @service-cidr-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['service-cidr'] = val"
2307
+ @cluster-domain-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-domain'] = val"
2308
+ @cluster-dns-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-dns'] = val"
2309
+ @service-node-port-range-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['service-node-port-range'] = val"
2310
+ @tls-san-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['tls-san'] = val"
2311
+ @local-cluster-auth-endpoint-changed="enableLocalClusterAuthEndpoint"
2312
+ @ca-certs-changed="(val)=>localValue.spec.localClusterAuthEndpoint.caCerts = val"
2313
+ @fqdn-changed="(val)=>localValue.spec.localClusterAuthEndpoint.fqdn = val"
2398
2314
  />
2399
2315
  </Tab>
2400
2316
 
@@ -300,7 +300,7 @@ export default {
300
300
  return name === 'rancher-vsphere';
301
301
  },
302
302
 
303
- showk8s21LegacyWarning() {
303
+ showk8sLegacyWarning() {
304
304
  const isLegacyEnabled = this.features(LEGACY);
305
305
 
306
306
  if (!isLegacyEnabled) {
@@ -437,7 +437,7 @@ export default {
437
437
  :label="t('cluster.banner.haveArgInfo')"
438
438
  />
439
439
  <Banner
440
- v-if="showk8s21LegacyWarning"
440
+ v-if="showk8sLegacyWarning"
441
441
  color="warning"
442
442
  :label="t('cluster.legacyWarning')"
443
443
  />
@@ -2,14 +2,14 @@
2
2
  import { RadioGroup } from '@components/Form/Radio';
3
3
  import { LabeledInput } from '@components/Form/LabeledInput';
4
4
  import FileSelector, { createOnSelected } from '@shell/components/form/FileSelector';
5
- import { set } from '@shell/utils/object';
6
- import isEmpty from 'lodash/isEmpty';
7
5
 
8
6
  export default {
9
7
  components: {
10
8
  RadioGroup, LabeledInput, FileSelector
11
9
  },
12
10
 
11
+ emits: ['fqdn-changed', 'ca-certs-changed', 'local-cluster-auth-endpoint-changed'],
12
+
13
13
  props: {
14
14
  mode: {
15
15
  type: String,
@@ -22,57 +22,43 @@ export default {
22
22
  },
23
23
  },
24
24
 
25
- data() {
26
- if ( isEmpty(this.value?.spec?.localClusterAuthEndpoint) ) {
27
- set(this.value, 'spec.localClusterAuthEndpoint', {
28
- enabled: false,
29
- caCerts: '',
30
- fqdn: '',
31
- });
32
- }
33
-
34
- return {};
35
- },
36
-
37
- computed: {
38
- config() {
39
- return this.value.spec.localClusterAuthEndpoint;
40
- },
41
- },
42
-
43
- methods: { onCertSelected: createOnSelected('config.caCerts') }
25
+ methods: { onCertSelected: createOnSelected('value.caCerts') }
44
26
  };
45
27
  </script>
46
28
 
47
29
  <template>
48
30
  <div>
49
- <h3 v-t="'cluster.tabs.ace'" />
50
-
51
31
  <RadioGroup
52
- v-model:value="config.enabled"
32
+ v-model:value="value.enabled"
53
33
  name="enabled"
34
+ data-testid="ace-enabled-radio-input"
54
35
  :options="[false, true]"
55
36
  :labels="[t('generic.disabled'), t('generic.enabled')]"
56
37
  :mode="mode"
38
+ @update:value="$emit('local-cluster-auth-endpoint-changed', $event)"
57
39
  />
58
40
 
59
- <template v-if="config.enabled">
41
+ <template v-if="value.enabled">
60
42
  <div class="row mb-20">
61
43
  <div class="col span-6">
62
44
  <LabeledInput
63
- v-model:value="config.fqdn"
45
+ :value="value.fqdn"
64
46
  :mode="mode"
65
- label="FQDN"
47
+ :label="t('cluster.rke2.address.fqdn.label')"
48
+ data-testid="ace-fqdn-input"
66
49
  :tooltip="t('cluster.rke2.address.fqdn.toolTip')"
50
+ @update:value="$emit('fqdn-changed', $event)"
67
51
  />
68
52
  </div>
69
53
  <div class="col span-6">
70
54
  <LabeledInput
71
- v-model:value="config.caCerts"
55
+ :value="value.caCerts"
72
56
  :mode="mode"
73
57
  :label="t('cluster.rke2.address.caCerts.label')"
74
58
  type="multiline"
59
+ data-testid="ace-cacerts-input"
75
60
  :tooltip="t('cluster.rke2.address.caCerts.toolTip')"
61
+ @update:value="$emit('ca-certs-changed', $event)"
76
62
  />
77
63
  <FileSelector
78
64
  :mode="mode"
@@ -9,7 +9,12 @@ import ACE from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking/ACE'
9
9
  const NETBIOS_TRUNCATION_LENGTH = 15;
10
10
 
11
11
  export default {
12
- emits: ['update:value', 'truncate-hostname', 'input'],
12
+ emits: [
13
+ 'update:value', 'cluster-cidr-changed', 'local-cluster-auth-endpoint-changed',
14
+ 'service-cidr-changed', 'cluster-domain-changed', 'cluster-dns-changed',
15
+ 'truncate-hostname-changed', 'ca-certs-changed', 'service-node-port-range-changed',
16
+ 'fqdn-changed', 'tls-san-changed'
17
+ ],
13
18
 
14
19
  components: {
15
20
  LabeledInput,
@@ -74,7 +79,7 @@ export default {
74
79
  this.$emit('update:value', newValue);
75
80
  }
76
81
  },
77
- },
82
+ }
78
83
  };
79
84
  </script>
80
85
 
@@ -99,10 +104,11 @@ export default {
99
104
  class="col span-6"
100
105
  >
101
106
  <LabeledInput
102
- v-model:value="serverConfig['cluster-cidr']"
107
+ :value="serverConfig['cluster-cidr']"
103
108
  :mode="mode"
104
109
  :disabled="isEdit"
105
110
  :label="t('cluster.rke2.address.clusterCidr.label')"
111
+ @update:value="$emit('cluster-cidr-changed', $event)"
106
112
  />
107
113
  </div>
108
114
  <div
@@ -110,10 +116,11 @@ export default {
110
116
  class="col span-6"
111
117
  >
112
118
  <LabeledInput
113
- v-model:value="serverConfig['service-cidr']"
119
+ :value="serverConfig['service-cidr']"
114
120
  :mode="mode"
115
121
  :disabled="isEdit"
116
122
  :label="t('cluster.rke2.address.serviceCidr.label')"
123
+ @update:value="$emit('service-cidr-changed', $event)"
117
124
  />
118
125
  </div>
119
126
  </div>
@@ -124,10 +131,11 @@ export default {
124
131
  class="col span-6"
125
132
  >
126
133
  <LabeledInput
127
- v-model:value="serverConfig['cluster-dns']"
134
+ :value="serverConfig['cluster-dns']"
128
135
  :mode="mode"
129
136
  :disabled="isEdit"
130
137
  :label="t('cluster.rke2.address.dns.label')"
138
+ @update:value="$emit('cluster-dns-changed', $event)"
131
139
  />
132
140
  </div>
133
141
  <div
@@ -135,10 +143,11 @@ export default {
135
143
  class="col span-6"
136
144
  >
137
145
  <LabeledInput
138
- v-model:value="serverConfig['cluster-domain']"
146
+ :value="serverConfig['cluster-domain']"
139
147
  :mode="mode"
140
148
  :disabled="isEdit"
141
149
  :label="t('cluster.rke2.address.domain.label')"
150
+ @update:value="$emit('cluster-domain-changed', $event)"
142
151
  />
143
152
  </div>
144
153
  </div>
@@ -149,9 +158,10 @@ export default {
149
158
  >
150
159
  <div class="col span-6">
151
160
  <LabeledInput
152
- v-model:value="serverConfig['service-node-port-range']"
161
+ :value="serverConfig['service-node-port-range']"
153
162
  :mode="mode"
154
163
  :label="t('cluster.rke2.address.nodePortRange.label')"
164
+ @update:value="$emit('service-node-port-range-changed', $event)"
155
165
  />
156
166
  </div>
157
167
  <div
@@ -165,7 +175,7 @@ export default {
165
175
  :mode="mode"
166
176
  :label="t('cluster.rke2.truncateHostnames')"
167
177
  data-testid="network-tab-truncate-hostname"
168
- @update:value="$emit('truncate-hostname', $event)"
178
+ @update:value="$emit('truncate-hostname-changed', $event)"
169
179
  />
170
180
  <Banner
171
181
  v-if="hostnameTruncationManuallySet"
@@ -184,18 +194,21 @@ export default {
184
194
  >
185
195
  <div class="col span-6">
186
196
  <ArrayList
187
- v-model:value="serverConfig['tls-san']"
197
+ :value="serverConfig['tls-san']"
188
198
  :protip="false"
189
199
  :mode="mode"
190
200
  :title="t('cluster.rke2.address.tlsSan.label')"
201
+ @update:value="$emit('tls-san-changed', $event)"
191
202
  />
192
203
  </div>
193
204
  </div>
194
-
205
+ <h3 v-t="'cluster.tabs.ace'" />
195
206
  <ACE
196
- v-model:value="localValue"
207
+ v-model:value="localValue.spec.localClusterAuthEndpoint"
197
208
  :mode="mode"
198
- @update:value="$emit('input', $event)"
209
+ @fqdn-changed="$emit('fqdn-changed', $event)"
210
+ @caCerts-changed="$emit('ca-certs-changed', $event)"
211
+ @local-cluster-auth-endpoint-changed="$emit('local-cluster-auth-endpoint-changed', $event)"
199
212
  />
200
213
  </div>
201
214
  </template>
package/edit/service.vue CHANGED
@@ -259,7 +259,6 @@ export default {
259
259
  methods: {
260
260
  updateMatchingPods: throttle(function() {
261
261
  const { value: { spec: { selector = { } } } } = this;
262
- // See https://github.com/rancher/dashboard/issues/10417, all pods bad, need to replace local selector somehow
263
262
  const allInNamespace = this.allPods.filter((pod) => pod.metadata.namespace === this.value?.metadata?.namespace);
264
263
 
265
264
  if (isEmpty(selector)) {
@@ -287,7 +286,7 @@ export default {
287
286
 
288
287
  const hash = {
289
288
  provClusters: this.$store.dispatch('management/findAll', { type: CAPI.RANCHER_CLUSTER }),
290
- pods: this.$store.dispatch(`${ inStore }/findAll`, { type: POD }),
289
+ pods: this.$store.dispatch(`${ inStore }/findAll`, { type: POD }), // Used in conjunction with `matches/match/label selectors`. Requires https://github.com/rancher/dashboard/issues/10417 to fix
291
290
  harvesterConfigs: this.$store.dispatch(`management/findAll`, { type: HCI.HARVESTER_CONFIG }),
292
291
  };
293
292
 
@@ -20,7 +20,7 @@ export default {
20
20
 
21
21
  methods: {
22
22
  /**
23
- * opts: FetchSecondaryResourcesOpts
23
+ * of type PagTableFetchSecondaryResources
24
24
  */
25
25
  async fetchSecondaryResources(opts) {
26
26
  // pathExistsInSchema requires schema networking.k8s.io.ingress to have resources fields via schema definition but none were found. has the schema 'fetchResourceFields' been called?
package/list/node.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import PaginatedResourceTable, { FetchPageSecondaryResourcesOpts } from '@shell/components/PaginatedResourceTable.vue';
2
+ import PaginatedResourceTable from '@shell/components/PaginatedResourceTable.vue';
3
3
  import Tag from '@shell/components/Tag.vue';
4
4
  import { Banner } from '@components/Banner';
5
5
  import { PODS } from '@shell/config/table-headers';
@@ -19,6 +19,7 @@ import { GROUP_RESOURCES, mapPref } from '@shell/store/prefs';
19
19
  import { COLUMN_BREAKPOINTS } from '@shell/types/store/type-map';
20
20
 
21
21
  import { mapGetters } from 'vuex';
22
+ import { PagTableFetchPageSecondaryResourcesOpts, PagTableFetchSecondaryResourcesOpts, PagTableFetchSecondaryResourcesReturns } from '@shell/types/components/paginatedResourceTable';
22
23
 
23
24
  export default defineComponent({
24
25
  name: 'ListNode',
@@ -185,19 +186,25 @@ export default defineComponent({
185
186
  row['displayLabels'] = !row.displayLabels;
186
187
  },
187
188
 
188
- fetchSecondaryResources(): { [key: string]: Promise<any>} {
189
- const hash: { [key: string]: Promise<any>} = {};
189
+ /**
190
+ * of type PagTableFetchSecondaryResources
191
+ */
192
+ async fetchSecondaryResources({ canPaginate }: PagTableFetchSecondaryResourcesOpts): PagTableFetchSecondaryResourcesReturns {
193
+ if (canPaginate) {
194
+ return;
195
+ }
196
+ const promises = [];
190
197
 
191
198
  if (this.canViewMgmtNodes) {
192
- hash.mgmtNodes = this.$store.dispatch(`management/findAll`, { type: MANAGEMENT.NODE });
199
+ promises.push(this.$store.dispatch(`management/findAll`, { type: MANAGEMENT.NODE }));
193
200
  }
194
201
 
195
202
  if (this.canViewNormanNodes) {
196
- hash.normanNodes = this.$store.dispatch(`rancher/findAll`, { type: NORMAN.NODE });
203
+ promises.push(this.$store.dispatch(`rancher/findAll`, { type: NORMAN.NODE }));
197
204
  }
198
205
 
199
206
  if (this.canViewMachines) {
200
- hash.machines = this.$store.dispatch(`management/findAll`, { type: CAPI.MACHINE });
207
+ promises.push(this.$store.dispatch(`management/findAll`, { type: CAPI.MACHINE }));
201
208
  }
202
209
 
203
210
  if (this.canViewPods) {
@@ -205,7 +212,7 @@ export default defineComponent({
205
212
  this.$store.dispatch(`cluster/findAll`, { type: POD });
206
213
  }
207
214
 
208
- return hash;
215
+ await Promise.all(promises);
209
216
  },
210
217
 
211
218
  /**
@@ -215,7 +222,7 @@ export default defineComponent({
215
222
  *
216
223
  * So when we have a page.... use those entries as filters when fetching the other resources
217
224
  */
218
- async fetchPageSecondaryResources({ canPaginate, force, page }: FetchPageSecondaryResourcesOpts) {
225
+ async fetchPageSecondaryResources({ canPaginate, force, page }: PagTableFetchPageSecondaryResourcesOpts) {
219
226
  if (!page?.length) {
220
227
  return;
221
228
  }
@@ -1,9 +1,10 @@
1
1
  <script lang="ts">
2
2
  import { defineComponent } from 'vue';
3
- import PaginatedResourceTable, { FetchPageSecondaryResourcesOpts } from '@shell/components/PaginatedResourceTable.vue';
3
+ import PaginatedResourceTable from '@shell/components/PaginatedResourceTable.vue';
4
4
  import { PVC } from '@shell/config/types';
5
5
  import { ActionFindPageArgs } from '@shell/types/store/dashboard-store.types';
6
6
  import { FilterArgs, PaginationFilterField, PaginationParamFilter } from '@shell/types/store/pagination.types';
7
+ import { PagTableFetchPageSecondaryResourcesOpts, PagTableFetchSecondaryResourcesOpts, PagTableFetchSecondaryResourcesReturns } from '@shell/types/components/paginatedResourceTable';
7
8
 
8
9
  export default defineComponent({
9
10
  name: 'ListPersistentVolume',
@@ -38,8 +39,15 @@ export default defineComponent({
38
39
  },
39
40
 
40
41
  methods: {
41
- fetchSecondaryResources(): { [key: string]: Promise<any>} {
42
- return { pvc: this.$store.dispatch(`cluster/findAll`, { type: PVC }) };
42
+ /**
43
+ * of type PagTableFetchSecondaryResources
44
+ */
45
+ async fetchSecondaryResources({ canPaginate }: PagTableFetchSecondaryResourcesOpts): PagTableFetchSecondaryResourcesReturns {
46
+ if (canPaginate) {
47
+ return;
48
+ }
49
+
50
+ return this.$store.dispatch(`cluster/findAll`, { type: PVC });
43
51
  },
44
52
 
45
53
  /**
@@ -47,7 +55,7 @@ export default defineComponent({
47
55
  *
48
56
  * So when we have a page.... use those entries as filters when fetching the other resources
49
57
  */
50
- async fetchPageSecondaryResources({ canPaginate, force, page }: FetchPageSecondaryResourcesOpts) {
58
+ async fetchPageSecondaryResources({ canPaginate, force, page }: PagTableFetchPageSecondaryResourcesOpts) {
51
59
  if (!page?.length) {
52
60
  return;
53
61
  }
package/list/service.vue CHANGED
@@ -24,7 +24,7 @@ export default {
24
24
 
25
25
  methods: {
26
26
  /**
27
- * opts: FetchSecondaryResourcesOpts
27
+ * of type PagTableFetchSecondaryResources
28
28
  */
29
29
  async fetchSecondaryResources(opts) {
30
30
  const inStore = this.$store.getters['currentStore']();
package/list/workload.vue CHANGED
@@ -159,6 +159,10 @@ export default {
159
159
  }
160
160
  },
161
161
 
162
+ typeDisplay() {
163
+ // Used by shell/components/ResourceList/index.vue to override list title (usually found via schema, which doesn't exist for this virtual type)
164
+ return this.$store.getters['type-map/labelFor'](this.schema || workloadSchema, 99);
165
+ },
162
166
  };
163
167
  </script>
164
168
 
package/mixins/chart.js CHANGED
@@ -182,9 +182,12 @@ export default {
182
182
  }
183
183
 
184
184
  if (this.existing && this.existing.upgradeAvailable === false) {
185
+ const manager = this.existing?.spec?.chart?.metadata?.annotations?.[CATALOG_ANNOTATIONS.MANAGED] || 'Rancher';
186
+
185
187
  warnings.unshift(this.t('catalog.install.warning.managed', {
186
188
  name: this.existing.name,
187
- version: this.chart ? this.query.versionName : null
189
+ version: this.chart ? this.query.versionName : null,
190
+ manager: manager === 'true' ? 'Rancher' : manager
188
191
  }, true));
189
192
  }
190
193
 
@@ -41,7 +41,9 @@ export default class CatalogApp extends SteveModel {
41
41
 
42
42
  get warnDeletionMessage() {
43
43
  if (this.upgradeAvailable === false) {
44
- return this.t('catalog.delete.warning.managed', { name: this.name });
44
+ const manager = this.spec?.chart?.metadata?.annotations?.[CATALOG_ANNOTATIONS.MANAGED] || 'Rancher';
45
+
46
+ return this.t('catalog.delete.warning.managed', { manager: manager === 'true' ? 'Rancher' : manager, name: this.name });
45
47
  }
46
48
 
47
49
  return null;