@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
package/config/settings.ts
CHANGED
|
@@ -77,7 +77,6 @@ export const SETTING = {
|
|
|
77
77
|
FAVICON: 'ui-favicon',
|
|
78
78
|
UI_PERFORMANCE: 'ui-performance',
|
|
79
79
|
UI_CUSTOM_LINKS: 'ui-custom-links',
|
|
80
|
-
UI_SUPPORTED_K8S_VERSIONS: 'ui-k8s-supported-versions-range',
|
|
81
80
|
/**
|
|
82
81
|
* Allow the backend to force a light/dark theme. Used in non-rancher world and results in the theme used
|
|
83
82
|
* both pre and post log in. If not present defaults to the usual process
|
|
@@ -92,7 +91,15 @@ export const SETTING = {
|
|
|
92
91
|
/**
|
|
93
92
|
* manage rancher repositories in extensions (official, partners repos)
|
|
94
93
|
*/
|
|
95
|
-
ADD_EXTENSION_REPOS_BANNER_DISPLAY: 'display-add-extension-repos-banner'
|
|
94
|
+
ADD_EXTENSION_REPOS_BANNER_DISPLAY: 'display-add-extension-repos-banner',
|
|
95
|
+
/**
|
|
96
|
+
* User retention settings
|
|
97
|
+
*/
|
|
98
|
+
USER_RETENTION_CRON: 'user-retention-cron',
|
|
99
|
+
USER_RETENTION_DRY_RUN: 'user-retention-dry-run',
|
|
100
|
+
USER_LAST_LOGIN_DEFAULT: 'user-last-login-default',
|
|
101
|
+
DISABLE_INACTIVE_USER_AFTER: 'disable-inactive-user-after',
|
|
102
|
+
DELETE_INACTIVE_USER_AFTER: 'delete-inactive-user-after',
|
|
96
103
|
};
|
|
97
104
|
|
|
98
105
|
// These are the settings that are allowed to be edited via the UI
|
package/config/store.js
CHANGED
package/config/table-headers.js
CHANGED
|
@@ -398,6 +398,33 @@ export const USER_PROVIDER = {
|
|
|
398
398
|
sort: 'providerDisplay',
|
|
399
399
|
};
|
|
400
400
|
|
|
401
|
+
export const USER_LAST_LOGIN = {
|
|
402
|
+
name: 'user-last-login',
|
|
403
|
+
labelKey: 'tableHeaders.userLastLogin',
|
|
404
|
+
value: 'userLastLogin',
|
|
405
|
+
formatter: 'LiveDate',
|
|
406
|
+
formatterOpts: { addSuffix: true },
|
|
407
|
+
sort: 'userLastLogin',
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export const USER_DISABLED_IN = {
|
|
411
|
+
name: 'user-disabled-in',
|
|
412
|
+
labelKey: 'tableHeaders.userDisabledIn',
|
|
413
|
+
value: 'userDisabledInDisplay',
|
|
414
|
+
formatter: 'LiveDate',
|
|
415
|
+
formatterOpts: { isCountdown: true },
|
|
416
|
+
sort: 'userDisabledIn',
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
export const USER_DELETED_IN = {
|
|
420
|
+
name: 'user-deleted-in',
|
|
421
|
+
labelKey: 'tableHeaders.userDeletedIn',
|
|
422
|
+
value: 'userDeletedIn',
|
|
423
|
+
formatter: 'LiveDate',
|
|
424
|
+
formatterOpts: { isCountdown: true },
|
|
425
|
+
sort: 'userDeletedIn',
|
|
426
|
+
};
|
|
427
|
+
|
|
401
428
|
export const USER_ID = {
|
|
402
429
|
name: 'user-id',
|
|
403
430
|
labelKey: 'tableHeaders.userId',
|
|
@@ -706,29 +733,6 @@ export const FLEET_SUMMARY = {
|
|
|
706
733
|
width: 100,
|
|
707
734
|
};
|
|
708
735
|
|
|
709
|
-
export const FLEET_REPO_CLUSTER_SUMMARY = {
|
|
710
|
-
name: 'clusterSummary',
|
|
711
|
-
labelKey: 'tableHeaders.clusterResources',
|
|
712
|
-
value: 'status.resourceCounts',
|
|
713
|
-
sort: false,
|
|
714
|
-
search: false,
|
|
715
|
-
formatter: 'FleetClusterSummaryGraph',
|
|
716
|
-
align: 'center',
|
|
717
|
-
width: 100,
|
|
718
|
-
};
|
|
719
|
-
|
|
720
|
-
export const FLEET_REPO_PER_CLUSTER_STATE = {
|
|
721
|
-
name: 'perClusterState',
|
|
722
|
-
labelKey: 'tableHeaders.repoPerClusterState',
|
|
723
|
-
tooltip: 'tableHeaders.repoPerClusterStateTooltip',
|
|
724
|
-
sort: ['stateSort', 'nameSort'],
|
|
725
|
-
width: 100,
|
|
726
|
-
default: 'unknown',
|
|
727
|
-
formatter: 'BadgeStateFormatter',
|
|
728
|
-
formatterOpts: { arbitrary: true }
|
|
729
|
-
|
|
730
|
-
};
|
|
731
|
-
|
|
732
736
|
export const APP_SUMMARY = {
|
|
733
737
|
name: 'summary',
|
|
734
738
|
labelKey: 'tableHeaders.resources',
|
|
@@ -994,30 +998,6 @@ export const FLEET_BUNDLE_TYPE = {
|
|
|
994
998
|
width: 100,
|
|
995
999
|
};
|
|
996
1000
|
|
|
997
|
-
export const FLEET_REPO_CLUSTERS_READY = {
|
|
998
|
-
name: 'clustersReady',
|
|
999
|
-
labelKey: 'tableHeaders.clustersReady',
|
|
1000
|
-
value: 'status.readyClusters',
|
|
1001
|
-
sort: 'status.readyClusters',
|
|
1002
|
-
search: false,
|
|
1003
|
-
};
|
|
1004
|
-
|
|
1005
|
-
export const FLEET_REPO_TARGET = {
|
|
1006
|
-
name: 'target',
|
|
1007
|
-
labelKey: 'tableHeaders.target',
|
|
1008
|
-
value: 'targetInfo.modeDisplay',
|
|
1009
|
-
sort: ['targetInfo.modeDisplay', 'targetInfo.cluster', 'targetInfo.clusterGroup'],
|
|
1010
|
-
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
export const FLEET_REPO = {
|
|
1014
|
-
name: 'repo',
|
|
1015
|
-
labelKey: 'tableHeaders.repo',
|
|
1016
|
-
value: 'repoDisplay',
|
|
1017
|
-
sort: 'repoDisplay',
|
|
1018
|
-
search: ['spec.repo', 'status.commit'],
|
|
1019
|
-
};
|
|
1020
|
-
|
|
1021
1001
|
export const UI_PLUGIN_CATALOG = [
|
|
1022
1002
|
{
|
|
1023
1003
|
name: 'state',
|
package/config/types.js
CHANGED
|
@@ -53,6 +53,8 @@ export const NODE = 'node';
|
|
|
53
53
|
export const NETWORK_POLICY = 'networking.k8s.io.networkpolicy';
|
|
54
54
|
export const POD = 'pod';
|
|
55
55
|
export const POD_DISRUPTION_BUDGET = 'policy.poddisruptionbudget';
|
|
56
|
+
export const PSP = 'policy.podsecuritypolicy';
|
|
57
|
+
export const PSPS = 'policy.podsecuritypolicies';
|
|
56
58
|
export const PV = 'persistentvolume';
|
|
57
59
|
export const PVC = 'persistentvolumeclaim';
|
|
58
60
|
export const RESOURCE_QUOTA = 'resourcequota';
|
|
@@ -181,6 +183,8 @@ export const MANAGEMENT = {
|
|
|
181
183
|
TOKEN: 'management.cattle.io.token',
|
|
182
184
|
GLOBAL_ROLE: 'management.cattle.io.globalrole',
|
|
183
185
|
GLOBAL_ROLE_BINDING: 'management.cattle.io.globalrolebinding',
|
|
186
|
+
POD_SECURITY_POLICY_TEMPLATE: 'management.cattle.io.podsecuritypolicytemplate',
|
|
187
|
+
PSP_TEMPLATE_BINDING: 'management.cattle.io.podsecuritypolicytemplateprojectbinding',
|
|
184
188
|
PSA: 'management.cattle.io.podsecurityadmissionconfigurationtemplate',
|
|
185
189
|
MANAGED_CHART: 'management.cattle.io.managedchart',
|
|
186
190
|
USER_NOTIFICATION: 'management.cattle.io.rancherusernotification',
|
|
@@ -287,6 +291,7 @@ export const HCI = {
|
|
|
287
291
|
CLUSTER: 'harvesterhci.io.management.cluster',
|
|
288
292
|
DASHBOARD: 'harvesterhci.io.dashboard',
|
|
289
293
|
IMAGE: 'harvesterhci.io.virtualmachineimage',
|
|
294
|
+
VGPU_DEVICE: 'devices.harvesterhci.io.vgpudevice',
|
|
290
295
|
SETTING: 'harvesterhci.io.setting',
|
|
291
296
|
HARVESTER_CONFIG: 'rke-machine-config.cattle.io.harvesterconfig',
|
|
292
297
|
};
|
package/config/uiplugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import semver from 'semver';
|
|
2
2
|
|
|
3
3
|
// Version of the plugin API supported
|
|
4
|
-
export const UI_PLUGIN_API_VERSION = '1.
|
|
4
|
+
export const UI_PLUGIN_API_VERSION = '1.2.0';
|
|
5
5
|
export const UI_PLUGIN_HOST_APP = 'rancher-manager';
|
|
6
6
|
|
|
7
7
|
export const UI_PLUGIN_BASE_URL = '/api/v1/namespaces/cattle-ui-plugin-system/services/http:ui-plugin-operator:80/proxy';
|
package/core/plugin-helpers.js
CHANGED
|
@@ -7,11 +7,13 @@ import {
|
|
|
7
7
|
import { getProductFromRoute } from '@shell/middleware/authenticated';
|
|
8
8
|
import { isEqual } from '@shell/utils/object';
|
|
9
9
|
|
|
10
|
-
function checkRouteProduct(
|
|
11
|
-
const product = getProductFromRoute(
|
|
10
|
+
function checkRouteProduct({ name, params, query }, locationConfigParam) {
|
|
11
|
+
const product = getProductFromRoute({
|
|
12
|
+
name, params, query
|
|
13
|
+
});
|
|
12
14
|
|
|
13
15
|
// alias for the homepage
|
|
14
|
-
if (locationConfigParam === 'home' &&
|
|
16
|
+
if (locationConfigParam === 'home' && name === 'home') {
|
|
15
17
|
return true;
|
|
16
18
|
} else if (locationConfigParam === product) {
|
|
17
19
|
return true;
|
package/core/plugin-routes.ts
CHANGED
|
@@ -6,8 +6,20 @@ interface RouteInfo {
|
|
|
6
6
|
route: RouteConfig;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
interface RouteInstallInfo {
|
|
10
|
+
plugin: string;
|
|
11
|
+
route: RouteConfig;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
type RouteInstallHistory = {
|
|
15
|
+
[route: string]: RouteInstallInfo[]
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
export class PluginRoutes {
|
|
10
19
|
router: Router;
|
|
20
|
+
pluginRoutes: RouteConfig[] = [];
|
|
21
|
+
|
|
22
|
+
replacedRoutes: RouteInstallHistory = {};
|
|
11
23
|
|
|
12
24
|
constructor(router: Router) {
|
|
13
25
|
this.router = router;
|
|
@@ -22,25 +34,70 @@ export class PluginRoutes {
|
|
|
22
34
|
});
|
|
23
35
|
}
|
|
24
36
|
|
|
25
|
-
|
|
37
|
+
// Ensure we put back any routes that the plugin that is being uninstalled added
|
|
38
|
+
public uninstall(plugin: any) {
|
|
39
|
+
// List of routes we need to restore
|
|
40
|
+
const restore: RouteInfo[] = [];
|
|
41
|
+
|
|
42
|
+
Object.keys(this.replacedRoutes).forEach((routeName) => {
|
|
43
|
+
const info = this.replacedRoutes[routeName];
|
|
44
|
+
|
|
45
|
+
for (let index = 0; index < info.length; index++) {
|
|
46
|
+
const savedRoute = info[index];
|
|
47
|
+
|
|
48
|
+
if (savedRoute.plugin === plugin.id) {
|
|
49
|
+
// The plugin that is being uninstalled replaced an existing route that we will restore
|
|
50
|
+
if (index === 0) {
|
|
51
|
+
// Need to restore the previous route, since the plugin owned the active route
|
|
52
|
+
info.shift();
|
|
53
|
+
|
|
54
|
+
restore.push({ route: savedRoute.route });
|
|
55
|
+
|
|
56
|
+
break;
|
|
57
|
+
} else {
|
|
58
|
+
// Need to update the previous item so that when it is removed, it restores the correct route
|
|
59
|
+
const previous = info[index - 1];
|
|
60
|
+
|
|
61
|
+
previous.route = savedRoute.route;
|
|
62
|
+
info.splice(index, 1);
|
|
63
|
+
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Remove routes from pluginRoutes, update matcher (to avoid dupes when re-adding plugin routes)
|
|
71
|
+
this.pluginRoutes = this.pluginRoutes.filter((pR) => !plugin.routes.find((r: any) => pR === r.route));
|
|
72
|
+
this.updateMatcher([], [
|
|
73
|
+
...this.pluginRoutes,
|
|
74
|
+
...(this.router.options.routes || [])
|
|
75
|
+
]);
|
|
76
|
+
|
|
77
|
+
// Restore appropriate routes
|
|
78
|
+
if (restore.length > 0) {
|
|
79
|
+
this.addRoutes(null, restore);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public addRoutes(plugin: any, routes: RouteInfo[]) {
|
|
26
84
|
const allRoutes = [
|
|
85
|
+
...this.pluginRoutes,
|
|
27
86
|
...(this.router.options.routes || [])
|
|
28
87
|
];
|
|
29
88
|
|
|
30
89
|
// Need to take into account if routes are being replaced
|
|
31
90
|
// Despite what the docs say, routes are not replaced, so we use a workaround
|
|
32
91
|
// Remove all routes that are being replaced
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.forEachNestedRoutes(newRoutes, (r: RouteConfig) => {
|
|
92
|
+
routes.forEach((r: RouteInfo) => {
|
|
36
93
|
// Patch colliding legacy routes that start /:product
|
|
37
|
-
if (r.path?.startsWith('/:product')) {
|
|
94
|
+
if (r.route.path?.startsWith('/:product')) {
|
|
38
95
|
// Legacy pattern used by extensions - routes may collide, so modify them not to
|
|
39
96
|
let productName;
|
|
40
97
|
|
|
41
98
|
// If the route has a name (which is always the case for the extensions we have written), use it to get the product name
|
|
42
|
-
if (r.name) {
|
|
43
|
-
const nameParts = r.name.split('-');
|
|
99
|
+
if (r.route.name) {
|
|
100
|
+
const nameParts = r.route.name.split('-');
|
|
44
101
|
|
|
45
102
|
// First part of the route name is the product name
|
|
46
103
|
productName = nameParts[0];
|
|
@@ -50,40 +107,74 @@ export class PluginRoutes {
|
|
|
50
107
|
productName = productName || plugin.name;
|
|
51
108
|
|
|
52
109
|
// Replace the path - removing :product and using the actual product name instead - this avoids route collisions
|
|
53
|
-
r.path = `/${ productName }${ r.path.substr(9) }`;
|
|
54
|
-
r.meta = r.meta || {};
|
|
110
|
+
r.route.path = `/${ productName }${ r.route.path.substr(9) }`;
|
|
111
|
+
r.route.meta = r.route.meta || {};
|
|
112
|
+
|
|
113
|
+
r.route.meta.product = r.route.meta.product || productName;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// See if the route exists
|
|
117
|
+
let existing: any;
|
|
118
|
+
|
|
119
|
+
if (r.parent) {
|
|
120
|
+
const pExisting = allRoutes.findIndex((route: any) => route.name === r.parent) as any;
|
|
121
|
+
const path = `${ pExisting.path }${ r.route.path }`;
|
|
122
|
+
|
|
123
|
+
// TODO: Validate
|
|
124
|
+
existing = allRoutes.findIndex((route: any) => route.path === path);
|
|
125
|
+
} else {
|
|
126
|
+
// no parent route
|
|
127
|
+
existing = allRoutes.findIndex((route: any) => route.name === r.route.name);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (existing >= 0) {
|
|
131
|
+
const existingRoute = allRoutes[existing];
|
|
132
|
+
|
|
133
|
+
// Store the route so we can restore it on uninstall
|
|
134
|
+
if (plugin && existingRoute?.name) {
|
|
135
|
+
if (!this.replacedRoutes[existingRoute.name]) {
|
|
136
|
+
this.replacedRoutes[existingRoute.name] = [];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
this.replacedRoutes[existingRoute.name].unshift({
|
|
140
|
+
plugin: plugin.id,
|
|
141
|
+
route: existingRoute
|
|
142
|
+
});
|
|
143
|
+
}
|
|
55
144
|
|
|
56
|
-
|
|
145
|
+
allRoutes.splice(existing, 1);
|
|
57
146
|
}
|
|
58
147
|
});
|
|
59
148
|
|
|
60
|
-
this.updateMatcher(
|
|
149
|
+
this.updateMatcher(routes, allRoutes);
|
|
61
150
|
}
|
|
62
151
|
|
|
63
152
|
private updateMatcher(newRoutes: RouteInfo[], allRoutes: RouteConfig[]) {
|
|
64
153
|
// Note - Always use a new router and replace the existing router's matching
|
|
65
|
-
// Using the existing router and adding routes to it will force nuxt middleware to
|
|
154
|
+
// Using the existing router and adding routes to it will force nuxt middleware (specifically authenticated on default layout) to
|
|
66
155
|
// execute many times (nuxt middleware boils down to router.beforeEach). This issue was seen refreshing in a harvester cluster with a
|
|
67
156
|
// dynamically loaded cluster
|
|
68
157
|
|
|
158
|
+
const pluginRoutesWithParents: any[] = [];
|
|
69
159
|
const orderedPluginRoutes: any[] = [];
|
|
70
160
|
|
|
71
|
-
// separate plugin routes that have parent and not
|
|
72
|
-
newRoutes.
|
|
161
|
+
// separate plugin routes that have parent and not
|
|
162
|
+
newRoutes.forEach((r: any) => {
|
|
73
163
|
let foundParentRoute;
|
|
74
164
|
|
|
75
165
|
if (r.parent) {
|
|
76
|
-
foundParentRoute =
|
|
166
|
+
foundParentRoute = allRoutes.find((route) => route.name === r.parent);
|
|
77
167
|
|
|
78
168
|
if (foundParentRoute) {
|
|
79
|
-
|
|
80
|
-
foundParentRoute.children.unshift(r.route);
|
|
169
|
+
pluginRoutesWithParents.push(r);
|
|
81
170
|
}
|
|
82
171
|
}
|
|
83
172
|
|
|
84
173
|
if (!foundParentRoute) {
|
|
85
|
-
orderedPluginRoutes.
|
|
174
|
+
orderedPluginRoutes.push(r.route);
|
|
86
175
|
}
|
|
176
|
+
|
|
177
|
+
this.pluginRoutes.push(r.route);
|
|
87
178
|
});
|
|
88
179
|
|
|
89
180
|
const newRouter: Router = new Router({
|
|
@@ -91,45 +182,12 @@ export class PluginRoutes {
|
|
|
91
182
|
routes: [...orderedPluginRoutes, ...allRoutes]
|
|
92
183
|
});
|
|
93
184
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Traverse the entire tree of nested routes
|
|
99
|
-
*
|
|
100
|
-
* @param routes The routes we wish to traverse through
|
|
101
|
-
* @param fn -> Return true if you'd like to break the loop early (small)
|
|
102
|
-
* @returns {@boolean} -> Returns true if breaking early
|
|
103
|
-
*/
|
|
104
|
-
private forEachNestedRoutes(routes: RouteConfig[] = [], fn: (route: RouteConfig) => boolean | undefined | void) {
|
|
105
|
-
for (let i = 0; i < routes.length; ++i) {
|
|
106
|
-
const route = routes[i];
|
|
107
|
-
const result = fn(route);
|
|
108
|
-
|
|
109
|
-
if (result || this.forEachNestedRoutes(route.children, fn)) {
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Find a route that matches the criteria defined by fn.
|
|
117
|
-
*
|
|
118
|
-
* @param routes The routes we wish to search through
|
|
119
|
-
* @param fn -> Returns true if the passed in route matches the expected criteria
|
|
120
|
-
* @returns The found route or undefined
|
|
121
|
-
*/
|
|
122
|
-
private findInNestedRoutes(routes: RouteConfig[] = [], fn: (route: RouteConfig) => boolean): RouteConfig | undefined {
|
|
123
|
-
let found: any;
|
|
124
|
-
|
|
125
|
-
this.forEachNestedRoutes(routes, (route) => {
|
|
126
|
-
if (fn(route)) {
|
|
127
|
-
found = route;
|
|
128
|
-
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
185
|
+
// handle plugin routes with parent
|
|
186
|
+
pluginRoutesWithParents.forEach((r: any) => {
|
|
187
|
+
newRouter.addRoute(r.parent, r.route);
|
|
131
188
|
});
|
|
132
189
|
|
|
133
|
-
|
|
190
|
+
// Typing is incorrect
|
|
191
|
+
(this.router as any).matcher = (newRouter as any).matcher;
|
|
134
192
|
}
|
|
135
193
|
}
|
package/core/plugin.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
PluginRouteConfig, RegisterStore, UnregisterStore, CoreStoreSpecifics, CoreStoreConfig, OnNavToPackage, OnNavAwayFromPackage, OnLogOut
|
|
16
16
|
} from './types';
|
|
17
17
|
import coreStore, { coreStoreModule, coreStoreState } from '@shell/plugins/dashboard-store';
|
|
18
|
+
import { registerLayout } from '@shell/initialize/layouts';
|
|
18
19
|
|
|
19
20
|
export type ProductFunction = (plugin: IPlugin, store: any) => void;
|
|
20
21
|
|
|
@@ -119,27 +120,12 @@ export class Plugin implements IPlugin {
|
|
|
119
120
|
const parent: string | undefined = hasParent ? parentOrRoute as string : undefined;
|
|
120
121
|
const route: RouteConfig = hasParent ? optionalRoute as RouteConfig : parentOrRoute as RouteConfig;
|
|
121
122
|
|
|
122
|
-
let parentOverride;
|
|
123
|
-
|
|
124
|
-
if (!parent) {
|
|
125
|
-
// TODO: Inspecting the route object in the browser clearly indicates it's not a RouteConfig. The type needs to be changed or at least extended.
|
|
126
|
-
const typelessRoute: any = route;
|
|
127
|
-
|
|
128
|
-
if (typelessRoute.component?.layout) {
|
|
129
|
-
console.warn(`Layouts have been deprecated. We still have parent routes which use the same name and styling as the previous layouts. \n\nFound a component ${ typelessRoute.component.name } with the '${ typelessRoute.component.layout }' layout specified `); // eslint-disable-line no-console
|
|
130
|
-
parentOverride = typelessRoute.component.layout.toLowerCase();
|
|
131
|
-
} else {
|
|
132
|
-
console.warn(`Layouts have been deprecated. We still have parent routes which use the same name and styling as the previous layouts. You should specify a parent, we're currently setting the parent to 'default'`); // eslint-disable-line no-console
|
|
133
|
-
parentOverride = 'default';
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
123
|
route.meta = {
|
|
138
124
|
...route?.meta,
|
|
139
125
|
pkg: this.name,
|
|
140
126
|
};
|
|
141
127
|
|
|
142
|
-
this.routes.push({ parent
|
|
128
|
+
this.routes.push({ parent, route });
|
|
143
129
|
}
|
|
144
130
|
|
|
145
131
|
private _addUIConfig(type: string, where: string, when: LocationConfig | string, config: any) {
|
|
@@ -282,6 +268,14 @@ export class Plugin implements IPlugin {
|
|
|
282
268
|
}
|
|
283
269
|
|
|
284
270
|
this.l10n[name].push(fn);
|
|
271
|
+
} else if (type === 'layouts') {
|
|
272
|
+
fn().then((component: any) => {
|
|
273
|
+
if (component.default) {
|
|
274
|
+
registerLayout(name, component.default);
|
|
275
|
+
} else {
|
|
276
|
+
console.error(`Failed to load layout ${ name } because the file didn't export a default component.`); // eslint-disable-line no-console
|
|
277
|
+
}
|
|
278
|
+
});
|
|
285
279
|
} else {
|
|
286
280
|
if (!this.types[type]) {
|
|
287
281
|
this.types[type] = {};
|
package/core/plugins-loader.js
CHANGED
|
@@ -20,12 +20,14 @@ export default function({
|
|
|
20
20
|
dynamicLoader.default($plugin);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (process.client) {
|
|
24
|
+
// The libraries we build have Vue externalised, so we need to expose Vue as a global for
|
|
25
|
+
// them to pick up - see: https://cli.vuejs.org/guide/build-targets.html#library
|
|
26
|
+
window.Vue = Vue;
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
// Global libraries - allows us to externalise these to reduce package bundle size
|
|
29
|
+
window.$ = $;
|
|
30
|
+
window.__jszip = JSZip;
|
|
31
|
+
window.__jsyaml = jsyaml;
|
|
32
|
+
}
|
|
31
33
|
}
|
package/core/plugins.js
CHANGED
|
@@ -222,6 +222,9 @@ export default function({
|
|
|
222
222
|
promises.push(...this.removeTypeFromStore(store, 'management', Object.keys(plugin.types.models)));
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
// Uninstall routes
|
|
226
|
+
pluginRoutes.uninstall(plugin);
|
|
227
|
+
|
|
225
228
|
// Call plugin uninstall hooks
|
|
226
229
|
plugin.uninstallHooks.forEach((fn) => fn(plugin, this.internal()));
|
|
227
230
|
|
|
@@ -60,7 +60,6 @@ export interface IClusterProvisioner {
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Unique ID of the Cluster Provisioner
|
|
63
|
-
* If this overlaps with the name of an existing provisioner (seen in the type query param while creating a cluster) this provisioner will overwrite the built-in ui
|
|
64
63
|
*/
|
|
65
64
|
id: string;
|
|
66
65
|
|
|
@@ -116,12 +115,6 @@ export interface IClusterProvisioner {
|
|
|
116
115
|
*/
|
|
117
116
|
tag?: string;
|
|
118
117
|
|
|
119
|
-
/**
|
|
120
|
-
* Also show the provider card in the cluster importing flow
|
|
121
|
-
* If not set, the card will only be shown in the cluster creation page
|
|
122
|
-
*/
|
|
123
|
-
showImport?: boolean
|
|
124
|
-
|
|
125
118
|
/* --------------------------------------------------------------------------------------
|
|
126
119
|
* Custer Details View
|
|
127
120
|
* --------------------------------------------------------------------------------------- */
|
package/creators/app/init
CHANGED
|
@@ -34,25 +34,6 @@ if (args.length === 3) {
|
|
|
34
34
|
fs.ensureDirSync(appFolder);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
let addGitlabWorkflow = false;
|
|
38
|
-
|
|
39
|
-
// Check for Gitlab integration option
|
|
40
|
-
if ( args.length > 3 ) {
|
|
41
|
-
for (let i = 3; i < args.length; i++) {
|
|
42
|
-
switch (args[i]) {
|
|
43
|
-
case '-l':
|
|
44
|
-
addGitlabWorkflow = true;
|
|
45
|
-
break;
|
|
46
|
-
default:
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if ( addGitlabWorkflow ) {
|
|
53
|
-
files.push('.gitlab-ci.yml');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
37
|
// Check that there is a package file
|
|
57
38
|
|
|
58
39
|
let setName = false;
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
if (this.hasRepoLabel) {
|
|
39
39
|
const bundleResourceIds = this.bundleResourceIds;
|
|
40
40
|
|
|
41
|
-
return this.repo?.status?.resources
|
|
41
|
+
return this.repo?.status?.resources.filter((resource) => {
|
|
42
42
|
return bundleResourceIds.includes(resource.name);
|
|
43
43
|
});
|
|
44
44
|
} else if (this.value?.spec?.resources?.length) {
|
|
@@ -8,7 +8,7 @@ import { MANAGEMENT, FLEET } from '@shell/config/types';
|
|
|
8
8
|
import { FLEET as FLEET_LABELS } from '@shell/config/labels-annotations';
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
|
-
name: '
|
|
11
|
+
name: 'DetailCluster',
|
|
12
12
|
|
|
13
13
|
components: {
|
|
14
14
|
Loading,
|
|
@@ -36,8 +36,6 @@ export default {
|
|
|
36
36
|
this.allRepos = await this.$store.dispatch('management/findAll', { type: FLEET.GIT_REPO });
|
|
37
37
|
|
|
38
38
|
await this.$store.dispatch('management/findAll', { type: FLEET.WORKSPACE });
|
|
39
|
-
|
|
40
|
-
await this.$store.dispatch('management/findAll', { type: FLEET.BUNDLE_DEPLOYMENT });
|
|
41
39
|
},
|
|
42
40
|
|
|
43
41
|
data() {
|
|
@@ -45,13 +43,6 @@ export default {
|
|
|
45
43
|
},
|
|
46
44
|
|
|
47
45
|
computed: {
|
|
48
|
-
allBundleDeployments() {
|
|
49
|
-
return this.value.bundleDeployments;
|
|
50
|
-
},
|
|
51
|
-
clusterId() {
|
|
52
|
-
return this.value?.metadata?.labels[FLEET_LABELS.CLUSTER_NAME];
|
|
53
|
-
},
|
|
54
|
-
|
|
55
46
|
repos() {
|
|
56
47
|
return this.allRepos.filter((x) => {
|
|
57
48
|
return x.targetClusters.includes(this.value);
|
|
@@ -85,7 +76,6 @@ export default {
|
|
|
85
76
|
:weight="19"
|
|
86
77
|
>
|
|
87
78
|
<FleetRepos
|
|
88
|
-
:clusterId="clusterId"
|
|
89
79
|
:rows="repos"
|
|
90
80
|
:schema="repoSchema"
|
|
91
81
|
:paging="true"
|