@rancher/shell 0.5.3 → 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 +76 -74
- 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/ClusterIconMenu.vue +9 -24
- package/components/CodeMirror.vue +16 -75
- 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/FixedBanner.vue +0 -1
- 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/ResourceDetail/index.vue +4 -1
- package/components/ResourceList/Masthead.vue +18 -1
- package/components/ResourceTable.vue +2 -14
- package/components/ResourceYaml.vue +5 -34
- package/components/SideNav.vue +65 -43
- package/components/SortableTable/THead.vue +9 -7
- package/components/SortableTable/index.vue +2 -1
- package/components/StatusTable.vue +1 -5
- package/components/TabTitle.vue +84 -0
- package/components/Tabbed/index.vue +0 -12
- package/components/YamlEditor.vue +0 -1
- 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/BannerSettings.vue +0 -3
- package/components/form/FileSelector.vue +0 -1
- package/components/form/KeyValue.vue +0 -2
- 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/WorkloadDetailEndpoints.vue +22 -12
- package/components/formatter/__tests__/ClusterProvider.test.ts +28 -0
- package/components/nav/Group.vue +2 -2
- package/components/nav/Header.vue +2 -2
- package/components/nav/Jump.vue +9 -19
- package/components/nav/TopLevelMenu.vue +18 -66
- package/components/nav/Type.vue +7 -16
- 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 +1 -34
- package/components/nav/__tests__/Type.test.ts +1 -31
- 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.bundle.vue +1 -1
- 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 +8 -25
- 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 -32
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +2 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +1 -1
- 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} +125 -106
- package/edit/provisioning.cattle.io.cluster/{tabs/MachinePool.vue → MachinePool.vue} +7 -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 +40 -109
- package/edit/provisioning.cattle.io.cluster/rke2.vue +689 -152
- package/edit/service.vue +0 -12
- package/edit/token.vue +0 -1
- 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/catalog.cattle.io.app.vue +0 -1
- package/list/management.cattle.io.feature.vue +7 -1
- package/list/management.cattle.io.setting.vue +0 -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/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 +9 -91
- package/models/secret.js +18 -126
- package/models/storage.k8s.io.storageclass.js +1 -1
- 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 -1
- package/pages/c/_cluster/settings/banners.vue +2 -0
- package/pages/c/_cluster/settings/brand.vue +2 -3
- 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/CatalogList/CatalogLoadDialog.vue +1 -2
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +46 -10
- 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__/{mutations.test.ts → mutations.spec.ts} +1 -1
- package/plugins/dashboard-store/actions.js +17 -16
- package/plugins/dashboard-store/classify.js +18 -1
- package/plugins/dashboard-store/getters.js +7 -70
- package/plugins/dashboard-store/index.js +12 -0
- package/plugins/dashboard-store/mutations.js +4 -0
- package/plugins/dashboard-store/resource-class.js +20 -65
- package/plugins/i18n.js +1 -1
- package/plugins/steve/__tests__/getters.spec.ts +48 -26
- package/plugins/steve/__tests__/subscribe.spec.ts +106 -0
- package/plugins/steve/actions.js +37 -3
- package/plugins/steve/getters.js +24 -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 +13 -11
- package/store/prefs.js +38 -33
- package/store/type-map.js +82 -157
- package/tsconfig.default.json +46 -0
- package/tsconfig.json +9 -35
- package/types/shell/index.d.ts +404 -465
- package/utils/axios.js +19 -0
- package/utils/create-yaml.js +1 -5
- 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 -24
- 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/__tests__/CodeMirror.spec.ts +0 -99
- 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/formatter/__tests__/WorkloadDetailEndpoints.test.ts +0 -81
- 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/detail/__tests__/provisioning.cattle.io.cluster.test.ts +0 -77
- 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 -147
- 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 -241
- package/models/__tests__/secret.test.ts +0 -37
- package/models/__tests__/storage.k8s.io.storageclass.test.ts +0 -22
- package/models/__tests__/workload.test.ts +0 -91
- package/plugins/clean-html.js +0 -53
- 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__/resource-utils.test.ts +0 -159
- package/plugins/steve/__tests__/steve-class.spec.ts +0 -59
- package/plugins/steve/__tests__/utils/steve-mocks.ts +0 -31
- package/plugins/steve/resource-utils.ts +0 -38
- package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +0 -50
- package/server/har-file.js +0 -183
- package/store/__tests__/type-map.test.ts +0 -1122
- 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/RegistryConfigs.vue → RegistryConfigs.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__/{actions.test.ts → actions.spec.ts} +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"
|
|
@@ -145,7 +129,6 @@ export default {
|
|
|
145
129
|
<div class="edit-change mt-20">
|
|
146
130
|
<h5 v-t="'advancedSettings.edit.changeSetting'" />
|
|
147
131
|
<button
|
|
148
|
-
data-testid="advanced_settings_use_default"
|
|
149
132
|
:disabled="!canReset"
|
|
150
133
|
type="button"
|
|
151
134
|
class="btn role-primary"
|
|
@@ -155,19 +138,6 @@ export default {
|
|
|
155
138
|
</button>
|
|
156
139
|
</div>
|
|
157
140
|
|
|
158
|
-
<Banner
|
|
159
|
-
v-if="showLocalhostWarning"
|
|
160
|
-
color="warning"
|
|
161
|
-
:label="t('validation.setting.serverUrl.localhost')"
|
|
162
|
-
/>
|
|
163
|
-
|
|
164
|
-
<Banner
|
|
165
|
-
v-for="(err, i) in fvGetPathErrors(['value'])"
|
|
166
|
-
:key="i"
|
|
167
|
-
color="error"
|
|
168
|
-
:label="err"
|
|
169
|
-
/>
|
|
170
|
-
|
|
171
141
|
<div class="mt-20">
|
|
172
142
|
<div v-if="setting.kind === 'enum'">
|
|
173
143
|
<LabeledSelect
|
|
@@ -123,6 +123,7 @@ export default {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
+
|
|
126
127
|
};
|
|
127
128
|
</script>
|
|
128
129
|
|
|
@@ -184,7 +185,7 @@ export default {
|
|
|
184
185
|
<div class="row mb-20">
|
|
185
186
|
<div class="col span-12">
|
|
186
187
|
<LabeledInput
|
|
187
|
-
v-model="value.httpConfig.
|
|
188
|
+
v-model="value.httpConfig.proxyUrl"
|
|
188
189
|
:mode="mode"
|
|
189
190
|
label="Proxy URL"
|
|
190
191
|
placeholder="e.g. http://my-proxy/"
|
|
@@ -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,10 +104,22 @@ 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
|
},
|
|
115
|
+
hasPsaTemplates: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
required: true
|
|
118
|
+
},
|
|
119
|
+
isK3s: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
required: true
|
|
122
|
+
},
|
|
94
123
|
haveArgInfo: {
|
|
95
124
|
type: Boolean,
|
|
96
125
|
required: true
|
|
@@ -106,21 +135,20 @@ export default {
|
|
|
106
135
|
cloudProviderOptions: {
|
|
107
136
|
type: Array,
|
|
108
137
|
required: true
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
watch: {
|
|
113
|
-
selectedVersion(neu, old) {
|
|
114
|
-
if (neu?.value !== old?.value && this.ciliumIpv6) {
|
|
115
|
-
// Re-assign so that the setter updates the structure for the new k8s version if needed
|
|
116
|
-
this.ciliumIpv6 = !!this.ciliumIpv6;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
138
|
+
},
|
|
119
139
|
},
|
|
120
140
|
|
|
121
141
|
computed: {
|
|
122
142
|
...mapGetters({ features: 'features/get' }),
|
|
123
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Check presence of PSPs as template or CLI creation
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
hasPsps() {
|
|
149
|
+
return !!this.psps?.count;
|
|
150
|
+
},
|
|
151
|
+
|
|
124
152
|
serverConfig() {
|
|
125
153
|
return this.value.spec.rkeConfig.machineGlobalConfig;
|
|
126
154
|
},
|
|
@@ -129,6 +157,17 @@ export default {
|
|
|
129
157
|
return this.value.agentConfig;
|
|
130
158
|
},
|
|
131
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
|
+
|
|
132
171
|
profileOptions() {
|
|
133
172
|
const out = (this.agentArgs?.profile?.options || []).map((x) => {
|
|
134
173
|
return { label: x, value: x };
|
|
@@ -146,9 +185,35 @@ export default {
|
|
|
146
185
|
* Allow to display override if PSA is needed and profile is set
|
|
147
186
|
*/
|
|
148
187
|
hasCisOverride() {
|
|
149
|
-
return (this.serverConfig?.profile || this.agentConfig?.profile) &&
|
|
188
|
+
return (this.serverConfig?.profile || this.agentConfig?.profile) && this.needsPSA &&
|
|
150
189
|
// Also check other cases on when to display the override
|
|
151
|
-
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;
|
|
152
217
|
},
|
|
153
218
|
|
|
154
219
|
/**
|
|
@@ -157,14 +222,14 @@ export default {
|
|
|
157
222
|
isPsaDisabled() {
|
|
158
223
|
const cisValue = this.agentConfig?.profile || this.serverConfig?.profile;
|
|
159
224
|
|
|
160
|
-
return !(!cisValue || this.cisOverride) && this.isCisSupported;
|
|
225
|
+
return !(!cisValue || this.cisOverride) && this.hasPsaTemplates && this.isCisSupported;
|
|
161
226
|
},
|
|
162
227
|
|
|
163
228
|
/**
|
|
164
229
|
* Get the default label for the PSA template option
|
|
165
230
|
*/
|
|
166
231
|
defaultPsaOptionLabel() {
|
|
167
|
-
const optionCase = !this.
|
|
232
|
+
const optionCase = !this.needsPsp && !this.isK3s ? 'default' : 'none';
|
|
168
233
|
|
|
169
234
|
return this.$store.getters['i18n/t'](`cluster.rke2.defaultPodSecurityAdmissionConfigurationTemplateName.option.${ optionCase }`);
|
|
170
235
|
},
|
|
@@ -173,6 +238,9 @@ export default {
|
|
|
173
238
|
* Convert PSA templates into options, sorting and flagging if any selected
|
|
174
239
|
*/
|
|
175
240
|
psaOptions() {
|
|
241
|
+
if ( !this.needsPSA ) {
|
|
242
|
+
return [];
|
|
243
|
+
}
|
|
176
244
|
const out = [{
|
|
177
245
|
label: this.defaultPsaOptionLabel,
|
|
178
246
|
value: ''
|
|
@@ -207,7 +275,7 @@ export default {
|
|
|
207
275
|
disableOptions() {
|
|
208
276
|
return (this.serverArgs.disable.options || []).map((value) => {
|
|
209
277
|
return {
|
|
210
|
-
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)-/, '')),
|
|
211
279
|
value,
|
|
212
280
|
};
|
|
213
281
|
});
|
|
@@ -253,7 +321,7 @@ export default {
|
|
|
253
321
|
return false;
|
|
254
322
|
}
|
|
255
323
|
|
|
256
|
-
const name = this.agentConfig
|
|
324
|
+
const name = this.agentConfig['cloud-provider-name'];
|
|
257
325
|
|
|
258
326
|
if ( !name ) {
|
|
259
327
|
return false;
|
|
@@ -273,7 +341,7 @@ export default {
|
|
|
273
341
|
return false;
|
|
274
342
|
}
|
|
275
343
|
|
|
276
|
-
const name = this.agentConfig
|
|
344
|
+
const name = this.agentConfig['cloud-provider-name'];
|
|
277
345
|
|
|
278
346
|
return name === 'rancher-vsphere';
|
|
279
347
|
},
|
|
@@ -294,78 +362,15 @@ export default {
|
|
|
294
362
|
// eslint-disable-next-line no-unused-vars
|
|
295
363
|
const cni = this.serverConfig.cni; // force this property to recalculate if cni was changed away from cilium and chartValues['rke-cilium'] deleted
|
|
296
364
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return chart?.cilium?.ipv6?.enabled || chart?.ipv6?.enabled || false;
|
|
365
|
+
return this.userChartValues[this.chartVersionKey('rke2-cilium')]?.cilium?.ipv6?.enabled || false;
|
|
300
366
|
},
|
|
301
|
-
set(
|
|
302
|
-
|
|
303
|
-
const values = this.userChartValues[name];
|
|
304
|
-
|
|
305
|
-
// RKE2 older than 1.23.5 uses different Helm chart values structure - need to take that into account
|
|
306
|
-
const version = this.selectedVersion.value;
|
|
307
|
-
let ciliumValues = {};
|
|
308
|
-
|
|
309
|
-
if (semver.gt(version, '1.23.5')) {
|
|
310
|
-
// New style
|
|
311
|
-
ciliumValues = {
|
|
312
|
-
...values,
|
|
313
|
-
ipv6: {
|
|
314
|
-
...values?.ipv6,
|
|
315
|
-
enabled: neu
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
delete ciliumValues.cilium;
|
|
320
|
-
} else {
|
|
321
|
-
// Old style
|
|
322
|
-
ciliumValues = {
|
|
323
|
-
...values,
|
|
324
|
-
cilium: {
|
|
325
|
-
...values?.cilium,
|
|
326
|
-
ipv6: {
|
|
327
|
-
...values?.cilium?.ipv6,
|
|
328
|
-
enabled: neu
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
delete ciliumValues.ipv6;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
this.$emit('cilium-values-changed', ciliumValues);
|
|
367
|
+
set(val) {
|
|
368
|
+
this.$emit('cilium-ipv6-changed', val);
|
|
337
369
|
}
|
|
338
370
|
},
|
|
339
371
|
|
|
340
|
-
ciliumBandwidthManager: {
|
|
341
|
-
get() {
|
|
342
|
-
// eslint-disable-next-line no-unused-vars
|
|
343
|
-
const cni = this.serverConfig.cni; // force this property to recalculate if cni was changed away from cilium and chartValues['rke-cilium'] deleted
|
|
344
|
-
|
|
345
|
-
return this.userChartValues[this.chartVersionKey('rke2-cilium')]?.bandwidthManager?.enabled || false;
|
|
346
|
-
},
|
|
347
|
-
set(neu) {
|
|
348
|
-
const name = this.chartVersionKey('rke2-cilium');
|
|
349
|
-
const values = this.userChartValues[name];
|
|
350
|
-
|
|
351
|
-
const ciliumValues = {
|
|
352
|
-
...values,
|
|
353
|
-
bandwidthManager: {
|
|
354
|
-
...values?.bandwidthManager,
|
|
355
|
-
enabled: neu
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
this.$emit('cilium-values-changed', ciliumValues);
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
|
|
363
|
-
isEdit() {
|
|
364
|
-
return this.mode === _EDIT;
|
|
365
|
-
},
|
|
366
|
-
|
|
367
372
|
canNotEditCloudProvider() {
|
|
368
|
-
const canNotEdit = this.
|
|
373
|
+
const canNotEdit = this.clusterIsAlreadyCreated;
|
|
369
374
|
|
|
370
375
|
return canNotEdit;
|
|
371
376
|
},
|
|
@@ -374,7 +379,7 @@ export default {
|
|
|
374
379
|
* Display warning about additional configuration needed for cloud provider Amazon if kube >= 1.27
|
|
375
380
|
*/
|
|
376
381
|
showCloudProviderAmazonAdditionalConfigWarning() {
|
|
377
|
-
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';
|
|
378
383
|
}
|
|
379
384
|
},
|
|
380
385
|
|
|
@@ -417,13 +422,6 @@ export default {
|
|
|
417
422
|
>
|
|
418
423
|
<span v-clean-html="t('cluster.banner.cloudProviderAddConfig', {}, true)" />
|
|
419
424
|
</Banner>
|
|
420
|
-
<Banner
|
|
421
|
-
v-if="serverConfig.cni === 'none'"
|
|
422
|
-
color="warning"
|
|
423
|
-
data-testid="clusterBasics__noneOptionSelectedForCni"
|
|
424
|
-
>
|
|
425
|
-
<span v-clean-html="t('cluster.rke2.cni.cniNoneBanner', {}, true)" />
|
|
426
|
-
</Banner>
|
|
427
425
|
<div class="row mb-10">
|
|
428
426
|
<div class="col span-6">
|
|
429
427
|
<LabeledSelect
|
|
@@ -447,7 +445,6 @@ export default {
|
|
|
447
445
|
class="col span-6"
|
|
448
446
|
>
|
|
449
447
|
<LabeledSelect
|
|
450
|
-
v-if="agentConfig"
|
|
451
448
|
v-model="agentConfig['cloud-provider-name']"
|
|
452
449
|
:mode="mode"
|
|
453
450
|
:disabled="canNotEditCloudProvider"
|
|
@@ -464,9 +461,8 @@ export default {
|
|
|
464
461
|
<div class="col span-6">
|
|
465
462
|
<LabeledSelect
|
|
466
463
|
v-model="serverConfig.cni"
|
|
467
|
-
data-testid="cluster-rke2-cni-select"
|
|
468
464
|
:mode="mode"
|
|
469
|
-
:disabled="
|
|
465
|
+
:disabled="clusterIsAlreadyCreated"
|
|
470
466
|
:options="serverArgs.cni.options"
|
|
471
467
|
:label="t('cluster.rke2.cni.label')"
|
|
472
468
|
/>
|
|
@@ -477,16 +473,9 @@ export default {
|
|
|
477
473
|
>
|
|
478
474
|
<Checkbox
|
|
479
475
|
v-model="ciliumIpv6"
|
|
480
|
-
data-testid="cluster-rke2-cni-ipv6-checkbox"
|
|
481
476
|
:mode="mode"
|
|
482
477
|
:label="t('cluster.rke2.address.ipv6.enable')"
|
|
483
478
|
/>
|
|
484
|
-
<Checkbox
|
|
485
|
-
v-model="ciliumBandwidthManager"
|
|
486
|
-
data-testid="cluster-rke2-cni-cilium-bandwidth-manager-checkbox"
|
|
487
|
-
:mode="mode"
|
|
488
|
-
:label="t('cluster.rke2.cni.cilium.BandwidthManager.enable')"
|
|
489
|
-
/>
|
|
490
479
|
</div>
|
|
491
480
|
</div>
|
|
492
481
|
<template v-if="showVsphereNote">
|
|
@@ -503,7 +492,6 @@ export default {
|
|
|
503
492
|
{{ t('cluster.rke2.cloudProvider.header') }}
|
|
504
493
|
</h3>
|
|
505
494
|
<YamlEditor
|
|
506
|
-
v-if="agentConfig"
|
|
507
495
|
ref="yaml"
|
|
508
496
|
v-model="agentConfig['cloud-provider-config']"
|
|
509
497
|
:editor-mode="mode === 'view' ? 'VIEW_CODE' : 'EDIT_CODE'"
|
|
@@ -518,6 +506,21 @@ export default {
|
|
|
518
506
|
<h3>
|
|
519
507
|
{{ t('cluster.rke2.security.header') }}
|
|
520
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
|
+
/>
|
|
521
524
|
|
|
522
525
|
<Banner
|
|
523
526
|
v-if="showCisProfile && !isCisSupported && isEdit"
|
|
@@ -527,6 +530,21 @@ export default {
|
|
|
527
530
|
</Banner>
|
|
528
531
|
|
|
529
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
|
+
|
|
530
548
|
<div
|
|
531
549
|
v-if="showCisProfile"
|
|
532
550
|
class="col span-6"
|
|
@@ -565,13 +583,14 @@ export default {
|
|
|
565
583
|
:label="t('cluster.rke2.banner.cisOverride')"
|
|
566
584
|
/>
|
|
567
585
|
<Banner
|
|
568
|
-
v-if="!cisOverride"
|
|
586
|
+
v-if="cisPsaChangeBanner && !cisOverride"
|
|
569
587
|
color="info"
|
|
570
588
|
:label="t('cluster.rke2.banner.psaChange')"
|
|
571
589
|
/>
|
|
572
590
|
</template>
|
|
573
591
|
|
|
574
592
|
<div
|
|
593
|
+
v-if="needsPSA"
|
|
575
594
|
class="row mb-10 mt-10"
|
|
576
595
|
>
|
|
577
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"
|
|
@@ -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
|
|