@rancher/shell 0.5.2 → 1.2.0
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/.DS_Store +0 -0
- package/assets/images/providers/aks-black.svg +28 -0
- package/assets/images/providers/aks.svg +31 -0
- package/assets/styles/global/_labeled-input.scss +1 -0
- package/assets/styles/global/_layout.scss +0 -99
- package/assets/translations/en-us.yaml +77 -71
- package/assets/translations/zh-hans.yaml +25 -23
- package/babel.config.js +1 -7
- package/chart/gatekeeper.vue +11 -2
- package/chart/istio.vue +10 -1
- package/chart/logging/index.vue +11 -2
- package/chart/monitoring/alerting/index.vue +21 -7
- package/chart/monitoring/grafana/index.vue +2 -57
- package/chart/monitoring/index.vue +26 -52
- package/chart/monitoring/prometheus/index.vue +43 -37
- package/chart/rancher-backup/index.vue +10 -3
- package/cloud-credential/azure.vue +17 -4
- package/components/AsyncButton.vue +0 -9
- package/components/Carousel.vue +0 -1
- package/components/ChartPsp.vue +76 -0
- package/components/CodeMirror.vue +21 -19
- package/components/CopyCode.vue +2 -6
- package/components/CopyToClipboard.vue +1 -2
- package/components/CopyToClipboardText.vue +9 -14
- package/components/CruResource.vue +0 -1
- package/components/EtcdInfoBanner.vue +5 -5
- package/components/ExplorerProjectsNamespaces.vue +1 -25
- package/components/IconOrSvg.vue +1 -1
- package/components/Markdown.vue +12 -16
- package/components/Questions/index.vue +1 -1
- package/components/ResourceDetail/Masthead.vue +9 -25
- package/components/ResourceList/Masthead.vue +18 -1
- package/components/ResourceTable.vue +2 -14
- package/components/ResourceYaml.vue +0 -5
- package/components/SideNav.vue +1 -1
- package/components/SortableTable/THead.vue +9 -7
- package/components/SortableTable/index.vue +3 -2
- package/components/StatusTable.vue +1 -5
- package/components/TabTitle.vue +84 -0
- package/components/Tabbed/index.vue +0 -12
- package/components/__tests__/ChartPsp.test.ts +75 -0
- package/components/__tests__/CopyCode.test.ts +4 -5
- package/components/fleet/FleetBundles.vue +11 -5
- package/components/fleet/FleetRepos.vue +27 -62
- package/components/fleet/FleetResources.vue +1 -6
- package/components/fleet/FleetStatus.vue +3 -3
- package/components/fleet/FleetSummary.vue +30 -35
- package/components/form/ArrayList.vue +8 -1
- package/components/form/ArrayListSelect.vue +9 -9
- package/components/form/KeyValue.vue +0 -1
- package/components/form/LabeledSelect.vue +0 -4
- package/components/form/Password.vue +1 -3
- package/components/form/Select.vue +1 -1
- package/components/form/SelectOrCreateAuthSecret.vue +4 -4
- package/components/form/__tests__/KeyValue.test.ts +1 -1
- package/components/formatter/Checked.vue +3 -11
- package/components/formatter/ClusterProvider.vue +18 -1
- package/components/formatter/FleetSummaryGraph.vue +11 -23
- package/components/formatter/LiveDate.vue +16 -0
- package/components/formatter/LiveDuration.vue +1 -1
- package/components/formatter/PercentageBar.vue +1 -1
- package/components/formatter/__tests__/ClusterProvider.test.ts +28 -0
- package/components/nav/Group.vue +2 -2
- package/components/nav/Header.vue +2 -1
- package/components/nav/TopLevelMenu.vue +3 -29
- package/components/nav/Type.vue +3 -1
- package/components/nav/WindowManager/ContainerLogs.vue +19 -120
- package/components/nav/WindowManager/ContainerShell.vue +1 -6
- package/components/nav/WindowManager/index.vue +10 -11
- package/components/nav/__tests__/TopLevelMenu.test.ts +0 -33
- package/components/nav/__tests__/Type.test.ts +1 -1
- package/components/nuxt/nuxt-child.js +78 -14
- package/components/nuxt/nuxt.js +1 -1
- package/components/user.retention/user-retention-header.vue +34 -0
- package/composables/useI18n.ts +26 -0
- package/composables/useStore.ts +16 -0
- package/config/harvester-manager-types.js +0 -2
- package/config/home-links.js +32 -2
- package/config/private-label.js +0 -22
- package/config/product/explorer.js +4 -4
- package/config/product/fleet.js +1 -6
- package/config/product/legacy.js +1 -84
- package/config/product/manager.js +15 -8
- package/config/query-params.js +0 -1
- package/config/router.js +368 -385
- package/config/settings.ts +9 -2
- package/config/store.js +1 -1
- package/config/system-namespaces.js +0 -3
- package/config/table-headers.js +27 -47
- package/config/types.js +5 -0
- package/config/uiplugins.js +1 -1
- package/core/plugin-helpers.js +5 -3
- package/core/plugin-routes.ts +114 -56
- package/core/plugin.ts +10 -16
- package/core/plugins-loader.js +9 -7
- package/core/plugins.js +3 -0
- package/core/types-provisioning.ts +0 -7
- package/creators/app/init +0 -19
- package/detail/fleet.cattle.io.cluster.vue +1 -11
- package/detail/node.vue +0 -42
- package/detail/pod.vue +1 -68
- package/detail/provisioning.cattle.io.cluster.vue +4 -6
- package/detail/workload/index.vue +1 -15
- package/dialog/ScaleMachineDownDialog.vue +17 -34
- package/edit/auth/googleoauth.vue +5 -1
- package/edit/catalog.cattle.io.clusterrepo.vue +7 -20
- package/edit/cloudcredential.vue +0 -2
- package/edit/fleet.cattle.io.gitrepo.vue +4 -3
- package/edit/management.cattle.io.project.vue +52 -1
- package/edit/management.cattle.io.setting.vue +2 -31
- package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +3 -12
- package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +1 -2
- package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.spec.ts +1 -1
- package/edit/provisioning.cattle.io.cluster/{tabs/Basics.vue → Basics.vue} +126 -109
- package/edit/provisioning.cattle.io.cluster/{tabs/MachinePool.vue → MachinePool.vue} +7 -1
- package/edit/provisioning.cattle.io.cluster/{tabs/registries/RegistryConfigs.vue → RegistryConfigs.vue} +3 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +7 -15
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +237 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/{CustomCommand.test.ts → CustomCommand.tests.ts} +0 -6
- package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +1 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +1 -7
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/index.vue +37 -99
- package/edit/provisioning.cattle.io.cluster/rke2.vue +690 -181
- package/edit/service.vue +0 -12
- package/edit/workload/Upgrading.vue +2 -3
- package/edit/workload/index.vue +1 -2
- package/edit/workload/mixins/workload.js +1 -1
- package/initialize/App.js +71 -25
- package/initialize/client.js +162 -21
- package/initialize/index.js +124 -47
- package/initialize/layouts.ts +26 -0
- package/{components/templates → layouts}/blank.vue +1 -1
- package/{components/templates → layouts}/default.vue +98 -8
- package/{components/templates → layouts}/error.vue +19 -10
- package/{components/templates → layouts}/home.vue +1 -4
- package/{components/templates → layouts}/plain.vue +1 -4
- package/{components/templates → layouts}/standalone.vue +1 -1
- package/{components/templates → layouts}/unauthenticated.vue +1 -1
- package/list/management.cattle.io.feature.vue +7 -1
- package/list/management.cattle.io.user.vue +25 -1
- package/list/node.vue +0 -1
- package/machine-config/__tests__/vmwarevsphere.test.ts +161 -56
- package/machine-config/amazonec2.vue +1 -0
- package/machine-config/azure.vue +37 -21
- package/machine-config/vmwarevsphere.vue +47 -42
- package/middleware/authenticated.js +19 -14
- package/mixins/auth-config.js +7 -2
- package/mixins/brand.js +41 -29
- package/mixins/fetch.server.js +73 -0
- package/mixins/labeled-form-element.ts +1 -6
- package/models/__tests__/management.cattle.io.node.ts +0 -85
- package/models/__tests__/namespace.test.ts +9 -49
- package/models/cluster/node.js +4 -4
- package/models/cluster.x-k8s.io.machine.js +1 -1
- package/models/cluster.x-k8s.io.machinedeployment.js +0 -14
- package/models/fleet.cattle.io.cluster.js +0 -4
- package/models/fleet.cattle.io.gitrepo.js +13 -56
- package/models/management.cattle.io.cluster.js +3 -11
- package/models/management.cattle.io.kontainerdriver.js +0 -1
- package/models/management.cattle.io.node.js +14 -18
- package/models/management.cattle.io.nodepool.js +0 -17
- package/models/management.cattle.io.project.js +36 -0
- package/models/management.cattle.io.setting.js +7 -11
- package/models/management.cattle.io.user.js +65 -0
- package/models/namespace.js +1 -1
- package/models/pod.js +0 -20
- package/models/provisioning.cattle.io.cluster.js +8 -55
- package/models/secret.js +18 -117
- package/models/workload.js +0 -16
- package/models/workload.service.js +0 -18
- package/package.json +10 -12
- package/pages/about.vue +1 -0
- package/pages/account/create-key.vue +1 -0
- package/pages/account/index.vue +1 -0
- package/pages/auth/login.vue +1 -0
- package/pages/auth/logout.vue +2 -0
- package/pages/auth/setup.vue +4 -37
- package/pages/auth/verify.vue +8 -14
- package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +17 -2
- package/pages/c/_cluster/apps/charts/index.vue +58 -64
- package/pages/c/_cluster/apps/charts/install.helpers.js +13 -2
- package/pages/c/_cluster/apps/charts/install.vue +5 -5
- package/pages/c/_cluster/apps/index.vue +2 -0
- package/pages/c/_cluster/auth/index.vue +2 -0
- package/pages/c/_cluster/auth/user.retention/index.vue +384 -0
- package/pages/c/_cluster/ecm/index.vue +2 -0
- package/pages/c/_cluster/explorer/index.vue +53 -56
- package/pages/c/_cluster/explorer/tools/index.vue +3 -171
- package/pages/c/_cluster/fleet/index.vue +1 -1
- package/pages/c/_cluster/index.vue +2 -0
- package/pages/c/_cluster/manager/pages/_page.vue +5 -4
- package/pages/c/_cluster/monitoring/index.vue +1 -17
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +1 -0
- package/pages/c/_cluster/settings/banners.vue +2 -0
- package/pages/c/_cluster/settings/brand.vue +2 -0
- package/pages/c/_cluster/settings/index.vue +2 -0
- package/pages/c/_cluster/settings/links.vue +3 -2
- package/pages/c/_cluster/settings/performance.vue +1 -0
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +4 -4
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +1 -2
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +46 -10
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +5 -2
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +96 -0
- package/pages/c/_cluster/uiplugins/__tests__/SetupUIPlugins.test.ts +128 -0
- package/pages/c/_cluster/uiplugins/index.vue +2 -0
- package/pages/c/index.vue +9 -0
- package/pages/diagnostic.vue +2 -1
- package/pages/fail-whale.vue +1 -0
- package/pages/prefs.vue +1 -0
- package/pages/rio/mesh.vue +508 -0
- package/pages/support/index.vue +8 -2
- package/pkg/auto-import.js +1 -1
- package/plugins/axios.js +36 -0
- package/plugins/back-button.js +5 -3
- package/plugins/clean-html-directive.js +19 -1
- package/plugins/clean-tooltip-directive.js +1 -1
- package/plugins/codemirror-loader.js +1 -1
- package/plugins/codemirror.js +0 -41
- package/plugins/dashboard-store/__tests__/actions.spec.ts +250 -0
- package/plugins/dashboard-store/__tests__/{mutations.test.ts → mutations.spec.ts} +1 -1
- package/plugins/dashboard-store/actions.js +21 -22
- package/plugins/dashboard-store/classify.js +18 -1
- package/plugins/dashboard-store/getters.js +5 -10
- package/plugins/dashboard-store/index.js +12 -0
- package/plugins/dashboard-store/mutations.js +4 -0
- package/plugins/dashboard-store/resource-class.js +18 -59
- package/plugins/i18n.js +1 -1
- package/plugins/steve/__tests__/getters.spec.ts +56 -24
- package/plugins/steve/__tests__/subscribe.spec.ts +106 -0
- package/plugins/steve/getters.js +30 -7
- package/plugins/steve/mutations.js +5 -2
- package/plugins/steve/norman-class.js +0 -19
- package/plugins/steve/steve-class.js +0 -22
- package/plugins/steve/subscribe.js +34 -13
- package/plugins/transitions.js +4 -0
- package/plugins/vue-clipboard2.js +4 -0
- package/rancher-components/Accordion/Accordion.vue +3 -2
- package/rancher-components/BadgeState/BadgeState.vue +3 -3
- package/rancher-components/Banner/Banner.test.ts +1 -5
- package/rancher-components/Banner/Banner.vue +2 -2
- package/rancher-components/Card/Card.vue +4 -4
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -3
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +1 -1
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +55 -24
- package/rancher-components/Form/Radio/RadioButton.test.ts +1 -3
- package/rancher-components/Form/Radio/RadioButton.vue +13 -7
- package/rancher-components/Form/Radio/RadioGroup.vue +4 -3
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +7 -5
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +7 -4
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +9 -4
- package/rancher-components/StringList/StringList.vue +8 -8
- package/rancher-components/components/Accordion/Accordion.vue +3 -2
- package/rancher-components/components/BadgeState/BadgeState.test.ts +12 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +2 -19
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +14 -11
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +1 -1
- package/rancher-components/components/StringList/StringList.test.ts +0 -270
- package/rancher-components/components/StringList/StringList.vue +18 -57
- package/scripts/extension/bundle +7 -19
- package/scripts/extension/helm/scripts/package +3 -11
- package/scripts/extension/parse-tag-name +4 -4
- package/scripts/extension/publish +9 -20
- package/scripts/publish-shell.sh +1 -11
- package/scripts/test-plugins-build.sh +9 -85
- package/store/catalog.js +1 -1
- package/store/features.js +0 -1
- package/store/i18n.js +0 -11
- package/store/index.js +11 -8
- package/store/prefs.js +38 -33
- package/store/type-map.js +8 -13
- package/tsconfig.default.json +46 -0
- package/tsconfig.json +9 -35
- package/types/shell/index.d.ts +404 -463
- package/utils/__tests__/create-yaml.test.ts +10 -0
- package/utils/axios.js +19 -0
- package/utils/create-yaml.js +6 -6
- package/utils/custom-validators.js +2 -0
- package/utils/error.js +1 -16
- package/utils/monitoring.js +2 -37
- package/utils/nuxt.js +39 -18
- package/utils/object.js +0 -14
- package/utils/router.scrollBehavior.js +14 -12
- package/utils/socket.js +1 -0
- package/utils/time.js +1 -1
- package/utils/title.ts +3 -0
- package/utils/url.ts +1 -1
- package/utils/validators/formRules/__tests__/index.test.ts +4 -49
- package/utils/validators/formRules/index.ts +9 -12
- package/utils/validators/setting.js +10 -6
- package/vue.config.js +3 -24
- package/chart/monitoring/steps/uninstall-v1.vue +0 -135
- package/components/Certificates.vue +0 -164
- package/components/fleet/__tests__/FleetSummary.test.ts +0 -316
- package/components/formatter/FleetClusterSummaryGraph.vue +0 -27
- package/components/formatter/__tests__/Checked.test.ts +0 -19
- package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +0 -186
- package/composables/useCompactInput.ts +0 -20
- package/composables/useLabeledFormElement.ts +0 -138
- package/creators/app/files/.gitlab-ci.yml +0 -14
- package/edit/__tests__/service.test.ts +0 -89
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +0 -112
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +0 -473
- package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +0 -73
- package/edit/provisioning.cattle.io.cluster/__tests__/utils/cluster.ts +0 -386
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +0 -137
- package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +0 -157
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +0 -135
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +0 -189
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +0 -144
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +0 -76
- package/mixins/v1-workload-metrics.js +0 -43
- package/models/__tests__/management.cattle.io.cluster.test.ts +0 -23
- package/models/__tests__/management.cattle.io.nodepool.ts +0 -83
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +0 -90
- package/models/__tests__/workload.test.ts +0 -91
- package/plugins/clean-html.js +0 -53
- package/plugins/dashboard-store/__tests__/actions.test.ts +0 -165
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +0 -49
- package/plugins/dashboard-store/__tests__/utils/store-mocks.ts +0 -7
- package/plugins/index.js +0 -11
- package/plugins/steve/__tests__/steve-class.spec.ts +0 -59
- package/plugins/steve/__tests__/utils/steve-mocks.ts +0 -31
- package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +0 -50
- package/server/har-file.js +0 -183
- package/tsconfig.paths.json +0 -18
- package/utils/azure.js +0 -24
- package/utils/clipboard.js +0 -5
- /package/components/form/__tests__/{NameNsDescription.test.ts → NameNsDescription.ts} +0 -0
- /package/edit/networking.k8s.io.networkpolicy/__tests__/utils/{selectors.test.ts → selectors.ts} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/networking/ACE.vue → ACE.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/AgentConfiguration.vue → AgentConfiguration.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/upgrade/DrainOptions.vue → DrainOptions.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/MemberRoles.vue → MemberRoles.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/registries/RegistryMirrors.vue → RegistryMirrors.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/etcd/S3Config.vue → S3Config.vue} +0 -0
- /package/plugins/dashboard-store/__tests__/{getters.test.ts → getters.spec.ts} +0 -0
- /package/rancher-components/BadgeState/{BadgeState.spec.ts → BadgeState.test.ts} +0 -0
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import CruResource from '@shell/components/CruResource';
|
|
3
3
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
4
4
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
5
|
-
import { Banner } from '@components/Banner';
|
|
6
5
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
7
6
|
import { TextAreaAutoGrow } from '@components/Form/TextArea';
|
|
8
7
|
import formRulesGenerator from '@shell/utils/validators/formRules/index';
|
|
@@ -12,7 +11,6 @@ import { RadioGroup } from '@components/Form/Radio';
|
|
|
12
11
|
import FormValidation from '@shell/mixins/form-validation';
|
|
13
12
|
import { setBrand } from '@shell/config/private-label';
|
|
14
13
|
import { keyBy, mapValues } from 'lodash';
|
|
15
|
-
import { isLocalhost, isServerUrl } from '@shell/utils/validators/setting';
|
|
16
14
|
|
|
17
15
|
export default {
|
|
18
16
|
components: {
|
|
@@ -20,8 +18,7 @@ export default {
|
|
|
20
18
|
LabeledInput,
|
|
21
19
|
LabeledSelect,
|
|
22
20
|
RadioGroup,
|
|
23
|
-
TextAreaAutoGrow
|
|
24
|
-
Banner
|
|
21
|
+
TextAreaAutoGrow
|
|
25
22
|
},
|
|
26
23
|
|
|
27
24
|
mixins: [CreateEditView, FormValidation],
|
|
@@ -66,14 +63,6 @@ export default {
|
|
|
66
63
|
|
|
67
64
|
return factoryArg ? rule(factoryArg) : rule;
|
|
68
65
|
}) : {};
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
showLocalhostWarning() {
|
|
72
|
-
return isServerUrl(this.value.id) && isLocalhost(this.value.value);
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
validationPassed() {
|
|
76
|
-
return this.fvFormIsValid && this.fvGetPathErrors(['value']).length === 0;
|
|
77
66
|
}
|
|
78
67
|
},
|
|
79
68
|
|
|
@@ -109,11 +98,6 @@ export default {
|
|
|
109
98
|
if (ev && ev.srcElement) {
|
|
110
99
|
ev.srcElement.blur();
|
|
111
100
|
}
|
|
112
|
-
|
|
113
|
-
if (isServerUrl(this.value.id) && !this.value.default) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
101
|
this.value.value = this.value.default;
|
|
118
102
|
}
|
|
119
103
|
}
|
|
@@ -129,7 +113,7 @@ export default {
|
|
|
129
113
|
:resource="value"
|
|
130
114
|
:subtypes="[]"
|
|
131
115
|
:can-yaml="false"
|
|
132
|
-
:validation-passed="
|
|
116
|
+
:validation-passed="fvFormIsValid"
|
|
133
117
|
@error="e=>errors = e"
|
|
134
118
|
@finish="saveSettings"
|
|
135
119
|
@cancel="done"
|
|
@@ -154,19 +138,6 @@ export default {
|
|
|
154
138
|
</button>
|
|
155
139
|
</div>
|
|
156
140
|
|
|
157
|
-
<Banner
|
|
158
|
-
v-if="showLocalhostWarning"
|
|
159
|
-
color="warning"
|
|
160
|
-
:label="t('validation.setting.serverUrl.localhost')"
|
|
161
|
-
/>
|
|
162
|
-
|
|
163
|
-
<Banner
|
|
164
|
-
v-for="(err, i) in fvGetPathErrors(['value'])"
|
|
165
|
-
:key="i"
|
|
166
|
-
color="error"
|
|
167
|
-
:label="err"
|
|
168
|
-
/>
|
|
169
|
-
|
|
170
141
|
<div class="mt-20">
|
|
171
142
|
<div v-if="setting.kind === 'enum'">
|
|
172
143
|
<LabeledSelect
|
|
@@ -47,18 +47,9 @@ export default {
|
|
|
47
47
|
selectedSeverityLabel: null,
|
|
48
48
|
ignoredAnnotations: IGNORED_ANNOTATIONS,
|
|
49
49
|
severityOptions: [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: this.t('prometheusRule.alertingRules.labels.severity.choices.warning'),
|
|
56
|
-
value: 'warning'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
label: this.t('prometheusRule.alertingRules.labels.severity.choices.none'),
|
|
60
|
-
value: 'none'
|
|
61
|
-
},
|
|
50
|
+
this.t('prometheusRule.alertingRules.labels.severity.choices.critical'),
|
|
51
|
+
this.t('prometheusRule.alertingRules.labels.severity.choices.warning'),
|
|
52
|
+
this.t('prometheusRule.alertingRules.labels.severity.choices.none'),
|
|
62
53
|
],
|
|
63
54
|
};
|
|
64
55
|
},
|
|
@@ -6,7 +6,6 @@ import { _VIEW } from '@shell/config/query-params';
|
|
|
6
6
|
import ArrayListGrouped from '@shell/components/form/ArrayListGrouped';
|
|
7
7
|
import AlertingRule from './AlertingRule';
|
|
8
8
|
import RecordingRule from './RecordingRule';
|
|
9
|
-
import { clone } from '@shell/utils/object';
|
|
10
9
|
|
|
11
10
|
export default {
|
|
12
11
|
components: {
|
|
@@ -106,7 +105,7 @@ export default {
|
|
|
106
105
|
});
|
|
107
106
|
break;
|
|
108
107
|
case 'alert':
|
|
109
|
-
value.push(
|
|
108
|
+
value.push(this.defaultAlert);
|
|
110
109
|
break;
|
|
111
110
|
default:
|
|
112
111
|
break;
|
|
@@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils';
|
|
|
2
2
|
import PolicyRuleTarget from '@shell/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget';
|
|
3
3
|
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
|
|
4
4
|
import mock from '@shell/edit/networking.k8s.io.networkpolicy/__tests__/utils/mock.json';
|
|
5
|
-
import { PolicyRuleTargetSelectors } from '@shell/edit/networking.k8s.io.networkpolicy/__tests__/utils/selectors
|
|
5
|
+
import { PolicyRuleTargetSelectors } from '@shell/edit/networking.k8s.io.networkpolicy/__tests__/utils/selectors';
|
|
6
6
|
|
|
7
7
|
describe.each([
|
|
8
8
|
'view',
|
|
@@ -11,7 +11,6 @@ import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
|
11
11
|
import YamlEditor from '@shell/components/YamlEditor';
|
|
12
12
|
import { LEGACY } from '@shell/store/features';
|
|
13
13
|
import semver from 'semver';
|
|
14
|
-
import { _EDIT } from '@shell/config/query-params';
|
|
15
14
|
|
|
16
15
|
const HARVESTER = 'harvester';
|
|
17
16
|
|
|
@@ -41,6 +40,12 @@ export default {
|
|
|
41
40
|
required: true,
|
|
42
41
|
},
|
|
43
42
|
|
|
43
|
+
psps: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: null,
|
|
46
|
+
required: false
|
|
47
|
+
},
|
|
48
|
+
|
|
44
49
|
credential: {
|
|
45
50
|
type: Object,
|
|
46
51
|
default: null,
|
|
@@ -56,6 +61,15 @@ export default {
|
|
|
56
61
|
required: true
|
|
57
62
|
},
|
|
58
63
|
|
|
64
|
+
cisPsaChangeBanner: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
required: true
|
|
67
|
+
},
|
|
68
|
+
allPsps: {
|
|
69
|
+
type: Array,
|
|
70
|
+
required: false,
|
|
71
|
+
default: null
|
|
72
|
+
},
|
|
59
73
|
allPsas: {
|
|
60
74
|
type: Array,
|
|
61
75
|
required: true
|
|
@@ -66,7 +80,10 @@ export default {
|
|
|
66
80
|
required: false,
|
|
67
81
|
default: null
|
|
68
82
|
},
|
|
69
|
-
|
|
83
|
+
needsPsp: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
required: true
|
|
86
|
+
},
|
|
70
87
|
selectedVersion: {
|
|
71
88
|
type: Object,
|
|
72
89
|
required: true
|
|
@@ -87,44 +104,51 @@ export default {
|
|
|
87
104
|
type: Boolean,
|
|
88
105
|
required: true
|
|
89
106
|
},
|
|
107
|
+
clusterIsAlreadyCreated: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
required: true
|
|
110
|
+
},
|
|
90
111
|
isElementalCluster: {
|
|
91
112
|
type: Boolean,
|
|
92
113
|
required: true
|
|
93
114
|
},
|
|
94
|
-
|
|
115
|
+
hasPsaTemplates: {
|
|
95
116
|
type: Boolean,
|
|
96
117
|
required: true
|
|
97
118
|
},
|
|
98
|
-
|
|
119
|
+
isK3s: {
|
|
99
120
|
type: Boolean,
|
|
100
121
|
required: true
|
|
101
122
|
},
|
|
102
|
-
|
|
123
|
+
haveArgInfo: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
required: true
|
|
126
|
+
},
|
|
127
|
+
showCni: {
|
|
103
128
|
type: Boolean,
|
|
104
129
|
required: true
|
|
105
130
|
},
|
|
106
|
-
|
|
131
|
+
showCloudProvider: {
|
|
107
132
|
type: Boolean,
|
|
108
133
|
required: true
|
|
109
134
|
},
|
|
110
135
|
cloudProviderOptions: {
|
|
111
136
|
type: Array,
|
|
112
137
|
required: true
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
watch: {
|
|
117
|
-
selectedVersion(neu, old) {
|
|
118
|
-
if (neu?.value !== old?.value && this.ciliumIpv6) {
|
|
119
|
-
// Re-assign so that the setter updates the structure for the new k8s version if needed
|
|
120
|
-
this.ciliumIpv6 = !!this.ciliumIpv6;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
138
|
+
},
|
|
123
139
|
},
|
|
124
140
|
|
|
125
141
|
computed: {
|
|
126
142
|
...mapGetters({ features: 'features/get' }),
|
|
127
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Check presence of PSPs as template or CLI creation
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
hasPsps() {
|
|
149
|
+
return !!this.psps?.count;
|
|
150
|
+
},
|
|
151
|
+
|
|
128
152
|
serverConfig() {
|
|
129
153
|
return this.value.spec.rkeConfig.machineGlobalConfig;
|
|
130
154
|
},
|
|
@@ -133,6 +157,17 @@ export default {
|
|
|
133
157
|
return this.value.agentConfig;
|
|
134
158
|
},
|
|
135
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Define introduction of PSA and return need of PSA templates based on min k8s version
|
|
162
|
+
*/
|
|
163
|
+
needsPSA() {
|
|
164
|
+
const release = this.value?.spec?.kubernetesVersion || '';
|
|
165
|
+
const version = release.match(/\d+/g);
|
|
166
|
+
const isRequiredVersion = version?.length ? +version[0] > 1 || +version[1] >= 23 : false;
|
|
167
|
+
|
|
168
|
+
return isRequiredVersion;
|
|
169
|
+
},
|
|
170
|
+
|
|
136
171
|
profileOptions() {
|
|
137
172
|
const out = (this.agentArgs?.profile?.options || []).map((x) => {
|
|
138
173
|
return { label: x, value: x };
|
|
@@ -150,9 +185,35 @@ export default {
|
|
|
150
185
|
* Allow to display override if PSA is needed and profile is set
|
|
151
186
|
*/
|
|
152
187
|
hasCisOverride() {
|
|
153
|
-
return (this.serverConfig?.profile || this.agentConfig?.profile) &&
|
|
188
|
+
return (this.serverConfig?.profile || this.agentConfig?.profile) && this.needsPSA &&
|
|
154
189
|
// Also check other cases on when to display the override
|
|
155
|
-
this.showCisProfile && this.isCisSupported;
|
|
190
|
+
this.hasPsaTemplates && this.showCisProfile && this.isCisSupported;
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
pspOptions() {
|
|
194
|
+
if ( this.isK3s ) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
const out = [{
|
|
198
|
+
label: this.$store.getters['i18n/t']('cluster.rke2.defaultPodSecurityPolicyTemplateName.option'),
|
|
199
|
+
value: ''
|
|
200
|
+
}];
|
|
201
|
+
|
|
202
|
+
if ( this.allPsps ) {
|
|
203
|
+
for ( const pspt of this.allPsps ) {
|
|
204
|
+
out.push({
|
|
205
|
+
label: pspt.nameDisplay,
|
|
206
|
+
value: pspt.id,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const cur = this.value.spec.defaultPodSecurityPolicyTemplateName;
|
|
211
|
+
|
|
212
|
+
if ( cur && !out.find((x) => x.value === cur) ) {
|
|
213
|
+
out.unshift({ label: `${ cur } (Current)`, value: cur });
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return out;
|
|
156
217
|
},
|
|
157
218
|
|
|
158
219
|
/**
|
|
@@ -161,14 +222,14 @@ export default {
|
|
|
161
222
|
isPsaDisabled() {
|
|
162
223
|
const cisValue = this.agentConfig?.profile || this.serverConfig?.profile;
|
|
163
224
|
|
|
164
|
-
return !(!cisValue || this.cisOverride) && this.isCisSupported;
|
|
225
|
+
return !(!cisValue || this.cisOverride) && this.hasPsaTemplates && this.isCisSupported;
|
|
165
226
|
},
|
|
166
227
|
|
|
167
228
|
/**
|
|
168
229
|
* Get the default label for the PSA template option
|
|
169
230
|
*/
|
|
170
231
|
defaultPsaOptionLabel() {
|
|
171
|
-
const optionCase = !this.
|
|
232
|
+
const optionCase = !this.needsPsp && !this.isK3s ? 'default' : 'none';
|
|
172
233
|
|
|
173
234
|
return this.$store.getters['i18n/t'](`cluster.rke2.defaultPodSecurityAdmissionConfigurationTemplateName.option.${ optionCase }`);
|
|
174
235
|
},
|
|
@@ -177,6 +238,9 @@ export default {
|
|
|
177
238
|
* Convert PSA templates into options, sorting and flagging if any selected
|
|
178
239
|
*/
|
|
179
240
|
psaOptions() {
|
|
241
|
+
if ( !this.needsPSA ) {
|
|
242
|
+
return [];
|
|
243
|
+
}
|
|
180
244
|
const out = [{
|
|
181
245
|
label: this.defaultPsaOptionLabel,
|
|
182
246
|
value: ''
|
|
@@ -211,7 +275,7 @@ export default {
|
|
|
211
275
|
disableOptions() {
|
|
212
276
|
return (this.serverArgs.disable.options || []).map((value) => {
|
|
213
277
|
return {
|
|
214
|
-
label: this.$store.getters['i18n/withFallback'](`cluster.${ this.
|
|
278
|
+
label: this.$store.getters['i18n/withFallback'](`cluster.${ this.isK3s ? 'k3s' : 'rke2' }.systemService."${ value }"`, null, value.replace(/^(rke2|rancher)-/, '')),
|
|
215
279
|
value,
|
|
216
280
|
};
|
|
217
281
|
});
|
|
@@ -257,7 +321,7 @@ export default {
|
|
|
257
321
|
return false;
|
|
258
322
|
}
|
|
259
323
|
|
|
260
|
-
const name = this.agentConfig
|
|
324
|
+
const name = this.agentConfig['cloud-provider-name'];
|
|
261
325
|
|
|
262
326
|
if ( !name ) {
|
|
263
327
|
return false;
|
|
@@ -277,7 +341,7 @@ export default {
|
|
|
277
341
|
return false;
|
|
278
342
|
}
|
|
279
343
|
|
|
280
|
-
const name = this.agentConfig
|
|
344
|
+
const name = this.agentConfig['cloud-provider-name'];
|
|
281
345
|
|
|
282
346
|
return name === 'rancher-vsphere';
|
|
283
347
|
},
|
|
@@ -298,78 +362,15 @@ export default {
|
|
|
298
362
|
// eslint-disable-next-line no-unused-vars
|
|
299
363
|
const cni = this.serverConfig.cni; // force this property to recalculate if cni was changed away from cilium and chartValues['rke-cilium'] deleted
|
|
300
364
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
return chart?.cilium?.ipv6?.enabled || chart?.ipv6?.enabled || false;
|
|
365
|
+
return this.userChartValues[this.chartVersionKey('rke2-cilium')]?.cilium?.ipv6?.enabled || false;
|
|
304
366
|
},
|
|
305
|
-
set(
|
|
306
|
-
|
|
307
|
-
const values = this.userChartValues[name];
|
|
308
|
-
|
|
309
|
-
// RKE2 older than 1.23.5 uses different Helm chart values structure - need to take that into account
|
|
310
|
-
const version = this.selectedVersion.value;
|
|
311
|
-
let ciliumValues = {};
|
|
312
|
-
|
|
313
|
-
if (semver.gt(version, '1.23.5')) {
|
|
314
|
-
// New style
|
|
315
|
-
ciliumValues = {
|
|
316
|
-
...values,
|
|
317
|
-
ipv6: {
|
|
318
|
-
...values?.ipv6,
|
|
319
|
-
enabled: neu
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
delete ciliumValues.cilium;
|
|
324
|
-
} else {
|
|
325
|
-
// Old style
|
|
326
|
-
ciliumValues = {
|
|
327
|
-
...values,
|
|
328
|
-
cilium: {
|
|
329
|
-
...values?.cilium,
|
|
330
|
-
ipv6: {
|
|
331
|
-
...values?.cilium?.ipv6,
|
|
332
|
-
enabled: neu
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
delete ciliumValues.ipv6;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
this.$emit('cilium-values-changed', ciliumValues);
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
|
|
344
|
-
ciliumBandwidthManager: {
|
|
345
|
-
get() {
|
|
346
|
-
// eslint-disable-next-line no-unused-vars
|
|
347
|
-
const cni = this.serverConfig.cni; // force this property to recalculate if cni was changed away from cilium and chartValues['rke-cilium'] deleted
|
|
348
|
-
|
|
349
|
-
return this.userChartValues[this.chartVersionKey('rke2-cilium')]?.bandwidthManager?.enabled || false;
|
|
350
|
-
},
|
|
351
|
-
set(neu) {
|
|
352
|
-
const name = this.chartVersionKey('rke2-cilium');
|
|
353
|
-
const values = this.userChartValues[name];
|
|
354
|
-
|
|
355
|
-
const ciliumValues = {
|
|
356
|
-
...values,
|
|
357
|
-
bandwidthManager: {
|
|
358
|
-
...values?.bandwidthManager,
|
|
359
|
-
enabled: neu
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
this.$emit('cilium-values-changed', ciliumValues);
|
|
367
|
+
set(val) {
|
|
368
|
+
this.$emit('cilium-ipv6-changed', val);
|
|
364
369
|
}
|
|
365
370
|
},
|
|
366
371
|
|
|
367
|
-
isEdit() {
|
|
368
|
-
return this.mode === _EDIT;
|
|
369
|
-
},
|
|
370
|
-
|
|
371
372
|
canNotEditCloudProvider() {
|
|
372
|
-
const canNotEdit = this.
|
|
373
|
+
const canNotEdit = this.clusterIsAlreadyCreated;
|
|
373
374
|
|
|
374
375
|
return canNotEdit;
|
|
375
376
|
},
|
|
@@ -378,7 +379,7 @@ export default {
|
|
|
378
379
|
* Display warning about additional configuration needed for cloud provider Amazon if kube >= 1.27
|
|
379
380
|
*/
|
|
380
381
|
showCloudProviderAmazonAdditionalConfigWarning() {
|
|
381
|
-
return !!semver.gte(this.value.spec.kubernetesVersion, 'v1.27.0') && this.agentConfig
|
|
382
|
+
return !!semver.gte(this.value.spec.kubernetesVersion, 'v1.27.0') && this.agentConfig['cloud-provider-name'] === 'aws';
|
|
382
383
|
}
|
|
383
384
|
},
|
|
384
385
|
|
|
@@ -427,6 +428,7 @@ export default {
|
|
|
427
428
|
v-model="value.spec.kubernetesVersion"
|
|
428
429
|
:mode="mode"
|
|
429
430
|
:options="versionOptions"
|
|
431
|
+
data-testid="clusterBasics__kubernetesVersions"
|
|
430
432
|
label-key="cluster.kubernetesVersion.label"
|
|
431
433
|
@input="$emit('kubernetes-changed', $event)"
|
|
432
434
|
/>
|
|
@@ -443,7 +445,6 @@ export default {
|
|
|
443
445
|
class="col span-6"
|
|
444
446
|
>
|
|
445
447
|
<LabeledSelect
|
|
446
|
-
v-if="agentConfig"
|
|
447
448
|
v-model="agentConfig['cloud-provider-name']"
|
|
448
449
|
:mode="mode"
|
|
449
450
|
:disabled="canNotEditCloudProvider"
|
|
@@ -460,9 +461,8 @@ export default {
|
|
|
460
461
|
<div class="col span-6">
|
|
461
462
|
<LabeledSelect
|
|
462
463
|
v-model="serverConfig.cni"
|
|
463
|
-
data-testid="cluster-rke2-cni-select"
|
|
464
464
|
:mode="mode"
|
|
465
|
-
:disabled="
|
|
465
|
+
:disabled="clusterIsAlreadyCreated"
|
|
466
466
|
:options="serverArgs.cni.options"
|
|
467
467
|
:label="t('cluster.rke2.cni.label')"
|
|
468
468
|
/>
|
|
@@ -473,16 +473,9 @@ export default {
|
|
|
473
473
|
>
|
|
474
474
|
<Checkbox
|
|
475
475
|
v-model="ciliumIpv6"
|
|
476
|
-
data-testid="cluster-rke2-cni-ipv6-checkbox"
|
|
477
476
|
:mode="mode"
|
|
478
477
|
:label="t('cluster.rke2.address.ipv6.enable')"
|
|
479
478
|
/>
|
|
480
|
-
<Checkbox
|
|
481
|
-
v-model="ciliumBandwidthManager"
|
|
482
|
-
data-testid="cluster-rke2-cni-cilium-bandwidth-manager-checkbox"
|
|
483
|
-
:mode="mode"
|
|
484
|
-
:label="t('cluster.rke2.cni.cilium.BandwidthManager.enable')"
|
|
485
|
-
/>
|
|
486
479
|
</div>
|
|
487
480
|
</div>
|
|
488
481
|
<template v-if="showVsphereNote">
|
|
@@ -495,17 +488,10 @@ export default {
|
|
|
495
488
|
<div class="spacer" />
|
|
496
489
|
|
|
497
490
|
<div class="col span-12">
|
|
498
|
-
<Banner
|
|
499
|
-
v-if="unsupportedCloudProvider"
|
|
500
|
-
class="error mt-5"
|
|
501
|
-
>
|
|
502
|
-
{{ t('cluster.rke2.cloudProvider.unsupported') }}
|
|
503
|
-
</Banner>
|
|
504
491
|
<h3>
|
|
505
492
|
{{ t('cluster.rke2.cloudProvider.header') }}
|
|
506
493
|
</h3>
|
|
507
494
|
<YamlEditor
|
|
508
|
-
v-if="agentConfig"
|
|
509
495
|
ref="yaml"
|
|
510
496
|
v-model="agentConfig['cloud-provider-config']"
|
|
511
497
|
:editor-mode="mode === 'view' ? 'VIEW_CODE' : 'EDIT_CODE'"
|
|
@@ -520,6 +506,21 @@ export default {
|
|
|
520
506
|
<h3>
|
|
521
507
|
{{ t('cluster.rke2.security.header') }}
|
|
522
508
|
</h3>
|
|
509
|
+
<Banner
|
|
510
|
+
v-if="isEdit && !needsPsp && hasPsps"
|
|
511
|
+
color="warning"
|
|
512
|
+
:label="t('cluster.banner.invalidPsps')"
|
|
513
|
+
/>
|
|
514
|
+
<Banner
|
|
515
|
+
v-else-if="isCreate && !needsPsp"
|
|
516
|
+
color="info"
|
|
517
|
+
:label="t('cluster.banner.removedPsp')"
|
|
518
|
+
/>
|
|
519
|
+
<Banner
|
|
520
|
+
v-else-if="isCreate && hasPsps"
|
|
521
|
+
color="info"
|
|
522
|
+
:label="t('cluster.banner.deprecatedPsp')"
|
|
523
|
+
/>
|
|
523
524
|
|
|
524
525
|
<Banner
|
|
525
526
|
v-if="showCisProfile && !isCisSupported && isEdit"
|
|
@@ -529,6 +530,21 @@ export default {
|
|
|
529
530
|
</Banner>
|
|
530
531
|
|
|
531
532
|
<div class="row mb-10">
|
|
533
|
+
<div
|
|
534
|
+
v-if="pspOptions && needsPsp"
|
|
535
|
+
class="col span-6"
|
|
536
|
+
>
|
|
537
|
+
<!-- PSP template selector -->
|
|
538
|
+
<LabeledSelect
|
|
539
|
+
v-model="value.spec.defaultPodSecurityPolicyTemplateName"
|
|
540
|
+
data-testid="rke2-custom-edit-psp"
|
|
541
|
+
:mode="mode"
|
|
542
|
+
:options="pspOptions"
|
|
543
|
+
:label="t('cluster.rke2.defaultPodSecurityPolicyTemplateName.label')"
|
|
544
|
+
@input="$emit('psp-changed', $event)"
|
|
545
|
+
/>
|
|
546
|
+
</div>
|
|
547
|
+
|
|
532
548
|
<div
|
|
533
549
|
v-if="showCisProfile"
|
|
534
550
|
class="col span-6"
|
|
@@ -567,13 +583,14 @@ export default {
|
|
|
567
583
|
:label="t('cluster.rke2.banner.cisOverride')"
|
|
568
584
|
/>
|
|
569
585
|
<Banner
|
|
570
|
-
v-if="!cisOverride"
|
|
586
|
+
v-if="cisPsaChangeBanner && !cisOverride"
|
|
571
587
|
color="info"
|
|
572
588
|
:label="t('cluster.rke2.banner.psaChange')"
|
|
573
589
|
/>
|
|
574
590
|
</template>
|
|
575
591
|
|
|
576
592
|
<div
|
|
593
|
+
v-if="needsPSA"
|
|
577
594
|
class="row mb-10 mt-10"
|
|
578
595
|
>
|
|
579
596
|
<div class="col span-6">
|
|
@@ -69,6 +69,12 @@ export default {
|
|
|
69
69
|
poolId: {
|
|
70
70
|
type: String,
|
|
71
71
|
required: true,
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
// this is a useful info when in edit mode you add a new pool, example of use in vmwarevsphere.vue
|
|
75
|
+
poolCreateMode: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
required: true,
|
|
72
78
|
}
|
|
73
79
|
},
|
|
74
80
|
|
|
@@ -269,6 +275,7 @@ export default {
|
|
|
269
275
|
:credential-id="credentialId"
|
|
270
276
|
:pool-index="idx"
|
|
271
277
|
:pool-id="poolId"
|
|
278
|
+
:pool-create-mode="value.create"
|
|
272
279
|
:machine-pools="machinePools"
|
|
273
280
|
:busy="busy"
|
|
274
281
|
@error="emitError"
|
|
@@ -335,7 +342,6 @@ export default {
|
|
|
335
342
|
v-model="value.pool.labels"
|
|
336
343
|
:add-label="t('labels.addLabel')"
|
|
337
344
|
:disabled="busy"
|
|
338
|
-
:mode="mode"
|
|
339
345
|
:title="t('cluster.machinePool.labels.label')"
|
|
340
346
|
:read-allowed="false"
|
|
341
347
|
:value-can-be-empty="true"
|
|
@@ -138,13 +138,14 @@ export default {
|
|
|
138
138
|
:mode="mode"
|
|
139
139
|
@input="update"
|
|
140
140
|
>
|
|
141
|
-
<template #default="{row}">
|
|
141
|
+
<template #default="{row, i}">
|
|
142
142
|
<div class="row">
|
|
143
143
|
<div class="col span-6">
|
|
144
144
|
<LabeledInput
|
|
145
145
|
v-model="row.value.hostname"
|
|
146
146
|
label="Registry Hostname"
|
|
147
147
|
:mode="mode"
|
|
148
|
+
:data-testid="`registry-auth-host-input-${i}`"
|
|
148
149
|
/>
|
|
149
150
|
|
|
150
151
|
<SelectOrCreateAuthSecret
|
|
@@ -158,6 +159,7 @@ export default {
|
|
|
158
159
|
:namespace="value.metadata.namespace"
|
|
159
160
|
:mode="mode"
|
|
160
161
|
generate-name="registryconfig-auth-"
|
|
162
|
+
:data-testid="`registry-auth-select-or-create-${i}`"
|
|
161
163
|
/>
|
|
162
164
|
</div>
|
|
163
165
|
<div class="col span-6">
|
|
@@ -31,10 +31,9 @@ export default {
|
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
cancel: {
|
|
34
|
-
type:
|
|
35
|
-
|
|
34
|
+
type: Function,
|
|
35
|
+
required: true,
|
|
36
36
|
},
|
|
37
|
-
|
|
38
37
|
showingForm: {
|
|
39
38
|
type: Boolean,
|
|
40
39
|
required: true,
|
|
@@ -103,18 +102,13 @@ export default {
|
|
|
103
102
|
},
|
|
104
103
|
|
|
105
104
|
options() {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
const out = this.filteredCredentials.map((obj) => {
|
|
106
|
+
return {
|
|
107
|
+
label: obj.nameDisplay,
|
|
108
|
+
value: obj.id,
|
|
109
|
+
};
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
const out = this.filteredCredentials.map((obj) => ({
|
|
113
|
-
// if credential name is duplicated we add the id to the label
|
|
114
|
-
label: duplicates[obj.nameDisplay] ? `${ obj.nameDisplay } (${ obj.id })` : obj.nameDisplay,
|
|
115
|
-
value: obj.id,
|
|
116
|
-
}));
|
|
117
|
-
|
|
118
112
|
if ( this.originalId && !out.find((x) => x.value === this.originalId) ) {
|
|
119
113
|
out.unshift({
|
|
120
114
|
label: `${ this.originalId.replace(/^cattle-global-data:/, '') } (current)`,
|
|
@@ -271,10 +265,8 @@ export default {
|
|
|
271
265
|
v-model="credentialId"
|
|
272
266
|
:label="t('cluster.credential.label')"
|
|
273
267
|
:options="options"
|
|
274
|
-
option-key="value"
|
|
275
268
|
:mode="mode"
|
|
276
269
|
:selectable="option => !option.disabled"
|
|
277
|
-
data-testid="cluster-prov-select-credential"
|
|
278
270
|
/>
|
|
279
271
|
</div>
|
|
280
272
|
|