@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/initialize/index.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
// Taken from @nuxt/vue-app/template/index.js
|
|
2
|
-
// This file was generated during Nuxt migration
|
|
3
2
|
|
|
4
3
|
import Vue from 'vue';
|
|
4
|
+
import Meta from 'vue-meta';
|
|
5
|
+
import ClientOnly from 'vue-client-only';
|
|
6
|
+
import NoSsr from 'vue-no-ssr';
|
|
5
7
|
import { createRouter } from '../config/router.js';
|
|
6
8
|
import NuxtChild from '../components/nuxt/nuxt-child.js';
|
|
9
|
+
import NuxtError from '../layouts/error.vue';
|
|
7
10
|
import Nuxt from '../components/nuxt/nuxt.js';
|
|
8
11
|
import App from './App.js';
|
|
9
12
|
import { setContext, getLocation, getRouteData, normalizeError } from '../utils/nuxt';
|
|
10
13
|
import { createStore } from '../config/store.js';
|
|
11
14
|
|
|
12
15
|
/* Plugins */
|
|
13
|
-
|
|
16
|
+
|
|
14
17
|
import '../plugins/portal-vue.js';
|
|
15
18
|
import cookieUniversalNuxt from '../utils/cookie-universal-nuxt.js';
|
|
16
19
|
import axios from '../utils/axios.js';
|
|
@@ -18,7 +21,12 @@ import plugins from '../core/plugins.js';
|
|
|
18
21
|
import pluginsLoader from '../core/plugins-loader.js';
|
|
19
22
|
import axiosShell from '../plugins/axios';
|
|
20
23
|
import '../plugins/tooltip';
|
|
24
|
+
import '../plugins/clean-tooltip-directive';
|
|
25
|
+
import '../plugins/vue-clipboard2';
|
|
21
26
|
import '../plugins/v-select';
|
|
27
|
+
import '../plugins/directives';
|
|
28
|
+
import '../plugins/clean-html-directive';
|
|
29
|
+
import '../plugins/transitions';
|
|
22
30
|
import '../plugins/vue-js-modal';
|
|
23
31
|
import '../plugins/js-yaml';
|
|
24
32
|
import '../plugins/resize';
|
|
@@ -39,28 +47,22 @@ import '../plugins/formatters';
|
|
|
39
47
|
import version from '../plugins/version';
|
|
40
48
|
import steveCreateWorker from '../plugins/steve-create-worker';
|
|
41
49
|
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
// and prevent an existing directive from being overwritten
|
|
45
|
-
const directiveNames = {};
|
|
46
|
-
const vueDirective = Vue.directive;
|
|
47
|
-
|
|
48
|
-
Vue.directive = function(name) {
|
|
49
|
-
if (directiveNames[name]) {
|
|
50
|
-
console.log(`Can not override directive: ${ name }`); // eslint-disable-line no-console
|
|
50
|
+
// Component: <ClientOnly>
|
|
51
|
+
Vue.component(ClientOnly.name, ClientOnly);
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
// TODO: Remove in Nuxt 3: <NoSsr>
|
|
54
|
+
Vue.component(NoSsr.name, {
|
|
55
|
+
...NoSsr,
|
|
56
|
+
render(h, ctx) {
|
|
57
|
+
if (process.client && !NoSsr._warned) {
|
|
58
|
+
NoSsr._warned = true;
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
vueDirective.apply(Vue, arguments);
|
|
58
|
-
};
|
|
60
|
+
console.warn('<no-ssr> has been deprecated and will be removed in Nuxt 3, please use <client-only> instead'); // eslint-disable-line no-console
|
|
61
|
+
}
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
loadDirectives();
|
|
63
|
+
return NoSsr.render(h, ctx);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
64
66
|
|
|
65
67
|
// Component: <NuxtChild>
|
|
66
68
|
Vue.component(NuxtChild.name, NuxtChild);
|
|
@@ -75,7 +77,7 @@ Object.defineProperty(Vue.prototype, '$nuxt', {
|
|
|
75
77
|
get() {
|
|
76
78
|
const globalNuxt = this.$root.$options.$nuxt;
|
|
77
79
|
|
|
78
|
-
if (!globalNuxt && typeof window !== 'undefined') {
|
|
80
|
+
if (process.client && !globalNuxt && typeof window !== 'undefined') {
|
|
79
81
|
return window.$nuxt;
|
|
80
82
|
}
|
|
81
83
|
|
|
@@ -84,10 +86,18 @@ Object.defineProperty(Vue.prototype, '$nuxt', {
|
|
|
84
86
|
configurable: true
|
|
85
87
|
});
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
Vue.use(Meta, {
|
|
90
|
+
keyName: 'head', attribute: 'data-n-head', ssrAttribute: 'data-n-head-ssr', tagIDKeyName: 'hid'
|
|
91
|
+
});
|
|
89
92
|
|
|
90
|
-
|
|
93
|
+
const defaultTransition = {
|
|
94
|
+
name: 'page', mode: 'out-in', appear: true, appearClass: 'appear', appearActiveClass: 'appear-active', appearToClass: 'appear-to'
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
async function createApp(ssrContext, config = {}) {
|
|
98
|
+
const router = await createRouter(ssrContext, config);
|
|
99
|
+
|
|
100
|
+
const store = createStore(ssrContext);
|
|
91
101
|
|
|
92
102
|
// Add this.$router into store actions/mutations
|
|
93
103
|
store.$router = router;
|
|
@@ -97,9 +107,40 @@ async function createApp(config = {}) {
|
|
|
97
107
|
// here we inject the router and store to all child components,
|
|
98
108
|
// making them available everywhere as `this.$router` and `this.$store`.
|
|
99
109
|
const app = {
|
|
110
|
+
head: {
|
|
111
|
+
title: 'dashboard',
|
|
112
|
+
meta: [{ charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, {
|
|
113
|
+
hid: 'description', name: 'description', content: 'Rancher Dashboard'
|
|
114
|
+
}],
|
|
115
|
+
style: [],
|
|
116
|
+
script: []
|
|
117
|
+
},
|
|
118
|
+
|
|
100
119
|
store,
|
|
101
120
|
router,
|
|
102
121
|
nuxt: {
|
|
122
|
+
defaultTransition,
|
|
123
|
+
transitions: [defaultTransition],
|
|
124
|
+
setTransitions(transitions) {
|
|
125
|
+
if (!Array.isArray(transitions)) {
|
|
126
|
+
transitions = [transitions];
|
|
127
|
+
}
|
|
128
|
+
transitions = transitions.map((transition) => {
|
|
129
|
+
if (!transition) {
|
|
130
|
+
transition = defaultTransition;
|
|
131
|
+
} else if (typeof transition === 'string') {
|
|
132
|
+
transition = Object.assign({}, defaultTransition, { name: transition });
|
|
133
|
+
} else {
|
|
134
|
+
transition = Object.assign({}, defaultTransition, transition);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return transition;
|
|
138
|
+
});
|
|
139
|
+
this.$options.nuxt.transitions = transitions;
|
|
140
|
+
|
|
141
|
+
return transitions;
|
|
142
|
+
},
|
|
143
|
+
|
|
103
144
|
err: null,
|
|
104
145
|
dateErr: null,
|
|
105
146
|
error(err) {
|
|
@@ -113,6 +154,10 @@ async function createApp(config = {}) {
|
|
|
113
154
|
}
|
|
114
155
|
nuxt.dateErr = Date.now();
|
|
115
156
|
nuxt.err = err;
|
|
157
|
+
// Used in src/server.js
|
|
158
|
+
if (ssrContext) {
|
|
159
|
+
ssrContext.nuxt.error = err;
|
|
160
|
+
}
|
|
116
161
|
|
|
117
162
|
return err;
|
|
118
163
|
}
|
|
@@ -123,21 +168,29 @@ async function createApp(config = {}) {
|
|
|
123
168
|
// Make app available into store via this.app
|
|
124
169
|
store.app = app;
|
|
125
170
|
|
|
126
|
-
const next = (location) => app.router.push(location);
|
|
171
|
+
const next = ssrContext ? ssrContext.next : (location) => app.router.push(location);
|
|
127
172
|
// Resolve route
|
|
173
|
+
let route;
|
|
128
174
|
|
|
129
|
-
|
|
130
|
-
|
|
175
|
+
if (ssrContext) {
|
|
176
|
+
route = router.resolve(ssrContext.url).route;
|
|
177
|
+
} else {
|
|
178
|
+
const path = getLocation(router.options.base, router.options.mode);
|
|
179
|
+
|
|
180
|
+
route = router.resolve(path).route;
|
|
181
|
+
}
|
|
131
182
|
|
|
132
183
|
// Set context to app.context
|
|
133
184
|
await setContext(app, {
|
|
134
185
|
store,
|
|
135
186
|
route,
|
|
136
187
|
next,
|
|
137
|
-
error:
|
|
138
|
-
payload: undefined,
|
|
139
|
-
req:
|
|
140
|
-
res:
|
|
188
|
+
error: app.nuxt.error.bind(app),
|
|
189
|
+
payload: ssrContext ? ssrContext.payload : undefined,
|
|
190
|
+
req: ssrContext ? ssrContext.req : undefined,
|
|
191
|
+
res: ssrContext ? ssrContext.res : undefined,
|
|
192
|
+
beforeRenderFns: ssrContext ? ssrContext.beforeRenderFns : undefined,
|
|
193
|
+
ssrContext
|
|
141
194
|
});
|
|
142
195
|
|
|
143
196
|
function inject(key, value) {
|
|
@@ -181,11 +234,20 @@ async function createApp(config = {}) {
|
|
|
181
234
|
// Inject runtime config as $config
|
|
182
235
|
inject('config', config);
|
|
183
236
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
237
|
+
if (process.client) {
|
|
238
|
+
// Replace store state before plugins execution
|
|
239
|
+
if (window.__NUXT__ && window.__NUXT__.state) {
|
|
240
|
+
store.replaceState(window.__NUXT__.state);
|
|
241
|
+
}
|
|
187
242
|
}
|
|
188
243
|
|
|
244
|
+
// Add enablePreview(previewData = {}) in context for plugins
|
|
245
|
+
if (process.static && process.client) {
|
|
246
|
+
app.context.enablePreview = function(previewData = {}) {
|
|
247
|
+
app.previewData = Object.assign({}, previewData);
|
|
248
|
+
inject('preview', previewData);
|
|
249
|
+
};
|
|
250
|
+
}
|
|
189
251
|
// Plugin execution
|
|
190
252
|
|
|
191
253
|
// if (typeof nuxt_plugin_portalvue_6babae27 === 'function') {
|
|
@@ -212,15 +274,15 @@ async function createApp(config = {}) {
|
|
|
212
274
|
await axiosShell(app.context, inject);
|
|
213
275
|
}
|
|
214
276
|
|
|
215
|
-
if (typeof intNumber === 'function') {
|
|
277
|
+
if (process.client && typeof intNumber === 'function') {
|
|
216
278
|
await intNumber(app.context, inject);
|
|
217
279
|
}
|
|
218
280
|
|
|
219
|
-
if (typeof positiveIntNumber === 'function') {
|
|
281
|
+
if (process.client && typeof positiveIntNumber === 'function') {
|
|
220
282
|
await positiveIntNumber(app.context, inject);
|
|
221
283
|
}
|
|
222
284
|
|
|
223
|
-
if (typeof nuxtClientInit === 'function') {
|
|
285
|
+
if (process.client && typeof nuxtClientInit === 'function') {
|
|
224
286
|
await nuxtClientInit(app.context, inject);
|
|
225
287
|
}
|
|
226
288
|
|
|
@@ -232,31 +294,43 @@ async function createApp(config = {}) {
|
|
|
232
294
|
await backButton(app.context, inject);
|
|
233
295
|
}
|
|
234
296
|
|
|
235
|
-
if (typeof plugin === 'function') {
|
|
297
|
+
if (process.client && typeof plugin === 'function') {
|
|
236
298
|
await plugin(app.context, inject);
|
|
237
299
|
}
|
|
238
300
|
|
|
239
|
-
if (typeof codeMirror === 'function') {
|
|
301
|
+
if (process.client && typeof codeMirror === 'function') {
|
|
240
302
|
await codeMirror(app.context, inject);
|
|
241
303
|
}
|
|
242
304
|
|
|
243
|
-
if (typeof version === 'function') {
|
|
305
|
+
if (process.client && typeof version === 'function') {
|
|
244
306
|
await version(app.context, inject);
|
|
245
307
|
}
|
|
246
308
|
|
|
247
|
-
if (typeof steveCreateWorker === 'function') {
|
|
309
|
+
if (process.client && typeof steveCreateWorker === 'function') {
|
|
248
310
|
await steveCreateWorker(app.context, inject);
|
|
249
311
|
}
|
|
250
312
|
|
|
313
|
+
// if (process.client && typeof formatters === 'function') {
|
|
314
|
+
// await formatters(app.context, inject);
|
|
315
|
+
// }
|
|
316
|
+
|
|
317
|
+
// Lock enablePreview in context
|
|
318
|
+
if (process.static && process.client) {
|
|
319
|
+
app.context.enablePreview = function() {
|
|
320
|
+
console.warn('You cannot call enablePreview() outside a plugin.'); // eslint-disable-line no-console
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
|
|
251
324
|
// Wait for async component to be resolved first
|
|
252
325
|
await new Promise((resolve, reject) => {
|
|
253
326
|
// Ignore 404s rather than blindly replacing URL in browser
|
|
254
|
-
|
|
327
|
+
if (process.client) {
|
|
328
|
+
const { route } = router.resolve(app.context.route.fullPath);
|
|
255
329
|
|
|
256
|
-
|
|
257
|
-
|
|
330
|
+
if (!route.matched.length) {
|
|
331
|
+
return resolve();
|
|
332
|
+
}
|
|
258
333
|
}
|
|
259
|
-
|
|
260
334
|
router.replace(app.context.route.fullPath, resolve, (err) => {
|
|
261
335
|
// https://github.com/vuejs/vue-router/blob/v3.4.3/src/util/errors.js
|
|
262
336
|
if (!err._isRouter) {
|
|
@@ -268,6 +342,9 @@ async function createApp(config = {}) {
|
|
|
268
342
|
|
|
269
343
|
// navigated to a different route in router guard
|
|
270
344
|
const unregister = router.afterEach(async(to, from) => {
|
|
345
|
+
if (process.server && ssrContext && ssrContext.url) {
|
|
346
|
+
ssrContext.url = to.fullPath;
|
|
347
|
+
}
|
|
271
348
|
app.context.route = await getRouteData(to);
|
|
272
349
|
app.context.params = to.params || {};
|
|
273
350
|
app.context.query = to.query || {};
|
|
@@ -284,4 +361,4 @@ async function createApp(config = {}) {
|
|
|
284
361
|
};
|
|
285
362
|
}
|
|
286
363
|
|
|
287
|
-
export { createApp };
|
|
364
|
+
export { createApp, NuxtError };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { sanitizeComponent } from '@shell/utils/nuxt';
|
|
2
|
+
import blank from '@shell/layouts/blank.vue';
|
|
3
|
+
import defaultLayout from '@shell/layouts/default.vue';
|
|
4
|
+
import home from '@shell/layouts/home.vue';
|
|
5
|
+
import plain from '@shell/layouts/plain.vue';
|
|
6
|
+
import unauthenticated from '@shell/layouts/unauthenticated.vue';
|
|
7
|
+
import standalone from '@shell/layouts/standalone.vue';
|
|
8
|
+
|
|
9
|
+
export type Component = { [key: string]: any };
|
|
10
|
+
export type Layouts = { [key: string]: Component };
|
|
11
|
+
const layouts: Layouts = { };
|
|
12
|
+
|
|
13
|
+
export function getLayouts(): Layouts {
|
|
14
|
+
return layouts;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function registerLayout(name: string, component: Component): void {
|
|
18
|
+
layouts[`_${ name }`] = sanitizeComponent(component);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
registerLayout('blank', blank) ;
|
|
22
|
+
registerLayout('default', defaultLayout) ;
|
|
23
|
+
registerLayout('home', home) ;
|
|
24
|
+
registerLayout('plain', plain) ;
|
|
25
|
+
registerLayout('unauthenticated', unauthenticated) ;
|
|
26
|
+
registerLayout('standalone', standalone);
|
|
@@ -248,10 +248,7 @@ export default {
|
|
|
248
248
|
v-if="clusterAndRouteReady"
|
|
249
249
|
class="main-layout"
|
|
250
250
|
>
|
|
251
|
-
<
|
|
252
|
-
:key="$route.path"
|
|
253
|
-
class="outlet"
|
|
254
|
-
/>
|
|
251
|
+
<nuxt class="outlet" />
|
|
255
252
|
<ActionMenu />
|
|
256
253
|
<PromptRemove />
|
|
257
254
|
<PromptRestore />
|
|
@@ -285,10 +282,7 @@ export default {
|
|
|
285
282
|
v-else-if="unmatchedRoute"
|
|
286
283
|
class="main-layout"
|
|
287
284
|
>
|
|
288
|
-
<
|
|
289
|
-
:key="$route.path"
|
|
290
|
-
class="outlet"
|
|
291
|
-
/>
|
|
285
|
+
<nuxt class="outlet" />
|
|
292
286
|
</main>
|
|
293
287
|
<div
|
|
294
288
|
v-if="$refs.draggableZone"
|
|
@@ -310,3 +304,99 @@ export default {
|
|
|
310
304
|
<DraggableZone ref="draggableZone" />
|
|
311
305
|
</div>
|
|
312
306
|
</template>
|
|
307
|
+
<style lang="scss">
|
|
308
|
+
.dashboard-root {
|
|
309
|
+
display: flex;
|
|
310
|
+
flex-direction: column;
|
|
311
|
+
height: 100vh;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.dashboard-content {
|
|
315
|
+
display: grid;
|
|
316
|
+
position: relative;
|
|
317
|
+
flex: 1 1 auto;
|
|
318
|
+
overflow-y: auto;
|
|
319
|
+
min-height: 0px;
|
|
320
|
+
|
|
321
|
+
&.dashboard-padding-left {
|
|
322
|
+
padding-left: $app-bar-collapsed-width;
|
|
323
|
+
|
|
324
|
+
.overlay-content-mode {
|
|
325
|
+
left: calc(var(--nav-width) + $app-bar-collapsed-width);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&.pin-right {
|
|
330
|
+
grid-template-areas:
|
|
331
|
+
"header header header"
|
|
332
|
+
"nav main wm";
|
|
333
|
+
grid-template-rows: var(--header-height) auto;
|
|
334
|
+
grid-template-columns: var(--nav-width) auto var(--wm-width, 0px);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
&.pin-bottom {
|
|
338
|
+
grid-template-areas:
|
|
339
|
+
"header header"
|
|
340
|
+
"nav main"
|
|
341
|
+
"wm wm";
|
|
342
|
+
grid-template-rows: var(--header-height) auto var(--wm-height, 0px);
|
|
343
|
+
grid-template-columns: var(--nav-width) auto;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
&.pin-left {
|
|
347
|
+
grid-template-areas:
|
|
348
|
+
"header header header"
|
|
349
|
+
"wm nav main";
|
|
350
|
+
grid-template-rows: var(--header-height) auto;
|
|
351
|
+
grid-template-columns: var(--wm-width, 0px) var(--nav-width) auto;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
> HEADER {
|
|
355
|
+
grid-area: header;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.default-side-nav {
|
|
359
|
+
grid-area: nav;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.wm {
|
|
364
|
+
grid-area: wm;
|
|
365
|
+
overflow-y: hidden;
|
|
366
|
+
z-index: 1;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.localeSelector {
|
|
370
|
+
::v-deep .popover-inner {
|
|
371
|
+
padding: 50px 0;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
::v-deep .popover-arrow {
|
|
375
|
+
display: none;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
::v-deep .popover:focus {
|
|
379
|
+
outline: 0;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
li {
|
|
383
|
+
padding: 8px 20px;
|
|
384
|
+
|
|
385
|
+
&:hover {
|
|
386
|
+
background-color: var(--primary-hover-bg);
|
|
387
|
+
color: var(--primary-hover-text);
|
|
388
|
+
text-decoration: none;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.drag-start {
|
|
394
|
+
z-index: 1000;
|
|
395
|
+
opacity: 0.5;
|
|
396
|
+
transition: opacity .3s ease;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.drag-end {
|
|
400
|
+
opacity: 1;
|
|
401
|
+
}
|
|
402
|
+
</style>
|
|
@@ -5,15 +5,18 @@ export default {
|
|
|
5
5
|
name: 'NuxtError',
|
|
6
6
|
mixins: [Brand],
|
|
7
7
|
middleware: ['unauthenticated'],
|
|
8
|
+
props: {
|
|
9
|
+
error: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: null
|
|
12
|
+
}
|
|
13
|
+
},
|
|
8
14
|
|
|
9
15
|
data() {
|
|
10
16
|
return { ready: false };
|
|
11
17
|
},
|
|
12
18
|
|
|
13
19
|
computed: {
|
|
14
|
-
error() {
|
|
15
|
-
return window.$nuxt.nuxt.err || {};
|
|
16
|
-
},
|
|
17
20
|
statusCode() {
|
|
18
21
|
return (this.error && this.error.statusCode) || 599;
|
|
19
22
|
},
|
|
@@ -21,11 +24,6 @@ export default {
|
|
|
21
24
|
return this.error.message || '';
|
|
22
25
|
}
|
|
23
26
|
},
|
|
24
|
-
watch: {
|
|
25
|
-
message(neu) {
|
|
26
|
-
document.title = neu;
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
27
|
|
|
30
28
|
mounted() {
|
|
31
29
|
// If the page isn't a sub-path of the base url, redirect to it instead of saying not found.
|
|
@@ -42,8 +40,19 @@ export default {
|
|
|
42
40
|
setTimeout(() => {
|
|
43
41
|
this.ready = true;
|
|
44
42
|
}, 1000);
|
|
45
|
-
document.title = this.message;
|
|
46
43
|
},
|
|
44
|
+
|
|
45
|
+
head() {
|
|
46
|
+
return {
|
|
47
|
+
title: this.message,
|
|
48
|
+
meta: [
|
|
49
|
+
{
|
|
50
|
+
name: 'viewport',
|
|
51
|
+
content: 'width=device-width,initial-scale=1.0,minimum-scale=1.0'
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
};
|
|
55
|
+
}
|
|
47
56
|
};
|
|
48
57
|
</script>
|
|
49
58
|
|
|
@@ -103,7 +112,7 @@ export default {
|
|
|
103
112
|
-ms-text-size-adjust: 100%;
|
|
104
113
|
-webkit-text-size-adjust: 100%;
|
|
105
114
|
-webkit-font-smoothing: antialiased;
|
|
106
|
-
position:
|
|
115
|
+
position: absolute;
|
|
107
116
|
top: 0;
|
|
108
117
|
left: 0;
|
|
109
118
|
right: 0;
|
|
@@ -70,10 +70,7 @@ export default {
|
|
|
70
70
|
<Header :simple="true" />
|
|
71
71
|
<main class="main-layout">
|
|
72
72
|
<IndentedPanel class="pt-20">
|
|
73
|
-
<
|
|
74
|
-
:key="$route.path"
|
|
75
|
-
class="outlet"
|
|
76
|
-
/>
|
|
73
|
+
<nuxt class="outlet" />
|
|
77
74
|
</IndentedPanel>
|
|
78
75
|
<ActionMenu />
|
|
79
76
|
<PromptRemove />
|
|
@@ -39,7 +39,6 @@ export default {
|
|
|
39
39
|
:loading="loading"
|
|
40
40
|
:use-query-params-for-simple-filtering="useQueryParamsForSimpleFiltering"
|
|
41
41
|
:force-update-live-and-delayed="forceUpdateLiveAndDelayed"
|
|
42
|
-
data-testid="installed-app-catalog-list"
|
|
43
42
|
>
|
|
44
43
|
<template #cell:upgrade="{row}">
|
|
45
44
|
<span
|
|
@@ -44,7 +44,13 @@ export default {
|
|
|
44
44
|
this.serverUrl = this.serverUrlSetting.value;
|
|
45
45
|
} else {
|
|
46
46
|
this.noUrlSet = true;
|
|
47
|
-
|
|
47
|
+
if ( process.server ) {
|
|
48
|
+
const { req } = this.$nuxt.context;
|
|
49
|
+
|
|
50
|
+
this.serverUrl = req.headers.host;
|
|
51
|
+
} else {
|
|
52
|
+
this.serverUrl = window.location.origin;
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
},
|
|
50
56
|
|
|
@@ -5,6 +5,7 @@ import { NAME } from '@shell/config/product/auth';
|
|
|
5
5
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
6
6
|
import Masthead from '@shell/components/ResourceList/Masthead';
|
|
7
7
|
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
8
|
+
import { isAdminUser } from '@shell/store/type-map';
|
|
8
9
|
|
|
9
10
|
export default {
|
|
10
11
|
components: {
|
|
@@ -86,8 +87,11 @@ export default {
|
|
|
86
87
|
});
|
|
87
88
|
|
|
88
89
|
return requiredUsers;
|
|
89
|
-
}
|
|
90
|
+
},
|
|
90
91
|
|
|
92
|
+
isAdmin() {
|
|
93
|
+
return isAdminUser(this.$store.getters);
|
|
94
|
+
},
|
|
91
95
|
},
|
|
92
96
|
|
|
93
97
|
methods: {
|
|
@@ -128,6 +132,19 @@ export default {
|
|
|
128
132
|
@click="refreshGroupMemberships"
|
|
129
133
|
/>
|
|
130
134
|
</template>
|
|
135
|
+
<template
|
|
136
|
+
v-if="isAdmin"
|
|
137
|
+
#subHeader
|
|
138
|
+
>
|
|
139
|
+
<router-link
|
|
140
|
+
:to="{ name: 'c-cluster-auth-user.retention'}"
|
|
141
|
+
class="btn role-link btn-sm btn-user-retention"
|
|
142
|
+
data-testid="router-link-user-retention"
|
|
143
|
+
>
|
|
144
|
+
<i class="icon icon-gear" />
|
|
145
|
+
{{ t('user.retention.button.label') }}
|
|
146
|
+
</router-link>
|
|
147
|
+
</template>
|
|
131
148
|
</Masthead>
|
|
132
149
|
|
|
133
150
|
<ResourceTable
|
|
@@ -142,4 +159,11 @@ export default {
|
|
|
142
159
|
</template>
|
|
143
160
|
|
|
144
161
|
<style lang="scss">
|
|
162
|
+
|
|
163
|
+
.btn-user-retention {
|
|
164
|
+
display: flex;
|
|
165
|
+
gap: 0.25rem;
|
|
166
|
+
padding: 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
145
169
|
</style>
|
package/list/node.vue
CHANGED
|
@@ -167,7 +167,6 @@ export default {
|
|
|
167
167
|
:loading="loading"
|
|
168
168
|
:use-query-params-for-simple-filtering="useQueryParamsForSimpleFiltering"
|
|
169
169
|
:force-update-live-and-delayed="forceUpdateLiveAndDelayed"
|
|
170
|
-
data-testid="cluster-node-list"
|
|
171
170
|
v-on="$listeners"
|
|
172
171
|
>
|
|
173
172
|
<template #sub-row="{fullColspan, row, onRowMouseEnter, onRowMouseLeave}">
|