@rancher/shell 3.0.5-rc.1 → 3.0.5-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/data/aws-regions.json +2 -0
- package/assets/images/providers/sks.svg +1 -0
- package/assets/styles/base/_helpers.scss +4 -0
- package/assets/styles/base/_variables.scss +1 -0
- package/assets/styles/global/_layout.scss +0 -1
- package/assets/translations/en-us.yaml +92 -34
- package/assets/translations/zh-hans.yaml +4 -13
- package/chart/monitoring/index.vue +4 -2
- package/components/ActionDropdownShell.vue +71 -0
- package/components/AppModal.vue +18 -4
- package/components/AsyncButton.vue +2 -0
- package/components/CodeMirror.vue +3 -3
- package/components/CommunityLinks.vue +3 -58
- package/components/CruResource.vue +109 -16
- package/components/ExplorerProjectsNamespaces.vue +19 -6
- package/components/FixedBanner.vue +19 -5
- package/components/GlobalRoleBindings.vue +5 -1
- package/components/GrowlManager.vue +1 -0
- package/components/LandingPagePreference.vue +2 -0
- package/components/LocaleSelector.vue +1 -1
- package/components/ModalManager.vue +55 -0
- package/components/PaginatedResourceTable.vue +7 -0
- package/components/PromptModal.vue +47 -8
- package/components/ResourceDetail/Masthead.vue +38 -13
- package/components/ResourceDetail/__tests__/Masthead.test.ts +5 -1
- package/components/ResourceDetail/index.vue +47 -12
- package/components/ResourceList/index.vue +2 -1
- package/components/ResourceTable.vue +54 -19
- package/components/SideNav.vue +5 -1
- package/components/SlideInPanelManager.vue +125 -0
- package/components/SortableTable/THead.vue +5 -2
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +54 -40
- package/components/SortableTable/paging.js +16 -19
- package/components/SortableTable/selection.js +1 -12
- package/components/Tabbed/index.vue +6 -0
- package/components/Wizard.vue +2 -2
- package/components/__tests__/AsyncButton.test.ts +39 -0
- package/components/__tests__/CruResource.test.ts +63 -0
- package/components/__tests__/ModalManager.spec.ts +176 -0
- package/components/__tests__/PromptModal.test.ts +146 -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/login/ldap.vue +1 -1
- package/components/fleet/FleetResources.vue +21 -6
- package/components/form/ArrayList.vue +138 -118
- package/components/form/BannerSettings.vue +149 -85
- package/components/form/ColorInput.vue +35 -6
- package/components/form/EnvVars.vue +1 -0
- package/components/form/KeyValue.vue +10 -7
- package/components/form/LabeledSelect.vue +25 -23
- package/components/form/MatchExpressions.vue +9 -2
- package/components/form/NameNsDescription.vue +6 -2
- package/components/form/NotificationSettings.vue +15 -1
- package/components/form/Password.vue +1 -0
- package/components/form/Probe.vue +1 -0
- package/components/form/ResourceSelector.vue +26 -23
- package/components/form/ResourceTabs/index.vue +2 -1
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +15 -34
- package/components/form/SSHKnownHosts/index.vue +14 -11
- package/components/form/Select.vue +8 -15
- package/components/form/UnitInput.vue +13 -0
- package/components/form/ValueFromResource.vue +12 -12
- package/components/form/__tests__/ArrayList.test.ts +34 -2
- package/components/form/__tests__/ColorInput.test.ts +35 -0
- package/components/form/__tests__/KeyValue.test.ts +36 -0
- package/components/form/__tests__/LabeledSelect.test.ts +73 -0
- package/components/form/__tests__/SSHKnownHosts.test.ts +11 -2
- package/components/form/__tests__/Select.test.ts +34 -1
- package/components/form/__tests__/UnitInput.test.ts +23 -1
- package/components/formatter/ClusterLink.vue +5 -8
- package/components/formatter/Description.vue +30 -0
- package/components/formatter/__tests__/ClusterLink.test.ts +2 -32
- package/components/nav/Group.vue +12 -4
- package/components/nav/Header.vue +16 -43
- package/components/nav/NamespaceFilter.vue +134 -86
- package/components/nav/TopLevelMenu.vue +4 -5
- package/components/nav/WindowManager/ContainerLogs.vue +87 -61
- package/components/nav/WindowManager/ContainerLogsActions.vue +76 -0
- package/components/nav/WindowManager/index.vue +1 -0
- package/components/templates/default.vue +6 -3
- package/components/templates/home.vue +6 -0
- package/components/templates/plain.vue +6 -3
- package/composables/focusTrap.ts +12 -4
- package/config/product/explorer.js +16 -13
- package/config/product/manager.js +1 -28
- package/config/settings.ts +11 -13
- package/config/store.js +4 -0
- package/config/table-headers.js +7 -5
- package/config/uiplugins.js +5 -1
- package/core/types.ts +7 -6
- package/detail/catalog.cattle.io.app.vue +5 -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 +85 -9
- package/detail/service.vue +0 -1
- package/detail/workload/index.vue +21 -34
- package/dialog/AddCustomBadgeDialog.vue +0 -1
- package/{pages/c/_cluster/uiplugins/AddExtensionRepos.vue → dialog/AddExtensionReposDialog.vue} +72 -42
- package/dialog/AssignToDialog.vue +176 -0
- package/dialog/ChangePasswordDialog.vue +106 -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} +83 -65
- package/dialog/FeatureFlagListDialog.vue +288 -0
- package/dialog/ForceMachineRemoveDialog.vue +1 -1
- 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 -62
- 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__/service.test.ts +2 -1
- package/edit/auth/azuread.vue +1 -1
- package/edit/auth/github.vue +1 -1
- package/edit/auth/googleoauth.vue +1 -1
- package/edit/auth/ldap/index.vue +1 -1
- package/edit/auth/oidc.vue +1 -1
- package/edit/auth/saml.vue +1 -1
- package/edit/cloudcredential.vue +24 -10
- package/edit/management.cattle.io.user.vue +28 -3
- package/edit/namespace.vue +1 -4
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -14
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +57 -62
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +3 -14
- package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.test.ts +72 -41
- package/edit/networking.k8s.io.networkpolicy/__tests__/utils/mock.json +17 -1
- package/edit/networking.k8s.io.networkpolicy/index.vue +18 -30
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +26 -10
- 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/index.vue +21 -73
- package/edit/provisioning.cattle.io.cluster/rke2.vue +24 -7
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +5 -3
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +4 -1
- package/edit/service.vue +13 -28
- package/initialize/install-plugins.js +2 -1
- package/list/harvesterhci.io.management.cluster.vue +4 -1
- package/list/management.cattle.io.feature.vue +4 -288
- package/list/workload.vue +6 -1
- package/machine-config/azure.vue +16 -4
- package/mixins/resource-fetch-api-pagination.js +55 -43
- package/mixins/resource-fetch.js +14 -5
- package/mixins/vue-select-overrides.js +0 -4
- package/models/__tests__/workload.test.ts +1 -0
- package/models/cluster/node.js +1 -0
- package/models/cluster.js +32 -2
- package/models/fleet.cattle.io.cluster.js +8 -2
- package/models/fleet.cattle.io.gitrepo.js +8 -34
- package/models/management.cattle.io.cluster.js +0 -20
- package/models/management.cattle.io.feature.js +7 -1
- package/models/management.cattle.io.node.js +7 -22
- package/models/management.cattle.io.nodepool.js +12 -0
- package/models/namespace.js +12 -1
- package/models/provisioning.cattle.io.cluster.js +18 -64
- package/models/service.js +24 -9
- package/models/workload.js +70 -31
- package/package.json +1 -1
- package/pages/about.vue +13 -3
- package/pages/account/index.vue +12 -5
- package/pages/auth/login.vue +7 -4
- package/pages/auth/setup.vue +1 -0
- package/pages/auth/verify.vue +9 -7
- package/pages/c/_cluster/apps/charts/install.vue +25 -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 +28 -15
- package/pages/c/_cluster/istio/index.vue +2 -2
- package/pages/c/_cluster/longhorn/index.vue +3 -3
- 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 +60 -5
- package/pages/c/_cluster/settings/performance.vue +7 -26
- 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 +12 -9
- package/pages/fail-whale.vue +8 -5
- package/pages/home.vue +11 -52
- package/pages/prefs.vue +7 -6
- package/plugins/clean-html.js +2 -0
- package/plugins/dashboard-store/__tests__/actions.test.ts +4 -1
- package/plugins/dashboard-store/actions.js +122 -21
- package/plugins/dashboard-store/getters.js +74 -3
- package/plugins/dashboard-store/mutations.js +10 -5
- package/plugins/dashboard-store/resource-class.js +23 -3
- 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/__tests__/getters.test.ts +18 -11
- package/plugins/steve/__tests__/steve-class.test.ts +1 -0
- package/plugins/steve/actions.js +34 -24
- package/plugins/steve/getters.js +39 -10
- package/plugins/steve/steve-class.js +5 -0
- package/plugins/steve/steve-pagination-utils.ts +199 -37
- package/plugins/steve/worker/web-worker.advanced.js +3 -1
- package/public/index.html +1 -0
- package/rancher-components/Banner/Banner.test.ts +51 -3
- package/rancher-components/Banner/Banner.vue +28 -6
- 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 +51 -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 +75 -35
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +17 -0
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +26 -1
- 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 +17 -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/index.ts +2 -0
- 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 -13
- package/scripts/typegen.sh +2 -4
- package/store/action-menu.js +26 -56
- package/store/features.js +0 -1
- package/store/index.js +5 -0
- package/store/modal.ts +71 -0
- package/store/slideInPanel.ts +47 -0
- package/store/type-map.js +8 -1
- package/store/type-map.utils.ts +49 -6
- package/types/fleet.d.ts +1 -1
- 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/kube/kube-api.ts +22 -0
- package/types/resources/fleet.d.ts +0 -14
- package/types/resources/settings.d.ts +0 -4
- package/types/shell/index.d.ts +375 -306
- package/types/store/dashboard-store.types.ts +24 -1
- package/types/store/pagination.types.ts +19 -2
- 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 +24 -20
- package/utils/fleet.ts +15 -73
- package/utils/grafana.js +1 -0
- package/utils/object.js +36 -5
- package/utils/pagination-utils.ts +6 -2
- package/utils/perf-setting.utils.ts +28 -0
- package/utils/selector-typed.ts +205 -0
- package/utils/selector.js +29 -6
- package/utils/uiplugins.ts +10 -6
- package/utils/v-sphere.ts +5 -1
- package/utils/validators/formRules/__tests__/index.test.ts +10 -1
- package/utils/validators/formRules/index.ts +27 -3
- package/components/AssignTo.vue +0 -199
- package/components/DisableAuthProviderModal.vue +0 -115
- package/components/MoveModal.vue +0 -167
- package/components/PromptChangePassword.vue +0 -123
- package/components/fleet/FleetBundleResources.vue +0 -86
- package/components/formatter/RKETemplateName.vue +0 -37
- package/dialog/SaveAsRKETemplateDialog.vue +0 -139
- package/types/vue-shim.d +0 -20
|
@@ -10,7 +10,6 @@ import { allHash } from '@shell/utils/promise';
|
|
|
10
10
|
import ResourceManager from '@shell/mixins/resource-manager';
|
|
11
11
|
|
|
12
12
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
13
|
-
import AppModal from '@shell/components/AppModal';
|
|
14
13
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
15
14
|
import Loading from '@shell/components/Loading.vue';
|
|
16
15
|
import { Banner } from '@components/Banner';
|
|
@@ -98,14 +97,41 @@ const initialState = () => {
|
|
|
98
97
|
};
|
|
99
98
|
|
|
100
99
|
export default {
|
|
101
|
-
emits: ['
|
|
100
|
+
emits: ['close'],
|
|
102
101
|
|
|
103
102
|
components: {
|
|
104
|
-
AsyncButton, Banner, LabeledInput, Loading, LabeledSelect
|
|
103
|
+
AsyncButton, Banner, LabeledInput, Loading, LabeledSelect
|
|
105
104
|
},
|
|
106
105
|
|
|
107
106
|
mixins: [ResourceManager],
|
|
108
107
|
|
|
108
|
+
props: {
|
|
109
|
+
/**
|
|
110
|
+
* Callback to trigger refresh banner on extensions screen
|
|
111
|
+
*/
|
|
112
|
+
refresh: {
|
|
113
|
+
type: Function,
|
|
114
|
+
default: () => {},
|
|
115
|
+
required: true
|
|
116
|
+
},
|
|
117
|
+
/**
|
|
118
|
+
* Callback when modal is closed
|
|
119
|
+
*/
|
|
120
|
+
closed: {
|
|
121
|
+
type: Function,
|
|
122
|
+
default: () => {},
|
|
123
|
+
required: true
|
|
124
|
+
},
|
|
125
|
+
resources: {
|
|
126
|
+
type: Array,
|
|
127
|
+
default: () => []
|
|
128
|
+
},
|
|
129
|
+
registerBackgroundClosing: {
|
|
130
|
+
type: Function,
|
|
131
|
+
default: () => {}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
|
|
109
135
|
async fetch() {
|
|
110
136
|
const hash = {};
|
|
111
137
|
|
|
@@ -126,9 +152,7 @@ export default {
|
|
|
126
152
|
data() {
|
|
127
153
|
return {
|
|
128
154
|
...initialState(),
|
|
129
|
-
secondaryResourceData: null
|
|
130
|
-
showModal: false,
|
|
131
|
-
returnFocusSelector: '[data-testid="extensions-catalog-load-dialog"]'
|
|
155
|
+
secondaryResourceData: null
|
|
132
156
|
};
|
|
133
157
|
},
|
|
134
158
|
|
|
@@ -163,18 +187,15 @@ export default {
|
|
|
163
187
|
};
|
|
164
188
|
},
|
|
165
189
|
|
|
166
|
-
showDialog() {
|
|
167
|
-
this.showModal = true;
|
|
168
|
-
},
|
|
169
|
-
|
|
170
190
|
closeDialog(result) {
|
|
171
|
-
this.
|
|
172
|
-
this.$emit('closed', result);
|
|
191
|
+
this.closed(result);
|
|
173
192
|
|
|
174
193
|
// Reset state
|
|
175
194
|
Object.assign(this.$data, initialState());
|
|
176
195
|
this.secondaryResourceData = this.secondaryResourceDataConfig();
|
|
177
196
|
this.resourceManagerFetchSecondaryResources(this.secondaryResourceData);
|
|
197
|
+
|
|
198
|
+
this.$emit('close');
|
|
178
199
|
},
|
|
179
200
|
|
|
180
201
|
async loadImage(btnCb) {
|
|
@@ -205,7 +226,8 @@ export default {
|
|
|
205
226
|
message: this.t('plugins.manageCatalog.imageLoad.success.message'),
|
|
206
227
|
timeout: 4000,
|
|
207
228
|
}, { root: true });
|
|
208
|
-
|
|
229
|
+
|
|
230
|
+
this.refresh();
|
|
209
231
|
}
|
|
210
232
|
} else {
|
|
211
233
|
throw new Error('Unable to determine image name');
|
|
@@ -430,90 +452,80 @@ export default {
|
|
|
430
452
|
</script>
|
|
431
453
|
|
|
432
454
|
<template>
|
|
433
|
-
<
|
|
434
|
-
v-if="
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
@close="closeDialog()"
|
|
455
|
+
<Loading
|
|
456
|
+
v-if="$fetchState.loading"
|
|
457
|
+
mode="relative"
|
|
458
|
+
/>
|
|
459
|
+
<div
|
|
460
|
+
v-else
|
|
461
|
+
class="plugin-install-dialog"
|
|
441
462
|
>
|
|
442
|
-
<
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
>
|
|
450
|
-
<div>
|
|
451
|
-
<h4>
|
|
452
|
-
{{ t('plugins.manageCatalog.imageLoad.load') }}
|
|
453
|
-
</h4>
|
|
454
|
-
<p>
|
|
455
|
-
{{ t('plugins.manageCatalog.imageLoad.prompt') }}
|
|
456
|
-
</p>
|
|
457
|
-
|
|
458
|
-
<div class="custom mt-10">
|
|
459
|
-
<Banner
|
|
460
|
-
color="info"
|
|
461
|
-
:label="t('plugins.manageCatalog.imageLoad.banner')"
|
|
462
|
-
class="mt-10"
|
|
463
|
-
/>
|
|
464
|
-
</div>
|
|
463
|
+
<div>
|
|
464
|
+
<h4>
|
|
465
|
+
{{ t('plugins.manageCatalog.imageLoad.load') }}
|
|
466
|
+
</h4>
|
|
467
|
+
<p>
|
|
468
|
+
{{ t('plugins.manageCatalog.imageLoad.prompt') }}
|
|
469
|
+
</p>
|
|
465
470
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
/>
|
|
473
|
-
</div>
|
|
474
|
-
</div>
|
|
475
|
-
<div class="custom mt-10">
|
|
476
|
-
<div class="fields">
|
|
477
|
-
<LabeledSelect
|
|
478
|
-
v-model:value="imagePullSecrets"
|
|
479
|
-
:label="t('plugins.manageCatalog.imageLoad.fields.imagePullSecrets.label')"
|
|
480
|
-
:tooltip="t('plugins.manageCatalog.imageLoad.fields.imagePullSecrets.tooltip')"
|
|
481
|
-
:multiple="true"
|
|
482
|
-
:taggable="true"
|
|
483
|
-
:options="imagePullNamespacedSecrets"
|
|
484
|
-
option-label="metadata.name"
|
|
485
|
-
:reduce="service => service.metadata.name"
|
|
486
|
-
/>
|
|
487
|
-
<Banner
|
|
488
|
-
color="warning"
|
|
489
|
-
class="mt-10"
|
|
490
|
-
>
|
|
491
|
-
<span v-clean-html="t('plugins.manageCatalog.imageLoad.fields.secrets.banner', {}, true)" />
|
|
492
|
-
</Banner>
|
|
493
|
-
</div>
|
|
494
|
-
</div>
|
|
471
|
+
<div class="custom mt-10">
|
|
472
|
+
<Banner
|
|
473
|
+
color="info"
|
|
474
|
+
:label="t('plugins.manageCatalog.imageLoad.banner')"
|
|
475
|
+
class="mt-10"
|
|
476
|
+
/>
|
|
495
477
|
</div>
|
|
496
478
|
|
|
497
479
|
<div class="custom mt-10">
|
|
498
480
|
<div class="fields">
|
|
499
|
-
<
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
481
|
+
<LabeledInput
|
|
482
|
+
v-model:value.trim="deploymentValues.spec.template.spec.containers[0].image"
|
|
483
|
+
label-key="plugins.manageCatalog.imageLoad.fields.image.label"
|
|
484
|
+
placeholder-key="plugins.manageCatalog.imageLoad.fields.image.placeholder"
|
|
485
|
+
/>
|
|
486
|
+
</div>
|
|
487
|
+
</div>
|
|
488
|
+
<div class="custom mt-10">
|
|
489
|
+
<div class="fields">
|
|
490
|
+
<LabeledSelect
|
|
491
|
+
v-model:value="imagePullSecrets"
|
|
492
|
+
:label="t('plugins.manageCatalog.imageLoad.fields.imagePullSecrets.label')"
|
|
493
|
+
:tooltip="t('plugins.manageCatalog.imageLoad.fields.imagePullSecrets.tooltip')"
|
|
494
|
+
:multiple="true"
|
|
495
|
+
:taggable="true"
|
|
496
|
+
:options="imagePullNamespacedSecrets"
|
|
497
|
+
option-label="metadata.name"
|
|
498
|
+
:reduce="service => service.metadata.name"
|
|
499
|
+
/>
|
|
500
|
+
<Banner
|
|
501
|
+
color="warning"
|
|
502
|
+
class="mt-10"
|
|
503
|
+
>
|
|
504
|
+
<span v-clean-html="t('plugins.manageCatalog.imageLoad.fields.secrets.banner', {}, true)" />
|
|
505
|
+
</Banner>
|
|
506
|
+
</div>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
|
|
510
|
+
<div class="custom mt-10">
|
|
511
|
+
<div class="fields">
|
|
512
|
+
<div class="dialog-buttons mt-20">
|
|
513
|
+
<button
|
|
514
|
+
class="btn role-secondary"
|
|
515
|
+
data-testid="image-load-ext-modal-cancel-btn"
|
|
516
|
+
@click="closeDialog()"
|
|
517
|
+
>
|
|
518
|
+
{{ t('generic.cancel') }}
|
|
519
|
+
</button>
|
|
520
|
+
<AsyncButton
|
|
521
|
+
mode="load"
|
|
522
|
+
data-testid="image-load-ext-modal-install-btn"
|
|
523
|
+
@click="loadImage"
|
|
524
|
+
/>
|
|
513
525
|
</div>
|
|
514
526
|
</div>
|
|
515
527
|
</div>
|
|
516
|
-
</
|
|
528
|
+
</div>
|
|
517
529
|
</template>
|
|
518
530
|
|
|
519
531
|
<style lang="scss" scoped>
|
|
@@ -6,12 +6,46 @@ import { UI_PLUGIN_LABELS, UI_PLUGIN_NAMESPACE } from '@shell/config/uiplugins';
|
|
|
6
6
|
import { allHash } from '@shell/utils/promise';
|
|
7
7
|
|
|
8
8
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
9
|
-
import AppModal from '@shell/components/AppModal.vue';
|
|
10
9
|
|
|
11
10
|
export default {
|
|
12
|
-
emits: ['
|
|
13
|
-
|
|
14
|
-
components: { AsyncButton
|
|
11
|
+
emits: ['close'],
|
|
12
|
+
|
|
13
|
+
components: { AsyncButton },
|
|
14
|
+
|
|
15
|
+
props: {
|
|
16
|
+
/**
|
|
17
|
+
* Catalog object
|
|
18
|
+
*/
|
|
19
|
+
catalog: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => {},
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* Callback to trigger refresh banner on extensions screen
|
|
26
|
+
*/
|
|
27
|
+
refresh: {
|
|
28
|
+
type: Function,
|
|
29
|
+
default: () => {},
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* Callback when modal is closed
|
|
34
|
+
*/
|
|
35
|
+
closed: {
|
|
36
|
+
type: Function,
|
|
37
|
+
default: () => {},
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
resources: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
},
|
|
44
|
+
registerBackgroundClosing: {
|
|
45
|
+
type: Function,
|
|
46
|
+
default: () => {}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
15
49
|
|
|
16
50
|
async fetch() {
|
|
17
51
|
if ( this.$store.getters['management/schemaFor'](UI_PLUGIN) ) {
|
|
@@ -23,11 +57,8 @@ export default {
|
|
|
23
57
|
|
|
24
58
|
data() {
|
|
25
59
|
return {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
plugins: null,
|
|
29
|
-
showModal: false,
|
|
30
|
-
returnFocusSelector: '[data-testid="extensions-catalog-load-dialog"]'
|
|
60
|
+
busy: false,
|
|
61
|
+
plugins: null,
|
|
31
62
|
};
|
|
32
63
|
},
|
|
33
64
|
|
|
@@ -40,19 +71,14 @@ export default {
|
|
|
40
71
|
},
|
|
41
72
|
|
|
42
73
|
methods: {
|
|
43
|
-
showDialog(catalog) {
|
|
44
|
-
this.catalog = catalog;
|
|
45
|
-
this.busy = false;
|
|
46
|
-
this.showModal = true;
|
|
47
|
-
},
|
|
48
|
-
|
|
49
74
|
closeDialog(result) {
|
|
50
|
-
this.
|
|
51
|
-
this.$emit('closed', result);
|
|
75
|
+
this.closed(result);
|
|
52
76
|
|
|
53
77
|
if ( result ) {
|
|
54
|
-
this
|
|
78
|
+
this.refresh();
|
|
55
79
|
}
|
|
80
|
+
|
|
81
|
+
this.$emit('close');
|
|
56
82
|
},
|
|
57
83
|
|
|
58
84
|
async uninstall() {
|
|
@@ -76,7 +102,6 @@ export default {
|
|
|
76
102
|
if ( pluginApps.length ) {
|
|
77
103
|
try {
|
|
78
104
|
pluginApps.forEach((app) => {
|
|
79
|
-
this.$emit('update', app.name, 'uninstall');
|
|
80
105
|
app.remove();
|
|
81
106
|
});
|
|
82
107
|
} catch (e) {
|
|
@@ -94,18 +119,24 @@ export default {
|
|
|
94
119
|
},
|
|
95
120
|
|
|
96
121
|
async removeCatalogResources(catalog) {
|
|
97
|
-
|
|
98
|
-
|
|
122
|
+
if ( catalog.name ) {
|
|
123
|
+
const namespace = UI_PLUGIN_NAMESPACE;
|
|
124
|
+
// of type KubeLabelSelector
|
|
125
|
+
const labelSelector = { matchLabels: { [UI_PLUGIN_LABELS.CATALOG_IMAGE]: catalog.name } };
|
|
99
126
|
|
|
100
|
-
if ( selector ) {
|
|
101
127
|
const hash = await allHash({
|
|
102
|
-
deployment: this.$store.dispatch('management/
|
|
103
|
-
type:
|
|
128
|
+
deployment: this.$store.dispatch('management/findLabelSelector', {
|
|
129
|
+
type: WORKLOAD_TYPES.DEPLOYMENT,
|
|
130
|
+
matching: { namespace, labelSelector }
|
|
104
131
|
}),
|
|
105
|
-
service: this.$store.dispatch('management/
|
|
106
|
-
type:
|
|
132
|
+
service: this.$store.dispatch('management/findLabelSelector', {
|
|
133
|
+
type: SERVICE,
|
|
134
|
+
matching: { namespace, labelSelector }
|
|
107
135
|
}),
|
|
108
|
-
repo: this.$store.dispatch('management/
|
|
136
|
+
repo: this.$store.dispatch('management/findLabelSelector', {
|
|
137
|
+
type: CATALOG.CLUSTER_REPO,
|
|
138
|
+
matching: { labelSelector }
|
|
139
|
+
})
|
|
109
140
|
});
|
|
110
141
|
|
|
111
142
|
for ( const resource of Object.keys(hash) ) {
|
|
@@ -120,46 +151,33 @@ export default {
|
|
|
120
151
|
</script>
|
|
121
152
|
|
|
122
153
|
<template>
|
|
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
|
-
:disabled="busy"
|
|
148
|
-
class="btn role-secondary"
|
|
149
|
-
data-testid="uninstall-ext-modal-cancel-btn"
|
|
150
|
-
@click="closeDialog(false)"
|
|
151
|
-
>
|
|
152
|
-
{{ t('generic.cancel') }}
|
|
153
|
-
</button>
|
|
154
|
-
<AsyncButton
|
|
155
|
-
mode="uninstall"
|
|
156
|
-
data-testid="uninstall-ext-modal-uninstall-btn"
|
|
157
|
-
@click="uninstall()"
|
|
158
|
-
/>
|
|
159
|
-
</div>
|
|
154
|
+
<div class="plugin-install-dialog">
|
|
155
|
+
<h4 class="mt-10">
|
|
156
|
+
{{ t('plugins.uninstall.title', { name: catalog.name }) }}
|
|
157
|
+
</h4>
|
|
158
|
+
<div class="mt-10 dialog-panel">
|
|
159
|
+
<div class="dialog-info">
|
|
160
|
+
<p>
|
|
161
|
+
{{ t('plugins.uninstall.catalog') }}
|
|
162
|
+
</p>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="dialog-buttons">
|
|
165
|
+
<button
|
|
166
|
+
:disabled="busy"
|
|
167
|
+
class="btn role-secondary"
|
|
168
|
+
data-testid="uninstall-ext-modal-cancel-btn"
|
|
169
|
+
@click="closeDialog(false)"
|
|
170
|
+
>
|
|
171
|
+
{{ t('generic.cancel') }}
|
|
172
|
+
</button>
|
|
173
|
+
<AsyncButton
|
|
174
|
+
mode="uninstall"
|
|
175
|
+
data-testid="uninstall-ext-modal-uninstall-btn"
|
|
176
|
+
@click="uninstall()"
|
|
177
|
+
/>
|
|
160
178
|
</div>
|
|
161
179
|
</div>
|
|
162
|
-
</
|
|
180
|
+
</div>
|
|
163
181
|
</template>
|
|
164
182
|
|
|
165
183
|
<style lang="scss" scoped>
|