@rancher/shell 0.5.3 → 1.2.1
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 +407 -468
- 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
|
@@ -82,13 +82,6 @@ export default Vue.extend({
|
|
|
82
82
|
return {} as ErrorMessages;
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
|
-
/**
|
|
86
|
-
* Enables bulk addition and defines the delimiter to split the input string.
|
|
87
|
-
*/
|
|
88
|
-
bulkAdditionDelimiter: {
|
|
89
|
-
type: RegExp,
|
|
90
|
-
default: null,
|
|
91
|
-
}
|
|
92
85
|
},
|
|
93
86
|
data() {
|
|
94
87
|
return {
|
|
@@ -132,9 +125,13 @@ export default Vue.extend({
|
|
|
132
125
|
},
|
|
133
126
|
|
|
134
127
|
methods: {
|
|
135
|
-
onChange(value: string
|
|
128
|
+
onChange(value: string) {
|
|
136
129
|
this.value = value;
|
|
137
|
-
|
|
130
|
+
|
|
131
|
+
const items = [
|
|
132
|
+
...this.items,
|
|
133
|
+
this.value
|
|
134
|
+
];
|
|
138
135
|
|
|
139
136
|
this.toggleError(
|
|
140
137
|
'duplicate',
|
|
@@ -324,7 +321,10 @@ export default Vue.extend({
|
|
|
324
321
|
const value = this.value?.trim();
|
|
325
322
|
|
|
326
323
|
if (value) {
|
|
327
|
-
const items =
|
|
324
|
+
const items = [
|
|
325
|
+
...this.items,
|
|
326
|
+
value,
|
|
327
|
+
];
|
|
328
328
|
|
|
329
329
|
if (!hasDuplicatedStrings(items, this.caseSensitive)) {
|
|
330
330
|
this.updateItems(items);
|
|
@@ -343,8 +343,12 @@ export default Vue.extend({
|
|
|
343
343
|
const value = this.value?.trim();
|
|
344
344
|
|
|
345
345
|
if (value) {
|
|
346
|
-
const
|
|
347
|
-
const
|
|
346
|
+
const items = [...this.items];
|
|
347
|
+
const index = findStringIndex(items, item, false);
|
|
348
|
+
|
|
349
|
+
if (index !== -1) {
|
|
350
|
+
items[index] = value;
|
|
351
|
+
}
|
|
348
352
|
|
|
349
353
|
if (!hasDuplicatedStrings(items, this.caseSensitive)) {
|
|
350
354
|
this.updateItems(items);
|
|
@@ -356,49 +360,6 @@ export default Vue.extend({
|
|
|
356
360
|
}
|
|
357
361
|
},
|
|
358
362
|
|
|
359
|
-
/**
|
|
360
|
-
* Add a new or update an exiting item in the items list.
|
|
361
|
-
*
|
|
362
|
-
* @param items The current items list.
|
|
363
|
-
* @param value The new value to be added.
|
|
364
|
-
* @param index The list index of the item to be updated (optional).
|
|
365
|
-
* @returns Updated items list.
|
|
366
|
-
*/
|
|
367
|
-
addValueToItems(items: string[], value: string, index?: number): string[] {
|
|
368
|
-
const updatedItems = [...items];
|
|
369
|
-
|
|
370
|
-
// Add new item
|
|
371
|
-
if (index === undefined) {
|
|
372
|
-
if (this.bulkAdditionDelimiter && value.search(this.bulkAdditionDelimiter) >= 0) {
|
|
373
|
-
updatedItems.push(...this.splitBulkValue(value));
|
|
374
|
-
} else {
|
|
375
|
-
updatedItems.push(value);
|
|
376
|
-
}
|
|
377
|
-
} else { // Update existing item
|
|
378
|
-
if (this.bulkAdditionDelimiter && value.search(this.bulkAdditionDelimiter) >= 0) {
|
|
379
|
-
updatedItems.splice(index, 1, ...this.splitBulkValue(value));
|
|
380
|
-
} else {
|
|
381
|
-
updatedItems[index] = value;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
return updatedItems;
|
|
386
|
-
},
|
|
387
|
-
|
|
388
|
-
/**
|
|
389
|
-
* Split the value by the defined delimiter and remove empty strings.
|
|
390
|
-
*
|
|
391
|
-
* @param value The value to be split.
|
|
392
|
-
* @returns Array containing split values.
|
|
393
|
-
*/
|
|
394
|
-
splitBulkValue(value: string): string[] {
|
|
395
|
-
return value
|
|
396
|
-
.split(this.bulkAdditionDelimiter)
|
|
397
|
-
.filter((item) => {
|
|
398
|
-
return item.trim().length > 0;
|
|
399
|
-
});
|
|
400
|
-
},
|
|
401
|
-
|
|
402
363
|
/**
|
|
403
364
|
* Remove an item from items list
|
|
404
365
|
*/
|
|
@@ -432,7 +393,7 @@ export default Vue.extend({
|
|
|
432
393
|
@dblclick="onClickEmptyBody()"
|
|
433
394
|
>
|
|
434
395
|
<div
|
|
435
|
-
v-for="
|
|
396
|
+
v-for="item in items"
|
|
436
397
|
:key="item"
|
|
437
398
|
:ref="item"
|
|
438
399
|
:class="{
|
|
@@ -460,7 +421,7 @@ export default Vue.extend({
|
|
|
460
421
|
:data-testid="`item-edit-${item}`"
|
|
461
422
|
class="edit-input static"
|
|
462
423
|
:value="value != null ? value : item"
|
|
463
|
-
@input="onChange($event
|
|
424
|
+
@input="onChange($event)"
|
|
464
425
|
@blur.prevent="updateItem(item)"
|
|
465
426
|
@keydown.native.enter="updateItem(item, !errors.duplicate)"
|
|
466
427
|
/>
|
package/scripts/extension/bundle
CHANGED
|
@@ -16,7 +16,6 @@ REGISTRY="${3}"
|
|
|
16
16
|
REGISTRY_ORG="${4}"
|
|
17
17
|
IMAGE_PREFIX="${5}"
|
|
18
18
|
PUSH="${6}"
|
|
19
|
-
PODMAN_CONTAINER="${7}"
|
|
20
19
|
|
|
21
20
|
PKG_NAME="${PKG}-${PKG_VERSION}"
|
|
22
21
|
|
|
@@ -49,15 +48,12 @@ for d in ${BASE_DIR}/dist-pkg/*; do
|
|
|
49
48
|
cp -R ${BASE_DIR}/dist-pkg/${pkg} ${TMP}/container/plugin
|
|
50
49
|
done
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
else
|
|
56
|
-
RUNTIME="docker"
|
|
57
|
-
fi
|
|
58
|
-
echo -e "Container build: ${RUNTIME}"
|
|
51
|
+
# Build the docker image
|
|
52
|
+
pushd ${TMP}/container > /dev/null
|
|
53
|
+
echo -e "${CYAN}Building container image ...${RESET}"
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
if [ ! -z "${REGISTRY}" ]; then
|
|
56
|
+
REGISTRY=${REGISTRY} ORG=${REGISTRY_ORG} REPO=${IMAGE_PREFIX}${PKG} TAG=${PKG_VERSION} ./scripts/package
|
|
61
57
|
|
|
62
58
|
if [ "${PUSH}" == "--push" ]; then
|
|
63
59
|
echo -e "${CYAN}Pushing container image ...${RESET}"
|
|
@@ -65,22 +61,14 @@ package() {
|
|
|
65
61
|
# Ensure that you do not overwrite production images
|
|
66
62
|
if [[ "${REGISTRY_ORG}" == "rancher" ]]; then
|
|
67
63
|
IMAGE=${REGISTRY}${REGISTRY_ORG}/${IMAGE_PREFIX}${PKG}:${PKG_VERSION}
|
|
68
|
-
if
|
|
64
|
+
if docker manifest inspect 2>&1 1>/dev/null; then
|
|
69
65
|
echo -e "${RED}${BOLD}Cannot overwrite production image ${IMAGE_PREFIX}${PKG} since it already exists${RESET}"
|
|
70
66
|
exit 1
|
|
71
67
|
fi
|
|
72
68
|
fi
|
|
73
69
|
|
|
74
|
-
|
|
70
|
+
docker push ${REGISTRY}${REGISTRY_ORG}/${IMAGE_PREFIX}${PKG}:${PKG_VERSION}
|
|
75
71
|
fi
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
# Build the container image
|
|
79
|
-
pushd ${TMP}/container > /dev/null
|
|
80
|
-
echo -e "${CYAN}Building container image ...${RESET}"
|
|
81
|
-
|
|
82
|
-
if [ ! -z "${REGISTRY}" ]; then
|
|
83
|
-
package
|
|
84
72
|
fi
|
|
85
73
|
|
|
86
74
|
popd > /dev/null
|
|
@@ -5,8 +5,8 @@ source $(dirname $0)/version
|
|
|
5
5
|
|
|
6
6
|
cd $(dirname $0)/..
|
|
7
7
|
|
|
8
|
-
if [[ -z ${ORG} ]] || [[ -z ${REPO} ]] || [[ -z ${TAG} ]]
|
|
9
|
-
echo "Usage: [REGISTRY=] ORG= REPO= TAG=
|
|
8
|
+
if [[ -z ${ORG} ]] || [[ -z ${REPO} ]] || [[ -z ${TAG} ]]; then
|
|
9
|
+
echo "Usage: [REGISTRY=] ORG= REPO= TAG= ./scripts/package"
|
|
10
10
|
exit 1
|
|
11
11
|
fi
|
|
12
12
|
|
|
@@ -19,13 +19,5 @@ if [ -e ${DOCKERFILE}.${ARCH} ]; then
|
|
|
19
19
|
DOCKERFILE=${DOCKERFILE}.${ARCH}
|
|
20
20
|
fi
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if [[ ${RUNTIME} == "podman" ]]; then
|
|
25
|
-
BUILD="$BUILD -v /var/lib/containers:/var/lib/containers ."
|
|
26
|
-
else
|
|
27
|
-
BUILD="$BUILD ."
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
$BUILD
|
|
22
|
+
docker build -f ${DOCKERFILE} -t ${IMAGE} .
|
|
31
23
|
echo Built ${IMAGE}
|
|
@@ -4,8 +4,8 @@ GITHUB_RELEASE_TAG=$1
|
|
|
4
4
|
GITHUB_RUN_ID=$2
|
|
5
5
|
GITHUB_WORKFLOW_TYPE=$3
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
if [[ "${GITHUB_WORKFLOW_TYPE}" == "
|
|
7
|
+
# Check packages for released tag name
|
|
8
|
+
if [[ "${GITHUB_WORKFLOW_TYPE}" == "container" ]]; then
|
|
9
9
|
for d in pkg/*/ ; do
|
|
10
10
|
pkg=$(basename $d)
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ if [[ "${GITHUB_WORKFLOW_TYPE}" == "catalog" ]]; then
|
|
|
19
19
|
fi
|
|
20
20
|
done
|
|
21
21
|
else
|
|
22
|
-
#
|
|
22
|
+
# Check base extension name for tag name
|
|
23
23
|
BASE_EXT=$(jq -r .name package.json)
|
|
24
24
|
EXT_VERSION=$(jq -r .version package.json)
|
|
25
25
|
|
|
@@ -27,4 +27,4 @@ else
|
|
|
27
27
|
echo -e "tag: ${GITHUB_RELEASE_TAG}"
|
|
28
28
|
gh run cancel ${GITHUB_RUN_ID}
|
|
29
29
|
fi
|
|
30
|
-
fi
|
|
30
|
+
fi
|
|
@@ -17,7 +17,6 @@ IMAGE_PREFIX="ui-extension-"
|
|
|
17
17
|
FORCE="false"
|
|
18
18
|
GITHUB_BUILD="true"
|
|
19
19
|
GITHUB_RELEASE_TAG=""
|
|
20
|
-
PODMAN_CONTAINER="false"
|
|
21
20
|
|
|
22
21
|
GITHUB_SOURCE=$(git config --get remote.origin.url | sed -e 's/^git@.*:\([[:graph:]]*\).git/\1/')
|
|
23
22
|
GITHUB_BRANCH="main"
|
|
@@ -34,11 +33,10 @@ usage() {
|
|
|
34
33
|
echo " -r <name> Specify destination container registry for built images"
|
|
35
34
|
echo " -o <name> Specify destination container registry organization for built images"
|
|
36
35
|
echo " -i <prefix> Specify prefix for the built container image (default: 'ui-extension-')"
|
|
37
|
-
echo " -l Specify Podman container build"
|
|
38
36
|
exit 1
|
|
39
37
|
}
|
|
40
38
|
|
|
41
|
-
while getopts "hvr:o:pi:fcb:t:s:
|
|
39
|
+
while getopts "hvr:o:pi:fcb:t:s:" opt; do
|
|
42
40
|
case $opt in
|
|
43
41
|
h)
|
|
44
42
|
usage
|
|
@@ -72,9 +70,6 @@ while getopts "hvr:o:pi:fcb:t:s:l" opt; do
|
|
|
72
70
|
t)
|
|
73
71
|
GITHUB_RELEASE_TAG="${OPTARG}"
|
|
74
72
|
;;
|
|
75
|
-
l)
|
|
76
|
-
PODMAN_CONTAINER="true"
|
|
77
|
-
;;
|
|
78
73
|
*)
|
|
79
74
|
usage
|
|
80
75
|
;;
|
|
@@ -131,11 +126,7 @@ fi
|
|
|
131
126
|
|
|
132
127
|
COMMANDS=("node" "jq" "yq" "git" "helm" "yarn")
|
|
133
128
|
if [ "${GITHUB_BUILD}" == "false" ]; then
|
|
134
|
-
|
|
135
|
-
COMMANDS+=("podman")
|
|
136
|
-
else
|
|
137
|
-
COMMANDS+=("docker")
|
|
138
|
-
fi
|
|
129
|
+
COMMANDS+=("docker")
|
|
139
130
|
fi
|
|
140
131
|
|
|
141
132
|
HAVE_COMMANDS="true"
|
|
@@ -181,12 +172,10 @@ if [ "${GITHUB_BUILD}" == "false" ]; then
|
|
|
181
172
|
exit 1
|
|
182
173
|
fi
|
|
183
174
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
exit 1
|
|
189
|
-
fi
|
|
175
|
+
docker images > /dev/null
|
|
176
|
+
if [ $? -ne 0 ]; then
|
|
177
|
+
echo "docker is not running - this is required to build container images for the UI Plugins"
|
|
178
|
+
exit 1
|
|
190
179
|
fi
|
|
191
180
|
fi
|
|
192
181
|
|
|
@@ -365,8 +354,8 @@ if [ "${GITHUB_BUILD}" == "false" ]; then
|
|
|
365
354
|
echo -e "${CYAN}Base extension: ${BASE_EXT}${RESET}"
|
|
366
355
|
echo -e "${CYAN}Extension version: ${EXT_VERSION}${RESET}"
|
|
367
356
|
|
|
368
|
-
# Build the
|
|
369
|
-
${SCRIPT_DIR}/bundle
|
|
357
|
+
# Build the docker image
|
|
358
|
+
${SCRIPT_DIR}/bundle ${BASE_EXT} ${EXT_VERSION} ${REGISTRY} ${REGISTRY_ORG} ${IMAGE_PREFIX} ${PUSH}
|
|
370
359
|
else
|
|
371
360
|
rm -rf ${CHART_TEMPLATE}
|
|
372
361
|
fi
|
|
@@ -397,5 +386,5 @@ fi
|
|
|
397
386
|
rm -rf ${CHART_TMP}
|
|
398
387
|
|
|
399
388
|
if [ "${GITHUB_BUILD}" == "false" ]; then
|
|
400
|
-
rm -rf ${TMP}
|
|
389
|
+
rm -rf ${TMP}
|
|
401
390
|
fi
|
package/scripts/publish-shell.sh
CHANGED
|
@@ -8,8 +8,6 @@ BASE_DIR="$(
|
|
|
8
8
|
SHELL_DIR=$BASE_DIR/shell/
|
|
9
9
|
TMP_DIR=$BASE_DIR/tmp
|
|
10
10
|
PUBLISH_ARGS="--no-git-tag-version --access public $PUBLISH_ARGS"
|
|
11
|
-
FORCE_PUBLISH_TO_NPM="false"
|
|
12
|
-
DEFAULT_YARN_REGISTRY="https://registry.npmjs.org"
|
|
13
11
|
|
|
14
12
|
if [ ! -d "${BASE_DIR}/node_modules" ]; then
|
|
15
13
|
echo "You need to run 'yarn install' first"
|
|
@@ -18,14 +16,6 @@ fi
|
|
|
18
16
|
|
|
19
17
|
echo "Publishing Shell Packages"
|
|
20
18
|
|
|
21
|
-
if [ "$1" == "--npm" ]; then
|
|
22
|
-
FORCE_PUBLISH_TO_NPM="true"
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
if [ "$FORCE_PUBLISH_TO_NPM" == "true" ]; then
|
|
26
|
-
export YARN_REGISTRY=$DEFAULT_YARN_REGISTRY
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
19
|
# We use the version from the shell package for the creator packages
|
|
30
20
|
# Need to copy them to a temporary location, so we can patch the version number
|
|
31
21
|
# before publishing
|
|
@@ -88,7 +78,7 @@ function publish() {
|
|
|
88
78
|
# Make a note of dependency versions, if required
|
|
89
79
|
node ${SCRIPT_DIR}/record-deps.js
|
|
90
80
|
|
|
91
|
-
yarn publish . --new-version ${PKG_VERSION} ${PUBLISH_ARGS}
|
|
81
|
+
yarn publish . --new-version ${PKG_VERSION} ${PUBLISH_ARGS} --tag v1.2
|
|
92
82
|
RET=$?
|
|
93
83
|
|
|
94
84
|
popd >/dev/null
|
|
@@ -7,9 +7,6 @@ echo "Checking plugin build"
|
|
|
7
7
|
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
8
8
|
BASE_DIR="$( cd $SCRIPT_DIR && cd ../.. & pwd)"
|
|
9
9
|
SHELL_DIR=$BASE_DIR/shell/
|
|
10
|
-
SHELL_VERSION="99.99.99"
|
|
11
|
-
DEFAULT_YARN_REGISTRY="https://registry.npmjs.org"
|
|
12
|
-
VERDACCIO_YARN_REGISTRY="http://localhost:4873"
|
|
13
10
|
|
|
14
11
|
echo ${SCRIPT_DIR}
|
|
15
12
|
|
|
@@ -69,24 +66,21 @@ else
|
|
|
69
66
|
rm -rf ~/.config/verdaccio/storage/@rancher/*
|
|
70
67
|
fi
|
|
71
68
|
|
|
72
|
-
export YARN_REGISTRY
|
|
69
|
+
export YARN_REGISTRY=http://localhost:4873
|
|
73
70
|
export NUXT_TELEMETRY_DISABLED=1
|
|
74
71
|
|
|
75
72
|
# Remove test package from previous run, if present
|
|
76
|
-
|
|
77
|
-
echo "Removing folder ${BASE_DIR}/pkg/test-pkg"
|
|
78
|
-
rm -rf ${BASE_DIR}/pkg/test-pkg
|
|
79
|
-
fi
|
|
73
|
+
rm -rf ${BASE_DIR}/pkg/test-pkg
|
|
80
74
|
|
|
81
75
|
# We need to patch the version number of the shell, otherwise if we are running
|
|
82
76
|
# with the currently published version, things will fail as those versions
|
|
83
77
|
# are already published and Verdaccio will check, since it is a read-through cache
|
|
84
|
-
sed -i.bak -e "s/\"version\": \"[0-9]*.[0-9]*.[0-9]*\
|
|
78
|
+
sed -i.bak -e "s/\"version\": \"[0-9]*.[0-9]*.[0-9]*\",/\"version\": \"7.7.7\",/g" ${SHELL_DIR}/package.json
|
|
85
79
|
rm ${SHELL_DIR}/package.json.bak
|
|
86
80
|
|
|
87
81
|
# Same as above for Rancher Components
|
|
88
82
|
# We might have bumped the version number but its not published yet, so this will fail
|
|
89
|
-
sed -i.bak -e "s/\"version\": \"[0-9]*.[0-9]*.[0-9]*\
|
|
83
|
+
sed -i.bak -e "s/\"version\": \"[0-9]*.[0-9]*.[0-9]*\",/\"version\": \"7.7.7\",/g" ${BASE_DIR}/pkg/rancher-components/package.json
|
|
90
84
|
|
|
91
85
|
# Publish shell
|
|
92
86
|
echo "Publishing shell packages to local registry"
|
|
@@ -114,7 +108,6 @@ if [ "${SKIP_STANDALONE}" == "false" ]; then
|
|
|
114
108
|
yarn install
|
|
115
109
|
|
|
116
110
|
echo "Building skeleton app"
|
|
117
|
-
|
|
118
111
|
FORCE_COLOR=true yarn build | cat
|
|
119
112
|
|
|
120
113
|
# Package creator
|
|
@@ -134,91 +127,22 @@ if [ "${SKIP_STANDALONE}" == "false" ]; then
|
|
|
134
127
|
echo "Cleaning temporary dir"
|
|
135
128
|
popd > /dev/null
|
|
136
129
|
|
|
137
|
-
|
|
138
|
-
echo "Removing folder ${DIR}"
|
|
139
|
-
rm -rf ${DIR}
|
|
140
|
-
fi
|
|
130
|
+
rm -rf ${DIR}
|
|
141
131
|
fi
|
|
142
132
|
|
|
143
133
|
pushd $BASE_DIR
|
|
134
|
+
pwd
|
|
135
|
+
ls
|
|
144
136
|
|
|
145
137
|
# Now try a plugin within the dashboard codebase
|
|
146
138
|
echo "Validating in-tree package"
|
|
147
139
|
|
|
148
140
|
yarn install
|
|
149
141
|
|
|
150
|
-
|
|
151
|
-
echo "Removing folder ./pkg/test-pkg"
|
|
152
|
-
rm -rf ./pkg/test-pkg
|
|
153
|
-
fi
|
|
154
|
-
|
|
142
|
+
rm -rf ./pkg/test-pkg
|
|
155
143
|
yarn create @rancher/pkg test-pkg -t
|
|
156
144
|
cp ${SHELL_DIR}/list/catalog.cattle.io.clusterrepo.vue ./pkg/test-pkg/list
|
|
157
145
|
FORCE_COLOR=true yarn build-pkg test-pkg | cat
|
|
158
|
-
|
|
159
|
-
echo "Removing folder ./pkg/test-pkg"
|
|
160
|
-
rm -rf ./pkg/test-pkg
|
|
161
|
-
fi
|
|
162
|
-
|
|
163
|
-
# function to clone repos and install dependencies (including the newly published shell version)
|
|
164
|
-
function clone_repo_test_extension_build() {
|
|
165
|
-
REPO_NAME=$1
|
|
166
|
-
PKG_NAME=$2
|
|
167
|
-
|
|
168
|
-
echo -e "\nSetting up $REPO_NAME repository locally\n"
|
|
169
|
-
|
|
170
|
-
# set registry to default (to install all of the other dependencies)
|
|
171
|
-
yarn config set registry ${DEFAULT_YARN_REGISTRY}
|
|
172
|
-
|
|
173
|
-
if [ $TEST_PERSIST_BUILD != "true" ]; then
|
|
174
|
-
echo "Removing folder ${BASE_DIR}/$REPO_NAME"
|
|
175
|
-
rm -rf ${BASE_DIR}/$REPO_NAME
|
|
176
|
-
fi
|
|
177
|
-
|
|
178
|
-
# cloning repo
|
|
179
|
-
git clone https://github.com/rancher/$REPO_NAME.git
|
|
180
|
-
pushd ${BASE_DIR}/$REPO_NAME
|
|
181
|
-
|
|
182
|
-
echo -e "\nInstalling dependencies for $REPO_NAME\n"
|
|
183
|
-
yarn install
|
|
184
|
-
|
|
185
|
-
# set registry to local verdaccio (to install new shell)
|
|
186
|
-
yarn config set registry ${VERDACCIO_YARN_REGISTRY}
|
|
187
|
-
|
|
188
|
-
# update package.json to use a specific version of shell
|
|
189
|
-
sed -i.bak -e "s/\"\@rancher\/shell\": \"[0-9]*.[0-9]*.[0-9]*\",/\"\@rancher\/shell\": \"${SHELL_VERSION}\",/g" package.json
|
|
190
|
-
rm package.json.bak
|
|
191
|
-
|
|
192
|
-
# we need to remove yarn.lock, otherwise it would install a version that we don't want
|
|
193
|
-
rm yarn.lock
|
|
194
|
-
|
|
195
|
-
echo -e "\nInstalling newly built shell version\n"
|
|
196
|
-
|
|
197
|
-
# installing new version of shell
|
|
198
|
-
yarn add @rancher/shell@${SHELL_VERSION}
|
|
199
|
-
|
|
200
|
-
# test build-pkg
|
|
201
|
-
FORCE_COLOR=true yarn build-pkg $PKG_NAME | cat
|
|
202
|
-
|
|
203
|
-
# kubewarden has some unit tests and they should be quick to run... Let's check them as well
|
|
204
|
-
if [ "${REPO_NAME}" == "kubewarden-ui" ]; then
|
|
205
|
-
yarn test:ci
|
|
206
|
-
fi
|
|
207
|
-
|
|
208
|
-
# return back to the base path
|
|
209
|
-
popd
|
|
210
|
-
|
|
211
|
-
# delete folder
|
|
212
|
-
if [ $TEST_PERSIST_BUILD != "true" ]; then
|
|
213
|
-
echo "Removing folder ${BASE_DIR}/$REPO_NAME"
|
|
214
|
-
rm -rf ${BASE_DIR}/$REPO_NAME
|
|
215
|
-
fi
|
|
216
|
-
yarn config set registry ${DEFAULT_YARN_REGISTRY}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
# Here we just add the extension that we want to include as a check (all our official extensions should be included here)
|
|
220
|
-
# Don't forget to add the unit tests exception to clone_repo_test_extension_build function if a new extension has those
|
|
221
|
-
clone_repo_test_extension_build "kubewarden-ui" "kubewarden"
|
|
222
|
-
clone_repo_test_extension_build "elemental-ui" "elemental"
|
|
146
|
+
rm -rf ./pkg/test-pkg
|
|
223
147
|
|
|
224
148
|
echo "All done"
|
package/store/catalog.js
CHANGED
|
@@ -354,7 +354,7 @@ export const actions = {
|
|
|
354
354
|
|
|
355
355
|
// As per comment above, when there are no clusters this will be management. Store it such that it can be used for those cases
|
|
356
356
|
commit('setInStore', inStore);
|
|
357
|
-
hash.cluster = hash.cluster
|
|
357
|
+
hash.cluster = hash.cluster.filter((repo) => !(repo?.metadata?.annotations?.[CATALOG_ANNOTATIONS.HIDDEN_REPO] === 'true'));
|
|
358
358
|
|
|
359
359
|
commit('setRepos', hash);
|
|
360
360
|
|
package/store/features.js
CHANGED
|
@@ -27,7 +27,6 @@ export const mapFeature = function(name) {
|
|
|
27
27
|
export const MULTI_CLUSTER = create('multi-cluster-management', true);
|
|
28
28
|
export const LEGACY = create('legacy', false);
|
|
29
29
|
export const RKE2 = create('rke2', true);
|
|
30
|
-
export const RKE1_UI = create('rke1-ui', true);
|
|
31
30
|
export const UNSUPPORTED_STORAGE_DRIVERS = create('unsupported-storage-drivers', false);
|
|
32
31
|
export const FLEET = create('continuous-delivery', true);
|
|
33
32
|
export const HARVESTER = create('harvester', true);
|
package/store/i18n.js
CHANGED
|
@@ -308,17 +308,6 @@ export const actions = {
|
|
|
308
308
|
p.push(dispatch('mergeLoad', { locale, module: fn }));
|
|
309
309
|
});
|
|
310
310
|
|
|
311
|
-
// load all of the default locales from the plugins for fallback
|
|
312
|
-
if (locale !== DEFAULT_LOCALE) {
|
|
313
|
-
const defaultI18nExt = rootState.$plugin?.getDynamic('l10n', DEFAULT_LOCALE);
|
|
314
|
-
|
|
315
|
-
if (defaultI18nExt && defaultI18nExt.length) {
|
|
316
|
-
defaultI18nExt.forEach((fn) => {
|
|
317
|
-
p.push(dispatch('mergeLoad', { locale: DEFAULT_LOCALE, module: fn }));
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
311
|
try {
|
|
323
312
|
await Promise.all(p);
|
|
324
313
|
} catch (e) {
|
package/store/index.js
CHANGED
|
@@ -604,7 +604,7 @@ export const mutations = {
|
|
|
604
604
|
state.isRancherInHarvester = neu;
|
|
605
605
|
},
|
|
606
606
|
|
|
607
|
-
updateNamespaces(state, { filters, all
|
|
607
|
+
updateNamespaces(state, { filters, all }) {
|
|
608
608
|
state.namespaceFilters = filters.filter((x) => !!x);
|
|
609
609
|
|
|
610
610
|
if ( all ) {
|
|
@@ -801,14 +801,14 @@ export const actions = {
|
|
|
801
801
|
commit('targetRoute', targetRoute);
|
|
802
802
|
const sameCluster = state.clusterId && state.clusterId === id;
|
|
803
803
|
const samePackage = oldPkg?.name === newPkg?.name;
|
|
804
|
-
const sameProduct = oldProduct === product;
|
|
805
804
|
const isMultiCluster = getters['isMultiCluster'];
|
|
806
805
|
|
|
807
|
-
// Are we in the same cluster and package
|
|
808
|
-
if ( sameCluster &&
|
|
806
|
+
// Are we in the same cluster and package?
|
|
807
|
+
if ( sameCluster && samePackage) {
|
|
809
808
|
// Do nothing, we're already connected/connecting to this cluster
|
|
810
809
|
return;
|
|
811
810
|
}
|
|
811
|
+
|
|
812
812
|
const oldPkgClusterStore = oldPkg?.stores.find(
|
|
813
813
|
(s) => getters[`${ s.storeName }/isClusterStore`]
|
|
814
814
|
)?.storeName;
|
|
@@ -829,6 +829,7 @@ export const actions = {
|
|
|
829
829
|
// so that the nav and header stay the same when going to things like prefs
|
|
830
830
|
commit('clusterReady', false);
|
|
831
831
|
commit('clusterId', undefined);
|
|
832
|
+
|
|
832
833
|
await dispatch('cluster/unsubscribe');
|
|
833
834
|
commit('cluster/reset');
|
|
834
835
|
|
|
@@ -957,7 +958,6 @@ export const actions = {
|
|
|
957
958
|
commit('updateNamespaces', {
|
|
958
959
|
filters: filters || [ALL_USER],
|
|
959
960
|
all: allNamespaces,
|
|
960
|
-
getters
|
|
961
961
|
});
|
|
962
962
|
|
|
963
963
|
if (getters['currentCluster'] && getters['currentCluster'].isHarvester) {
|
|
@@ -980,7 +980,7 @@ export const actions = {
|
|
|
980
980
|
}
|
|
981
981
|
});
|
|
982
982
|
|
|
983
|
-
commit('updateNamespaces', { filters: ids
|
|
983
|
+
commit('updateNamespaces', { filters: ids });
|
|
984
984
|
},
|
|
985
985
|
|
|
986
986
|
async cleanNamespaces({ getters, dispatch }) {
|
|
@@ -1048,13 +1048,15 @@ export const actions = {
|
|
|
1048
1048
|
if ( route.name === 'index' ) {
|
|
1049
1049
|
router.replace('/auth/login');
|
|
1050
1050
|
} else {
|
|
1051
|
-
|
|
1051
|
+
if (!process.server) {
|
|
1052
|
+
const backTo = window.localStorage.getItem(BACK_TO);
|
|
1052
1053
|
|
|
1053
|
-
|
|
1054
|
-
|
|
1054
|
+
const isLogin = route.name === 'auth-login' || route.path === '/login'; // Cover dashboard and case of log out from ember;
|
|
1055
|
+
const isLogout = route.name === 'auth-logout';
|
|
1055
1056
|
|
|
1056
|
-
|
|
1057
|
-
|
|
1057
|
+
if (!backTo && !isLogin && !isLogout) {
|
|
1058
|
+
window.localStorage.setItem(BACK_TO, window.location.href);
|
|
1059
|
+
}
|
|
1058
1060
|
}
|
|
1059
1061
|
|
|
1060
1062
|
const QUERY = (LOGGED_OUT in route.query) ? LOGGED_OUT : TIMED_OUT;
|