@rancher/shell 3.0.4 → 3.0.5-rc.2
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/assets/images/providers/sks.svg +1 -0
- package/assets/styles/base/_basic.scss +6 -0
- package/assets/styles/base/_helpers.scss +4 -0
- package/assets/styles/base/_variables.scss +1 -0
- package/assets/styles/global/_button.scss +1 -0
- package/assets/translations/en-us.yaml +65 -15
- package/assets/translations/zh-hans.yaml +4 -3
- package/chart/monitoring/index.vue +3 -1
- package/cloud-credential/aws.vue +2 -0
- package/components/ActionDropdownShell.vue +71 -0
- package/components/AppModal.vue +18 -4
- package/components/AsyncButton.vue +24 -7
- package/components/BannerGraphic.vue +1 -0
- package/components/CommunityLinks.vue +4 -59
- package/components/CopyToClipboardText.vue +2 -1
- package/components/CruResource.vue +6 -1
- package/components/DetailText.vue +5 -0
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +68 -18
- package/components/GlobalRoleBindings.vue +5 -1
- package/components/GrowlManager.vue +1 -0
- package/components/LandingPagePreference.vue +7 -3
- package/components/LocaleSelector.vue +39 -95
- package/components/ModalManager.vue +55 -0
- package/components/ModalWithCard.vue +1 -0
- package/components/PromptModal.vue +47 -8
- package/components/PromptRemove.vue +1 -0
- package/components/PromptRestore.vue +1 -0
- package/components/ResourceCancelModal.vue +1 -0
- package/components/ResourceDetail/Masthead.vue +38 -12
- package/components/ResourceDetail/__tests__/Masthead.test.ts +5 -1
- package/components/ResourceDetail/index.vue +47 -12
- package/components/ResourceTable.vue +54 -19
- package/components/SideNav.vue +5 -1
- package/components/SlideInPanelManager.vue +126 -0
- package/components/SortableTable/THead.vue +5 -2
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +64 -51
- package/components/SortableTable/paging.js +16 -19
- package/components/SortableTable/selection.js +0 -11
- package/components/Wizard.vue +2 -2
- package/components/__tests__/AsyncButton.test.ts +2 -2
- package/components/__tests__/ModalManager.spec.ts +176 -0
- package/components/__tests__/PromptModal.test.ts +148 -0
- package/components/__tests__/SlideInPanelManager.spec.ts +166 -0
- package/components/auth/AuthBanner.vue +13 -11
- package/components/auth/Principal.vue +1 -0
- package/components/auth/__tests__/RoleDetailEdit.test.ts +3 -2
- package/components/auth/login/ldap.vue +1 -1
- package/components/fleet/FleetResources.vue +21 -6
- package/components/form/ArrayList.vue +76 -60
- package/components/form/BannerSettings.vue +17 -2
- package/components/form/ColorInput.vue +35 -6
- package/components/form/Command.vue +6 -15
- package/components/form/EnvVars.vue +16 -8
- package/components/form/HealthCheck.vue +3 -3
- package/components/form/HookOption.vue +11 -16
- package/components/form/LabeledSelect.vue +18 -22
- package/components/form/LifecycleHooks.vue +3 -3
- package/components/form/MatchExpressions.vue +14 -8
- package/components/form/NameNsDescription.vue +128 -104
- package/components/form/Networking.vue +20 -12
- package/components/form/NodeAffinity.vue +31 -23
- package/components/form/NodeScheduling.vue +13 -3
- package/components/form/NotificationSettings.vue +15 -1
- package/components/form/Password.vue +1 -0
- package/components/form/PodAffinity.vue +43 -43
- package/components/form/Probe.vue +68 -66
- package/components/form/ResourceQuota/Project.vue +5 -1
- package/components/form/ResourceSelector.vue +7 -9
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +16 -24
- package/components/form/SSHKnownHosts/index.vue +30 -13
- package/components/form/Security.vue +54 -56
- package/components/form/Select.vue +32 -21
- package/components/form/ShellInput.vue +5 -1
- package/components/form/Tolerations.vue +5 -1
- package/components/form/ValueFromResource.vue +134 -121
- package/components/form/WorkloadPorts.vue +18 -18
- package/components/form/__tests__/ArrayList.test.ts +5 -2
- package/components/form/__tests__/ColorInput.test.ts +35 -0
- package/components/form/__tests__/LabeledSelect.test.ts +40 -0
- package/components/form/__tests__/MatchExpressions.test.ts +12 -12
- package/components/form/__tests__/NameNsDescription.test.ts +115 -14
- package/components/form/__tests__/Probe.test.ts +12 -8
- package/components/form/__tests__/SSHKnownHosts.test.ts +22 -2
- package/components/form/__tests__/Select.test.ts +37 -0
- package/components/formatter/InternalExternalIP.vue +2 -0
- package/components/formatter/SecretData.vue +20 -7
- package/components/nav/Group.vue +27 -5
- package/components/nav/Header.vue +17 -43
- package/components/nav/NamespaceFilter.vue +134 -86
- package/components/nav/TopLevelMenu.vue +4 -5
- package/components/nav/Type.vue +12 -1
- package/components/nav/WindowManager/ContainerLogs.vue +87 -61
- package/components/nav/WindowManager/ContainerLogsActions.vue +76 -0
- package/components/templates/blank.vue +4 -1
- package/components/templates/default.vue +8 -3
- package/components/templates/home.vue +10 -1
- package/components/templates/plain.vue +10 -4
- package/composables/focusTrap.ts +12 -4
- package/composables/useRuntimeFlag.ts +29 -0
- package/config/router/routes.js +20 -13
- package/config/store.js +4 -0
- package/config/uiplugins.js +5 -1
- package/core/types.ts +12 -6
- package/detail/catalog.cattle.io.app.vue +6 -1
- package/detail/fleet.cattle.io.bundle.vue +70 -6
- package/detail/fleet.cattle.io.gitrepo.vue +1 -1
- package/detail/namespace.vue +0 -3
- package/detail/node.vue +17 -13
- package/detail/provisioning.cattle.io.cluster.vue +72 -6
- package/dialog/AddCustomBadgeDialog.vue +1 -1
- package/{pages/c/_cluster/uiplugins/AddExtensionRepos.vue → dialog/AddExtensionReposDialog.vue} +72 -42
- package/{components/AssignTo.vue → dialog/AssignToDialog.vue} +71 -80
- package/dialog/ChangePasswordDialog.vue +106 -0
- package/dialog/DeactivateDriverDialog.vue +1 -0
- package/{pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue → dialog/DeveloperLoadExtensionDialog.vue} +74 -71
- package/dialog/DisableAuthProviderDialog.vue +101 -0
- package/dialog/DrainNode.vue +1 -1
- package/{pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue → dialog/ExtensionCatalogInstallDialog.vue} +100 -88
- package/{pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue → dialog/ExtensionCatalogUninstallDialog.vue} +69 -57
- package/dialog/FeatureFlagListDialog.vue +288 -0
- package/dialog/ForceMachineRemoveDialog.vue +5 -2
- package/{components/Import.vue → dialog/ImportDialog.vue} +0 -5
- package/{pages/c/_cluster/uiplugins/InstallDialog.vue → dialog/InstallExtensionDialog.vue} +124 -106
- package/{components/form/SSHKnownHosts → dialog}/KnownHostsEditDialog.vue +52 -59
- package/dialog/MoveNamespaceDialog.vue +157 -0
- package/dialog/ScalePoolDownDialog.vue +1 -1
- package/{components/nav/Jump.vue → dialog/SearchDialog.vue} +34 -14
- package/{pages/c/_cluster/uiplugins/UninstallDialog.vue → dialog/UninstallExtensionDialog.vue} +67 -58
- package/dialog/WechatDialog.vue +57 -0
- package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +16 -3
- package/edit/auth/__tests__/oidc.test.ts +152 -109
- package/edit/auth/azuread.vue +2 -1
- package/edit/auth/github.vue +1 -1
- package/edit/auth/googleoauth.vue +5 -1
- package/edit/auth/ldap/index.vue +1 -1
- package/edit/auth/oidc.vue +38 -5
- package/edit/auth/saml.vue +1 -1
- package/edit/cloudcredential.vue +24 -9
- package/edit/logging.banzaicloud.io.output/__tests__/logging.banzaicloud.io.output.test.ts +40 -9
- package/edit/management.cattle.io.user.vue +28 -3
- package/edit/namespace.vue +1 -4
- package/edit/networking.k8s.io.ingress/IngressClass.vue +7 -3
- package/edit/networking.k8s.io.ingress/__tests__/IngressClass.test.ts +58 -0
- package/edit/persistentvolume/__tests__/persistentvolume.test.ts +14 -2
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +26 -9
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +8 -8
- package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +26 -12
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +66 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/utils/rke2-test-data.ts +58 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +49 -41
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +6 -1
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +5 -3
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +33 -2
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -2
- package/edit/token.vue +2 -0
- package/edit/workload/index.vue +1 -0
- package/edit/workload/mixins/workload.js +0 -2
- package/initialize/install-plugins.js +2 -1
- package/list/harvesterhci.io.management.cluster.vue +4 -1
- package/list/management.cattle.io.feature.vue +4 -287
- package/list/provisioning.cattle.io.cluster.vue +20 -12
- package/machine-config/azure.vue +16 -4
- package/mixins/vue-select-overrides.js +0 -4
- package/models/__tests__/namespace.test.ts +25 -1
- package/models/cloudcredential.js +5 -0
- package/models/fleet.cattle.io.cluster.js +8 -2
- package/models/fleet.cattle.io.gitrepo.js +8 -34
- package/models/kontainerdriver.js +6 -3
- package/models/management.cattle.io.feature.js +7 -1
- package/models/management.cattle.io.node.js +3 -3
- package/models/namespace.js +11 -6
- package/models/nodedriver.js +6 -3
- package/models/workload.js +4 -1
- package/package.json +3 -3
- package/pages/about.vue +13 -3
- package/pages/account/index.vue +16 -6
- package/pages/auth/login.vue +18 -7
- package/pages/auth/logout.vue +4 -1
- package/pages/auth/setup.vue +2 -0
- package/pages/auth/verify.vue +13 -8
- package/pages/c/_cluster/apps/charts/chart.vue +1 -1
- package/pages/c/_cluster/apps/charts/install.vue +26 -26
- package/pages/c/_cluster/auth/config/index.vue +10 -12
- package/pages/c/_cluster/explorer/EventsTable.vue +38 -33
- package/pages/c/_cluster/explorer/index.vue +17 -15
- package/pages/c/_cluster/istio/index.vue +2 -2
- package/pages/c/_cluster/longhorn/index.vue +1 -1
- package/pages/c/_cluster/monitoring/index.vue +1 -1
- package/pages/c/_cluster/monitoring/monitor/_namespace/_id.vue +4 -2
- package/pages/c/_cluster/monitoring/monitor/create.vue +4 -2
- package/pages/c/_cluster/monitoring/route-receiver/_id.vue +4 -2
- package/pages/c/_cluster/monitoring/route-receiver/create.vue +5 -2
- package/pages/c/_cluster/neuvector/index.vue +1 -1
- package/pages/c/_cluster/settings/banners.vue +4 -3
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +8 -10
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +4 -7
- package/pages/c/_cluster/uiplugins/index.vue +98 -55
- package/pages/diagnostic.vue +59 -11
- package/pages/fail-whale.vue +14 -8
- package/pages/home.vue +24 -18
- package/pages/prefs.vue +7 -6
- package/pages/support/index.vue +4 -1
- package/plugins/internal-api/index.ts +37 -0
- package/plugins/internal-api/shared/base-api.ts +13 -0
- package/plugins/internal-api/shell/shell.api.ts +108 -0
- package/plugins/steve/actions.js +0 -12
- package/public/index.html +1 -0
- package/rancher-components/Card/Card.vue +1 -1
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +59 -1
- package/rancher-components/Form/Checkbox/Checkbox.vue +27 -3
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +47 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +20 -2
- package/rancher-components/Form/Radio/RadioButton.test.ts +36 -1
- package/rancher-components/Form/Radio/RadioButton.vue +20 -4
- package/rancher-components/Form/Radio/RadioGroup.test.ts +60 -0
- package/rancher-components/Form/Radio/RadioGroup.vue +52 -10
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +17 -0
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +5 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +10 -1
- package/rancher-components/RcButton/RcButton.vue +2 -1
- package/rancher-components/RcButton/types.ts +1 -0
- package/rancher-components/RcDropdown/RcDropdown.vue +18 -6
- package/rancher-components/RcDropdown/RcDropdownItem.vue +3 -56
- package/rancher-components/RcDropdown/RcDropdownItemCheckbox.vue +68 -0
- package/rancher-components/RcDropdown/RcDropdownItemSelect.vue +92 -0
- package/rancher-components/RcDropdown/RcDropdownTrigger.vue +10 -0
- package/rancher-components/RcDropdown/index.ts +2 -0
- package/rancher-components/RcDropdown/useDropdownCollection.ts +8 -0
- package/rancher-components/RcDropdown/useDropdownContext.ts +9 -3
- package/rancher-components/RcDropdown/useDropdownItem.ts +63 -0
- package/scripts/extension/bundle +20 -0
- package/scripts/extension/helm/charts/ui-plugin-server/templates/cr.yaml +2 -1
- package/scripts/extension/helm/charts/ui-plugin-server/values.yaml +2 -0
- package/scripts/extension/helmpatch +44 -31
- package/scripts/extension/publish +12 -12
- package/scripts/typegen.sh +2 -4
- package/server/har-file.js +25 -3
- package/store/action-menu.js +26 -56
- package/store/features.js +2 -1
- package/store/index.js +5 -0
- package/store/modal.ts +71 -0
- package/store/slideInPanel.ts +47 -0
- package/store/type-map.js +12 -1
- package/store/type-map.utils.ts +4 -4
- package/types/global-vue.d.ts +5 -0
- package/types/internal-api/shell/growl.d.ts +25 -0
- package/types/internal-api/shell/modal.d.ts +77 -0
- package/types/internal-api/shell/slideIn.d.ts +15 -0
- package/types/resources/fleet.d.ts +0 -14
- package/types/shell/index.d.ts +43 -24
- package/types/vue-shim.d.ts +4 -1
- package/utils/__mocks__/tabbable.js +13 -0
- package/utils/__tests__/object.test.ts +38 -4
- package/utils/cluster.js +35 -0
- package/utils/fleet.ts +15 -73
- package/utils/object.js +48 -5
- package/utils/validators/formRules/__tests__/index.test.ts +10 -1
- package/utils/validators/formRules/index.ts +27 -3
- package/utils/validators/machine-pool.ts +20 -0
- package/components/DisableAuthProviderModal.vue +0 -114
- package/components/MoveModal.vue +0 -166
- package/components/PromptChangePassword.vue +0 -123
- package/components/fleet/FleetBundleResources.vue +0 -86
- package/components/formatter/ExtensionCache.vue +0 -74
- package/components/formatter/Port.vue +0 -24
- package/components/formatter/SecretType.vue +0 -41
- package/types/vue-shim.d +0 -20
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
2
|
+
import { mapGetters } from 'vuex';
|
|
3
3
|
import { FLEET, NORMAN } from '@shell/config/types';
|
|
4
4
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
5
5
|
import KeyValue from '@shell/components/form/KeyValue';
|
|
6
6
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
7
|
-
import AppModal from '@shell/components/AppModal.vue';
|
|
8
7
|
import { Card } from '@components/Card';
|
|
9
8
|
import { Banner } from '@components/Banner';
|
|
10
9
|
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
11
10
|
import { set } from '@shell/utils/object';
|
|
12
11
|
|
|
13
12
|
export default {
|
|
13
|
+
emits: ['close'],
|
|
14
|
+
|
|
14
15
|
components: {
|
|
15
16
|
Card,
|
|
16
17
|
LabeledSelect,
|
|
17
18
|
KeyValue,
|
|
18
19
|
AsyncButton,
|
|
19
|
-
Banner
|
|
20
|
-
|
|
20
|
+
Banner
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
props: {
|
|
24
|
+
toAssign: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => []
|
|
27
|
+
}
|
|
21
28
|
},
|
|
22
29
|
|
|
23
30
|
data() {
|
|
@@ -26,13 +33,18 @@ export default {
|
|
|
26
33
|
labels: {},
|
|
27
34
|
moveTo: this.workspace,
|
|
28
35
|
loaded: false,
|
|
29
|
-
allWorkspaces: []
|
|
30
|
-
showModal: false,
|
|
36
|
+
allWorkspaces: []
|
|
31
37
|
};
|
|
32
38
|
},
|
|
33
39
|
|
|
40
|
+
async fetch() {
|
|
41
|
+
await this.$store.dispatch('rancher/findAll', { type: NORMAN.CLUSTER });
|
|
42
|
+
this.allWorkspaces = await this.$store.dispatch('management/findAll', { type: FLEET.WORKSPACE });
|
|
43
|
+
this.moveTo = this.workspace;
|
|
44
|
+
this.loaded = true;
|
|
45
|
+
},
|
|
46
|
+
|
|
34
47
|
computed: {
|
|
35
|
-
...mapState('action-menu', ['showAssignTo', 'toAssign']),
|
|
36
48
|
...mapGetters({ t: 'i18n/t' }),
|
|
37
49
|
...mapGetters(['workspace']),
|
|
38
50
|
|
|
@@ -47,26 +59,12 @@ export default {
|
|
|
47
59
|
}
|
|
48
60
|
},
|
|
49
61
|
|
|
50
|
-
watch: {
|
|
51
|
-
async showAssignTo(show) {
|
|
52
|
-
if (show) {
|
|
53
|
-
await this.$store.dispatch('rancher/findAll', { type: NORMAN.CLUSTER });
|
|
54
|
-
this.allWorkspaces = await this.$store.dispatch('management/findAll', { type: FLEET.WORKSPACE });
|
|
55
|
-
this.moveTo = this.workspace;
|
|
56
|
-
this.loaded = true;
|
|
57
|
-
this.showModal = true;
|
|
58
|
-
} else {
|
|
59
|
-
this.showModal = false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
62
|
methods: {
|
|
65
63
|
close() {
|
|
66
64
|
this.errors = [];
|
|
67
65
|
this.labels = {};
|
|
68
66
|
this.moveTo = this.workspace;
|
|
69
|
-
this.$
|
|
67
|
+
this.$emit('close');
|
|
70
68
|
},
|
|
71
69
|
|
|
72
70
|
async apply(buttonDone) {
|
|
@@ -108,55 +106,46 @@ export default {
|
|
|
108
106
|
</script>
|
|
109
107
|
|
|
110
108
|
<template>
|
|
111
|
-
<
|
|
112
|
-
|
|
113
|
-
class="assign-modal"
|
|
114
|
-
name="assignTo"
|
|
115
|
-
styles="background-color: var(--nav-bg); border-radius: var(--border-radius); max-height: 100vh;"
|
|
116
|
-
height="auto"
|
|
117
|
-
:scrollable="true"
|
|
118
|
-
@close="close"
|
|
109
|
+
<Card
|
|
110
|
+
:show-highlight-border="false"
|
|
119
111
|
>
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
</template>
|
|
158
|
-
|
|
159
|
-
<template #actions>
|
|
112
|
+
<template #title>
|
|
113
|
+
<h4
|
|
114
|
+
v-clean-html="t('assignTo.title', {count: resourceCount}, true)"
|
|
115
|
+
class="text-default-text"
|
|
116
|
+
/>
|
|
117
|
+
</template>
|
|
118
|
+
<template #body>
|
|
119
|
+
<div class="pl-10 pr-10">
|
|
120
|
+
<form>
|
|
121
|
+
<LabeledSelect
|
|
122
|
+
v-model:value="moveTo"
|
|
123
|
+
data-testid="workspace_options"
|
|
124
|
+
:label="t('assignTo.workspace')"
|
|
125
|
+
:options="workspaceOptions"
|
|
126
|
+
placement="bottom"
|
|
127
|
+
/>
|
|
128
|
+
|
|
129
|
+
<KeyValue
|
|
130
|
+
key="labels"
|
|
131
|
+
v-model:value="labels"
|
|
132
|
+
class="mt-20"
|
|
133
|
+
:add-label="t('labels.addSetLabel')"
|
|
134
|
+
:read-allowed="false"
|
|
135
|
+
/>
|
|
136
|
+
|
|
137
|
+
<Banner
|
|
138
|
+
v-for="(err, i) in errors"
|
|
139
|
+
:key="i"
|
|
140
|
+
color="error"
|
|
141
|
+
:label="err"
|
|
142
|
+
/>
|
|
143
|
+
</form>
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
146
|
+
|
|
147
|
+
<template #actions>
|
|
148
|
+
<div class="actions-container">
|
|
160
149
|
<button
|
|
161
150
|
class="btn role-secondary"
|
|
162
151
|
@click="close"
|
|
@@ -165,21 +154,23 @@ export default {
|
|
|
165
154
|
</button>
|
|
166
155
|
|
|
167
156
|
<AsyncButton
|
|
157
|
+
class="apply-btn"
|
|
168
158
|
mode="apply"
|
|
169
159
|
@click="apply"
|
|
170
160
|
/>
|
|
171
|
-
</
|
|
172
|
-
</
|
|
173
|
-
</
|
|
161
|
+
</div>
|
|
162
|
+
</template>
|
|
163
|
+
</Card>
|
|
174
164
|
</template>
|
|
175
165
|
|
|
176
166
|
<style lang='scss'>
|
|
177
|
-
.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
167
|
+
.actions-container {
|
|
168
|
+
display: flex;
|
|
169
|
+
justify-content: flex-end;
|
|
170
|
+
width: 100%;
|
|
171
|
+
|
|
172
|
+
.apply-btn {
|
|
173
|
+
margin-left: 20px;
|
|
174
|
+
}
|
|
183
175
|
}
|
|
184
|
-
}
|
|
185
176
|
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { mapGetters } from 'vuex';
|
|
3
|
+
import ChangePassword from '@shell/components/form/ChangePassword';
|
|
4
|
+
import { Card } from '@components/Card';
|
|
5
|
+
import AsyncButton from '@shell/components/AsyncButton';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
emits: ['close'],
|
|
9
|
+
components: {
|
|
10
|
+
Card, AsyncButton, ChangePassword
|
|
11
|
+
},
|
|
12
|
+
data() {
|
|
13
|
+
return { valid: false, password: '' };
|
|
14
|
+
},
|
|
15
|
+
computed: { ...mapGetters({ t: 'i18n/t' }) },
|
|
16
|
+
methods: {
|
|
17
|
+
closeModal() {
|
|
18
|
+
this.$emit('close');
|
|
19
|
+
},
|
|
20
|
+
async submit(buttonCb) {
|
|
21
|
+
try {
|
|
22
|
+
await this.$refs.changePassword.save();
|
|
23
|
+
this.closeModal();
|
|
24
|
+
buttonCb(true);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
buttonCb(false);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<Card
|
|
35
|
+
class="prompt-password"
|
|
36
|
+
:show-highlight-border="false"
|
|
37
|
+
>
|
|
38
|
+
<template #title>
|
|
39
|
+
<h4 class="text-default-text">
|
|
40
|
+
{{ t("changePassword.title") }}
|
|
41
|
+
</h4>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<template #body>
|
|
45
|
+
<form @submit.prevent>
|
|
46
|
+
<ChangePassword
|
|
47
|
+
ref="changePassword"
|
|
48
|
+
@valid="valid = $event"
|
|
49
|
+
/>
|
|
50
|
+
</form>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<template #actions>
|
|
54
|
+
<!-- type reset is required by lastpass -->
|
|
55
|
+
<button
|
|
56
|
+
class="btn role-secondary"
|
|
57
|
+
role="button"
|
|
58
|
+
:aria-label="t('changePassword.cancel')"
|
|
59
|
+
type="reset"
|
|
60
|
+
@click="closeModal"
|
|
61
|
+
>
|
|
62
|
+
{{ t("changePassword.cancel") }}
|
|
63
|
+
</button>
|
|
64
|
+
<AsyncButton
|
|
65
|
+
type="submit"
|
|
66
|
+
mode="apply"
|
|
67
|
+
class="btn bg-error ml-10"
|
|
68
|
+
:disabled="!valid"
|
|
69
|
+
value="LOGIN"
|
|
70
|
+
@click="submit"
|
|
71
|
+
/>
|
|
72
|
+
</template>
|
|
73
|
+
</Card>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<style lang="scss" scoped>
|
|
77
|
+
.prompt-password {
|
|
78
|
+
:deep() .card-wrap {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
|
|
82
|
+
.card-body {
|
|
83
|
+
flex: 1;
|
|
84
|
+
justify-content: start;
|
|
85
|
+
& > div {
|
|
86
|
+
flex: 1;
|
|
87
|
+
display: flex;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.card-actions {
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: flex-end;
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.prompt-password {
|
|
100
|
+
flex: 1;
|
|
101
|
+
display: flex;
|
|
102
|
+
form {
|
|
103
|
+
flex: 1;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -1,30 +1,44 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
3
|
-
import AppModal from '@shell/components/AppModal.vue';
|
|
4
3
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
5
4
|
import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
6
5
|
import { UI_PLUGIN } from '@shell/config/types';
|
|
7
6
|
import { UI_PLUGIN_CHART_ANNOTATIONS, UI_PLUGIN_NAMESPACE } from '@shell/config/uiplugins';
|
|
8
7
|
|
|
9
8
|
export default {
|
|
10
|
-
emits: ['
|
|
9
|
+
emits: ['close'],
|
|
11
10
|
|
|
12
11
|
components: {
|
|
13
12
|
AsyncButton,
|
|
14
13
|
Checkbox,
|
|
15
|
-
LabeledInput
|
|
16
|
-
|
|
14
|
+
LabeledInput
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
/**
|
|
18
|
+
* Callback when modal is closed
|
|
19
|
+
*/
|
|
20
|
+
closed: {
|
|
21
|
+
type: Function,
|
|
22
|
+
default: () => {},
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
resources: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: () => []
|
|
28
|
+
},
|
|
29
|
+
registerBackgroundClosing: {
|
|
30
|
+
type: Function,
|
|
31
|
+
default: () => {}
|
|
32
|
+
}
|
|
17
33
|
},
|
|
18
34
|
|
|
19
35
|
data() {
|
|
20
36
|
return {
|
|
21
|
-
name:
|
|
22
|
-
location:
|
|
23
|
-
persist:
|
|
24
|
-
canModifyName:
|
|
25
|
-
canModifyLocation:
|
|
26
|
-
showModal: false,
|
|
27
|
-
returnFocusSelector: '[data-testid="extensions-page-menu"]'
|
|
37
|
+
name: '',
|
|
38
|
+
location: '',
|
|
39
|
+
persist: false,
|
|
40
|
+
canModifyName: true,
|
|
41
|
+
canModifyLocation: true
|
|
28
42
|
};
|
|
29
43
|
},
|
|
30
44
|
|
|
@@ -55,12 +69,9 @@ export default {
|
|
|
55
69
|
},
|
|
56
70
|
|
|
57
71
|
methods: {
|
|
58
|
-
showDialog() {
|
|
59
|
-
this.showModal = true;
|
|
60
|
-
},
|
|
61
72
|
closeDialog(result) {
|
|
62
|
-
this.
|
|
63
|
-
this.$emit('
|
|
73
|
+
this.closed(result);
|
|
74
|
+
this.$emit('close');
|
|
64
75
|
},
|
|
65
76
|
|
|
66
77
|
updateName(v) {
|
|
@@ -127,15 +138,17 @@ export default {
|
|
|
127
138
|
|
|
128
139
|
this.$plugin.loadAsync(name, url).then(() => {
|
|
129
140
|
this.closeDialog(true);
|
|
141
|
+
|
|
130
142
|
this.$store.dispatch('growl/success', {
|
|
131
143
|
title: this.t('plugins.success.title', { name }),
|
|
132
144
|
message: this.t('plugins.success.message'),
|
|
133
145
|
timeout: 3000,
|
|
134
146
|
}, { root: true });
|
|
147
|
+
|
|
135
148
|
btnCb(true);
|
|
136
149
|
}).catch((error) => {
|
|
137
150
|
btnCb(false);
|
|
138
|
-
|
|
151
|
+
|
|
139
152
|
const message = typeof error === 'object' ? this.t('plugins.error.message') : error;
|
|
140
153
|
|
|
141
154
|
this.$store.dispatch('growl/error', {
|
|
@@ -150,63 +163,53 @@ export default {
|
|
|
150
163
|
</script>
|
|
151
164
|
|
|
152
165
|
<template>
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
</
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
166
|
+
<div class="plugin-install-dialog">
|
|
167
|
+
<h4>
|
|
168
|
+
{{ t('plugins.developer.title') }}
|
|
169
|
+
</h4>
|
|
170
|
+
<p>
|
|
171
|
+
{{ t('plugins.developer.prompt') }}
|
|
172
|
+
</p>
|
|
173
|
+
<div class="custom mt-10">
|
|
174
|
+
<div class="fields">
|
|
175
|
+
<LabeledInput
|
|
176
|
+
v-model:value="location"
|
|
177
|
+
v-focus
|
|
178
|
+
label-key="plugins.developer.fields.url"
|
|
179
|
+
@update:value="updateLocation"
|
|
180
|
+
/>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
<div class="custom mt-10">
|
|
184
|
+
<div class="fields">
|
|
185
|
+
<LabeledInput
|
|
186
|
+
v-model:value="name"
|
|
187
|
+
label-key="plugins.developer.fields.name"
|
|
188
|
+
@update:value="updateName"
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
<div class="fields mt-10">
|
|
192
|
+
<Checkbox
|
|
193
|
+
v-model:value="persist"
|
|
194
|
+
label-key="plugins.developer.fields.persist"
|
|
195
|
+
/>
|
|
178
196
|
</div>
|
|
179
|
-
<div class="
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
</
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
</div>
|
|
193
|
-
<div class="dialog-buttons mt-20">
|
|
194
|
-
<button
|
|
195
|
-
class="btn role-secondary"
|
|
196
|
-
data-testid="dev-install-ext-modal-cancel-btn"
|
|
197
|
-
@click="closeDialog()"
|
|
198
|
-
>
|
|
199
|
-
{{ t('generic.cancel') }}
|
|
200
|
-
</button>
|
|
201
|
-
<AsyncButton
|
|
202
|
-
mode="load"
|
|
203
|
-
data-testid="dev-install-ext-modal-install-btn"
|
|
204
|
-
@click="loadPlugin"
|
|
205
|
-
/>
|
|
206
|
-
</div>
|
|
197
|
+
<div class="dialog-buttons mt-20">
|
|
198
|
+
<button
|
|
199
|
+
class="btn role-secondary"
|
|
200
|
+
data-testid="dev-install-ext-modal-cancel-btn"
|
|
201
|
+
@click="closeDialog()"
|
|
202
|
+
>
|
|
203
|
+
{{ t('generic.cancel') }}
|
|
204
|
+
</button>
|
|
205
|
+
<AsyncButton
|
|
206
|
+
mode="load"
|
|
207
|
+
data-testid="dev-install-ext-modal-install-btn"
|
|
208
|
+
@click="loadPlugin"
|
|
209
|
+
/>
|
|
207
210
|
</div>
|
|
208
211
|
</div>
|
|
209
|
-
</
|
|
212
|
+
</div>
|
|
210
213
|
</template>
|
|
211
214
|
|
|
212
215
|
<style lang="scss" scoped>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { Card } from '@components/Card';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'PromptRemove',
|
|
6
|
+
|
|
7
|
+
emits: ['disable', 'close'],
|
|
8
|
+
|
|
9
|
+
components: { Card },
|
|
10
|
+
props: {
|
|
11
|
+
/**
|
|
12
|
+
* Inherited global identifier prefix for tests
|
|
13
|
+
* Define a term based on the parent component to avoid conflicts on multiple components
|
|
14
|
+
*/
|
|
15
|
+
componentTestid: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: 'disable-auth-provider'
|
|
18
|
+
},
|
|
19
|
+
disableCb: {
|
|
20
|
+
type: Function,
|
|
21
|
+
default: () => {}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
methods: {
|
|
25
|
+
close() {
|
|
26
|
+
this.$emit('close');
|
|
27
|
+
},
|
|
28
|
+
disable() {
|
|
29
|
+
this.disableCb();
|
|
30
|
+
this.$emit('close');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<Card
|
|
38
|
+
class="disable-auth-provider"
|
|
39
|
+
:show-highlight-border="false"
|
|
40
|
+
>
|
|
41
|
+
<template #title>
|
|
42
|
+
<h4 class="text-default-text">
|
|
43
|
+
{{ t('promptRemove.title') }}
|
|
44
|
+
</h4>
|
|
45
|
+
</template>
|
|
46
|
+
<template #body>
|
|
47
|
+
<div class="mb-10">
|
|
48
|
+
<p v-clean-html="t('promptRemove.attemptingToRemoveAuthConfig', null, true)" />
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
<template #actions>
|
|
52
|
+
<button
|
|
53
|
+
class="btn role-secondary"
|
|
54
|
+
@click="close"
|
|
55
|
+
>
|
|
56
|
+
{{ t('generic.cancel') }}
|
|
57
|
+
</button>
|
|
58
|
+
<div class="spacer" />
|
|
59
|
+
<button
|
|
60
|
+
class="btn role-primary bg-error ml-10"
|
|
61
|
+
:data-testid="componentTestid + '-confirm-button'"
|
|
62
|
+
@click="disable"
|
|
63
|
+
>
|
|
64
|
+
{{ t('generic.disable') }}
|
|
65
|
+
</button>
|
|
66
|
+
</template>
|
|
67
|
+
</Card>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<style lang='scss'>
|
|
71
|
+
.disable-auth-provider {
|
|
72
|
+
&.card-container {
|
|
73
|
+
box-shadow: none;
|
|
74
|
+
}
|
|
75
|
+
#confirm {
|
|
76
|
+
width: 90%;
|
|
77
|
+
margin-left: 3px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.remove-modal {
|
|
81
|
+
border-radius: var(--border-radius);
|
|
82
|
+
overflow: scroll;
|
|
83
|
+
max-height: 100vh;
|
|
84
|
+
& ::-webkit-scrollbar-corner {
|
|
85
|
+
background: rgba(0,0,0,0);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.actions {
|
|
90
|
+
text-align: right;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.card-actions {
|
|
94
|
+
display: flex;
|
|
95
|
+
|
|
96
|
+
.spacer {
|
|
97
|
+
flex: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</style>
|
package/dialog/DrainNode.vue
CHANGED
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
{{ t('drainNode.titleMultiple', { count: kubeNodes.length }) }}
|
|
138
138
|
</template>
|
|
139
139
|
<template v-else>
|
|
140
|
-
{{ t('drainNode.titleOne', { name: kubeNodes[0]
|
|
140
|
+
{{ t('drainNode.titleOne', { name: kubeNodes[0]?.name }, true) }}
|
|
141
141
|
</template>
|
|
142
142
|
</h4>
|
|
143
143
|
</template>
|