@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
|
@@ -47,7 +47,7 @@ describe('component: KeyValue', () => {
|
|
|
47
47
|
stubs: { CodeMirror: true }
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
const inputFieldTextArea = wrapper.find('[data-testid="
|
|
50
|
+
const inputFieldTextArea = wrapper.find('[data-testid="value-multiline"]');
|
|
51
51
|
|
|
52
52
|
inputFieldTextArea.setValue('bar\n');
|
|
53
53
|
|
|
@@ -2,24 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
props: {
|
|
5
|
-
// When sortabletable calculates these values it converts null and undefined to ''
|
|
6
|
-
// passing '' to a prop typed as Boolean coerces it to true
|
|
7
5
|
value: {
|
|
8
|
-
type:
|
|
6
|
+
type: Boolean,
|
|
9
7
|
default: true
|
|
10
8
|
},
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
computed: {
|
|
14
|
-
checked() {
|
|
15
|
-
return this.value === true || this.value === 'true';
|
|
16
|
-
}
|
|
17
|
-
},
|
|
9
|
+
}
|
|
18
10
|
};
|
|
19
11
|
</script>
|
|
20
12
|
|
|
21
13
|
<template>
|
|
22
|
-
<span v-if="
|
|
14
|
+
<span v-if="value">
|
|
23
15
|
<i class="icon icon-checkmark" />
|
|
24
16
|
</span>
|
|
25
17
|
<span
|
|
@@ -6,6 +6,23 @@ export default {
|
|
|
6
6
|
required: true
|
|
7
7
|
},
|
|
8
8
|
},
|
|
9
|
+
data(props) {
|
|
10
|
+
const mgmt = props.row?.mgmt;
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
// The isImported getter on the provisioning cluster
|
|
14
|
+
// model doesn't work for imported K3s clusters, in
|
|
15
|
+
// which case it returns 'k3s' instead of 'imported.'
|
|
16
|
+
// This is the workaround.
|
|
17
|
+
isImported: mgmt?.providerForEmberParam === 'import' ||
|
|
18
|
+
// when imported cluster is GKE
|
|
19
|
+
!!mgmt?.spec?.gkeConfig?.imported ||
|
|
20
|
+
// or AKS
|
|
21
|
+
!!mgmt?.spec?.aksConfig?.imported ||
|
|
22
|
+
// or EKS
|
|
23
|
+
!!mgmt?.spec?.eksConfig?.imported
|
|
24
|
+
};
|
|
25
|
+
},
|
|
9
26
|
};
|
|
10
27
|
</script>
|
|
11
28
|
|
|
@@ -28,7 +45,7 @@ export default {
|
|
|
28
45
|
<template v-else-if="row.isCustom">
|
|
29
46
|
{{ t('cluster.provider.custom') }}
|
|
30
47
|
</template>
|
|
31
|
-
<template v-else-if="
|
|
48
|
+
<template v-else-if="isImported">
|
|
32
49
|
{{ t('cluster.provider.imported') }}
|
|
33
50
|
</template>
|
|
34
51
|
<div class="text-muted">
|
|
@@ -12,22 +12,10 @@ export default {
|
|
|
12
12
|
type: Object,
|
|
13
13
|
required: true
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
clusterLabel: {
|
|
17
|
-
type: String,
|
|
18
|
-
required: false,
|
|
19
|
-
default: null,
|
|
20
|
-
}
|
|
21
15
|
},
|
|
22
16
|
|
|
23
17
|
computed: {
|
|
24
18
|
summary() {
|
|
25
|
-
if (this.clusterLabel) {
|
|
26
|
-
return this.row.clusterResourceStatus.find((x) => {
|
|
27
|
-
return x.clusterLabel === this.clusterLabel;
|
|
28
|
-
})?.status.resourceCounts || {};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
19
|
return this.row.status?.resourceCounts || {};
|
|
32
20
|
},
|
|
33
21
|
|
|
@@ -85,7 +73,7 @@ export default {
|
|
|
85
73
|
>
|
|
86
74
|
<td
|
|
87
75
|
class="text-left pr-20"
|
|
88
|
-
:class="{
|
|
76
|
+
:class="{[obj.textColor]: true}"
|
|
89
77
|
>
|
|
90
78
|
{{ obj.label }}
|
|
91
79
|
</td>
|
|
@@ -106,17 +94,17 @@ export default {
|
|
|
106
94
|
</template>
|
|
107
95
|
|
|
108
96
|
<style lang="scss">
|
|
109
|
-
.col-scale {
|
|
110
|
-
|
|
97
|
+
.col-scale {
|
|
98
|
+
position: relative;
|
|
111
99
|
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
.trigger {
|
|
101
|
+
width: 100%;
|
|
102
|
+
}
|
|
114
103
|
}
|
|
115
|
-
}
|
|
116
104
|
|
|
117
|
-
.scale {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
105
|
+
.scale {
|
|
106
|
+
margin: 0;
|
|
107
|
+
padding: 0;
|
|
108
|
+
line-height: initial;
|
|
109
|
+
}
|
|
122
110
|
</style>
|
|
@@ -34,6 +34,16 @@ export default {
|
|
|
34
34
|
showTooltip: {
|
|
35
35
|
type: Boolean,
|
|
36
36
|
default: true
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Determines if the live date should behave like a countdown by comparing
|
|
41
|
+
* the provided value and the current date. When the countdown reaches 0, a
|
|
42
|
+
* "-" is rendered.
|
|
43
|
+
*/
|
|
44
|
+
isCountdown: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
37
47
|
}
|
|
38
48
|
},
|
|
39
49
|
|
|
@@ -104,6 +114,12 @@ export default {
|
|
|
104
114
|
return 300;
|
|
105
115
|
}
|
|
106
116
|
|
|
117
|
+
if (this.isCountdown && now.valueOf() > this.dayValue?.valueOf()) {
|
|
118
|
+
this.label = '-';
|
|
119
|
+
|
|
120
|
+
return 300;
|
|
121
|
+
}
|
|
122
|
+
|
|
107
123
|
const diff = diffFrom(this.dayValue, now);
|
|
108
124
|
const prefix = (diff.diff < 0 || !this.addPrefix ? '' : '-');
|
|
109
125
|
|
|
@@ -27,7 +27,6 @@ export default {
|
|
|
27
27
|
|
|
28
28
|
try {
|
|
29
29
|
out = JSON.parse(this.value);
|
|
30
|
-
|
|
31
30
|
out.forEach((endpoint) => {
|
|
32
31
|
let protocol = 'http';
|
|
33
32
|
|
|
@@ -35,19 +34,10 @@ export default {
|
|
|
35
34
|
protocol = 'https';
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// If there's an ingress and it has a hostname, we use the hostname address instead
|
|
41
|
-
// https://github.com/rancher/dashboard/issues/8087
|
|
42
|
-
if (endpoint.ingressName && endpoint.hostname) {
|
|
43
|
-
endpoint.link = `${ protocol }://${ endpoint.hostname }${ endpoint.path }`;
|
|
44
|
-
endpoint.linkDisplay = endpoint.link;
|
|
45
|
-
} else if (endpoint.addresses && endpoint.addresses.length) {
|
|
37
|
+
if (endpoint.addresses) {
|
|
46
38
|
endpoint.link = `${ protocol }://${ endpoint.addresses[0] }:${ endpoint.port }`;
|
|
47
|
-
endpoint.linkDisplay = linkDefaultDisplay;
|
|
48
39
|
} else if (externalIp) {
|
|
49
40
|
endpoint.link = `${ protocol }://${ externalIp }:${ endpoint.port }`;
|
|
50
|
-
endpoint.linkDisplay = linkDefaultDisplay;
|
|
51
41
|
} else {
|
|
52
42
|
endpoint.display = `[${ this.t('servicesPage.anyNode') }]:${ endpoint.port }`;
|
|
53
43
|
}
|
|
@@ -59,6 +49,26 @@ export default {
|
|
|
59
49
|
}
|
|
60
50
|
}
|
|
61
51
|
|
|
52
|
+
return null;
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
protocol() {
|
|
56
|
+
const { parsed } = this;
|
|
57
|
+
|
|
58
|
+
if ( parsed) {
|
|
59
|
+
if (this.parsed[0].protocol) {
|
|
60
|
+
return this.parsed[0].protocol;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const match = parsed.match(/^([^:]+):\/\//);
|
|
64
|
+
|
|
65
|
+
if ( match ) {
|
|
66
|
+
return match[1];
|
|
67
|
+
} else {
|
|
68
|
+
return 'link';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
62
72
|
return null;
|
|
63
73
|
}
|
|
64
74
|
},
|
|
@@ -80,7 +90,7 @@ export default {
|
|
|
80
90
|
:href="endpoint.link"
|
|
81
91
|
target="_blank"
|
|
82
92
|
rel="nofollow noopener noreferrer"
|
|
83
|
-
>{{ endpoint.
|
|
93
|
+
><span v-if="endpoint.port">{{ endpoint.port }}/</span>{{ endpoint.protocol }}</a>
|
|
84
94
|
</template>
|
|
85
95
|
</span>
|
|
86
96
|
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import ClusterProvider from '@shell/components/formatter/ClusterProvider.vue';
|
|
3
|
+
|
|
4
|
+
describe('component: ClusterProvider', () => {
|
|
5
|
+
const importedGkeClusterInfo = { mgmt: { spec: { gkeConfig: { imported: true } } } };
|
|
6
|
+
const importedAksClusterInfo = { mgmt: { spec: { aksConfig: { imported: true } } } };
|
|
7
|
+
const importedEksClusterInfo = { mgmt: { spec: { eksConfig: { imported: true } } } };
|
|
8
|
+
const notImportedGkeClusterInfo = { mgmt: { spec: { gkeConfig: { imported: false } } } };
|
|
9
|
+
const importedClusterInfoWithProviderForEmberParam = { mgmt: { providerForEmberParam: 'import' } };
|
|
10
|
+
|
|
11
|
+
describe('isImported', () => {
|
|
12
|
+
const testCases = [
|
|
13
|
+
[importedGkeClusterInfo, true],
|
|
14
|
+
[importedAksClusterInfo, true],
|
|
15
|
+
[importedEksClusterInfo, true],
|
|
16
|
+
[notImportedGkeClusterInfo, false],
|
|
17
|
+
[importedClusterInfoWithProviderForEmberParam, true],
|
|
18
|
+
[{}, false],
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
it.each(testCases)('should return the isImported value properly based on the props data', (row, expected) => {
|
|
22
|
+
const wrapper = mount(ClusterProvider, { propsData: { row } });
|
|
23
|
+
|
|
24
|
+
expect(wrapper.vm.$data.isImported).toBe(expected);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
});
|
package/components/nav/Group.vue
CHANGED
|
@@ -390,8 +390,8 @@ export default {
|
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
.body ::v-deep > .child.
|
|
394
|
-
.header ::v-deep > .child.
|
|
393
|
+
.body ::v-deep > .child.nuxt-link-active,
|
|
394
|
+
.header ::v-deep > .child.nuxt-link-exact-active {
|
|
395
395
|
padding: 0;
|
|
396
396
|
|
|
397
397
|
A, A I {
|
|
@@ -311,7 +311,7 @@ export default {
|
|
|
311
311
|
product: this.currentProduct.name,
|
|
312
312
|
cluster: this.currentCluster,
|
|
313
313
|
};
|
|
314
|
-
const enabled = action.enabled ? action.enabled.apply(this, [
|
|
314
|
+
const enabled = action.enabled ? action.enabled.apply(this, [opts]) : true;
|
|
315
315
|
|
|
316
316
|
if (fn && enabled) {
|
|
317
317
|
fn.apply(this, [opts, [], { $route: this.$route }]);
|
|
@@ -432,7 +432,6 @@ export default {
|
|
|
432
432
|
>
|
|
433
433
|
<BrandImage
|
|
434
434
|
class="side-menu-logo-img"
|
|
435
|
-
data-testid="header-side-menu__brand-img"
|
|
436
435
|
file-name="rancher-logo.svg"
|
|
437
436
|
/>
|
|
438
437
|
</div>
|
|
@@ -442,6 +441,7 @@ export default {
|
|
|
442
441
|
|
|
443
442
|
<div class="rd-header-right">
|
|
444
443
|
<component :is="navHeaderRight" />
|
|
444
|
+
|
|
445
445
|
<div
|
|
446
446
|
v-if="showFilter"
|
|
447
447
|
class="top"
|
package/components/nav/Jump.vue
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import debounce from 'lodash/debounce';
|
|
3
3
|
import Group from '@shell/components/nav/Group';
|
|
4
4
|
import { isMac } from '@shell/utils/platform';
|
|
5
|
-
import { BOTH,
|
|
6
|
-
import { COUNT } from '@shell/config/types';
|
|
5
|
+
import { BOTH, ALL } from '@shell/store/type-map';
|
|
7
6
|
|
|
8
7
|
export default {
|
|
9
8
|
components: { Group },
|
|
@@ -32,26 +31,17 @@ export default {
|
|
|
32
31
|
methods: {
|
|
33
32
|
updateMatches() {
|
|
34
33
|
const clusterId = this.$store.getters['clusterId'];
|
|
35
|
-
const
|
|
36
|
-
const product = this.$store.getters['
|
|
34
|
+
const isAllNamespaces = this.$store.getters['isAllNamespaces'];
|
|
35
|
+
const product = this.$store.getters['productId'];
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
const allTypes = allTypesByMode[TYPE_MODES.ALL];
|
|
40
|
-
const out = this.$store.getters['type-map/getTree'](productId, TYPE_MODES.ALL, allTypes, clusterId, BOTH, null, this.value);
|
|
37
|
+
let namespaces = null;
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
if ( !isAllNamespaces ) {
|
|
40
|
+
namespaces = Object.keys(this.$store.getters['activeNamespaceCache']);
|
|
41
|
+
}
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const count = counts[t.name];
|
|
49
|
-
|
|
50
|
-
t.count = count ? count.summary.count || 0 : null;
|
|
51
|
-
t.byNamespace = count ? count.namespaces : {};
|
|
52
|
-
t.revision = count ? count.revision : null;
|
|
53
|
-
});
|
|
54
|
-
});
|
|
43
|
+
const allTypes = this.$store.getters['type-map/allTypes'](product) || {};
|
|
44
|
+
const out = this.$store.getters['type-map/getTree'](product, ALL, allTypes, clusterId, BOTH, namespaces, null, this.value);
|
|
55
45
|
|
|
56
46
|
this.groups = out;
|
|
57
47
|
|
|
@@ -13,7 +13,6 @@ import { getVersionInfo } from '@shell/utils/version';
|
|
|
13
13
|
import { LEGACY } from '@shell/store/features';
|
|
14
14
|
import { SETTING } from '@shell/config/settings';
|
|
15
15
|
import { filterOnlyKubernetesClusters, filterHiddenLocalCluster } from '@shell/utils/cluster';
|
|
16
|
-
import { getProductFromRoute } from '@shell/middleware/authenticated';
|
|
17
16
|
import { isRancherPrime } from '@shell/config/version';
|
|
18
17
|
import Pinned from '@shell/components/nav/Pinned';
|
|
19
18
|
|
|
@@ -52,11 +51,13 @@ export default {
|
|
|
52
51
|
...mapGetters(['clusterId']),
|
|
53
52
|
...mapGetters(['clusterReady', 'isRancher', 'currentCluster', 'currentProduct', 'isRancherInHarvester']),
|
|
54
53
|
...mapGetters({ features: 'features/get' }),
|
|
54
|
+
|
|
55
55
|
value: {
|
|
56
56
|
get() {
|
|
57
57
|
return this.$store.getters['productId'];
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
|
+
|
|
60
61
|
sideMenuStyle() {
|
|
61
62
|
return {
|
|
62
63
|
marginBottom: this.globalBannerSettings?.footerFont,
|
|
@@ -73,7 +74,6 @@ export default {
|
|
|
73
74
|
const {
|
|
74
75
|
showFooter, showHeader, bannerFooter, bannerHeader, banner
|
|
75
76
|
} = parsed;
|
|
76
|
-
|
|
77
77
|
// add defaults to accomodate older JSON structures for banner definitions without breaking the UI
|
|
78
78
|
// https://github.com/rancher/dashboard/issues/10140
|
|
79
79
|
const bannerHeaderFontSize = bannerHeader?.fontSize || banner?.fontSize || '14px';
|
|
@@ -169,6 +169,7 @@ export default {
|
|
|
169
169
|
|
|
170
170
|
return `min-height: ${ height }px`;
|
|
171
171
|
},
|
|
172
|
+
|
|
172
173
|
clusterFilterCount() {
|
|
173
174
|
return this.clusterFilter ? this.clustersFiltered.length : this.clusters.length;
|
|
174
175
|
},
|
|
@@ -245,15 +246,7 @@ export default {
|
|
|
245
246
|
|
|
246
247
|
hasSupport() {
|
|
247
248
|
return isRancherPrime() || this.$store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.SUPPORTED )?.value === 'true';
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
isCurrRouteClusterExplorer() {
|
|
251
|
-
return this.$route?.name?.startsWith('c-cluster');
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
productFromRoute() {
|
|
255
|
-
return getProductFromRoute(this.$route);
|
|
256
|
-
},
|
|
249
|
+
}
|
|
257
250
|
},
|
|
258
251
|
|
|
259
252
|
watch: {
|
|
@@ -284,16 +277,6 @@ export default {
|
|
|
284
277
|
return `${ lineHeightInEm }em`;
|
|
285
278
|
},
|
|
286
279
|
|
|
287
|
-
checkActiveRoute(obj, isClusterRoute) {
|
|
288
|
-
// for Cluster links in main nav: check if route is a cluster explorer one + check if route cluster matches cluster obj id + check if curr product matches route product
|
|
289
|
-
if (isClusterRoute) {
|
|
290
|
-
return this.isCurrRouteClusterExplorer && this.$route?.params?.cluster === obj?.id && this.productFromRoute === this.currentProduct?.name;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// for remaining main nav items, check if curr product matches route product is enough
|
|
294
|
-
return this.productFromRoute === obj?.value;
|
|
295
|
-
},
|
|
296
|
-
|
|
297
280
|
handler(e) {
|
|
298
281
|
if (e.keyCode === KEY.ESCAPE ) {
|
|
299
282
|
this.hide();
|
|
@@ -373,10 +356,7 @@ export default {
|
|
|
373
356
|
/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" /></svg>
|
|
374
357
|
</div>
|
|
375
358
|
<div class="side-menu-logo">
|
|
376
|
-
<BrandImage
|
|
377
|
-
data-testid="side-menu__brand-img"
|
|
378
|
-
file-name="rancher-logo.svg"
|
|
379
|
-
/>
|
|
359
|
+
<BrandImage file-name="rancher-logo.svg" />
|
|
380
360
|
</div>
|
|
381
361
|
</div>
|
|
382
362
|
|
|
@@ -425,10 +405,6 @@ export default {
|
|
|
425
405
|
v-model="clusterFilter"
|
|
426
406
|
:placeholder="t('nav.search.placeholder')"
|
|
427
407
|
>
|
|
428
|
-
<i
|
|
429
|
-
class="magnifier icon icon-search"
|
|
430
|
-
:class="{ active: clusterFilter }"
|
|
431
|
-
/>
|
|
432
408
|
<i
|
|
433
409
|
v-if="clusterFilter"
|
|
434
410
|
class="icon icon-close"
|
|
@@ -463,7 +439,6 @@ export default {
|
|
|
463
439
|
<nuxt-link
|
|
464
440
|
class="option"
|
|
465
441
|
:to="a.to"
|
|
466
|
-
:class="{'active-menu-link': checkActiveRoute(a) }"
|
|
467
442
|
>
|
|
468
443
|
<IconOrSvg
|
|
469
444
|
:icon="a.icon"
|
|
@@ -495,7 +470,6 @@ export default {
|
|
|
495
470
|
v-if="c.ready"
|
|
496
471
|
:data-testid="`menu-cluster-${ c.id }`"
|
|
497
472
|
class="cluster selector option"
|
|
498
|
-
:class="{'active-menu-link': checkActiveRoute(c, true) }"
|
|
499
473
|
:to="{ name: 'c-cluster-explorer', params: { cluster: c.id } }"
|
|
500
474
|
>
|
|
501
475
|
<ClusterIconMenu
|
|
@@ -545,7 +519,6 @@ export default {
|
|
|
545
519
|
v-if="c.ready"
|
|
546
520
|
:data-testid="`menu-cluster-${ c.id }`"
|
|
547
521
|
class="cluster selector option"
|
|
548
|
-
:class="{'active-menu-link': checkActiveRoute(c, true) }"
|
|
549
522
|
:to="{ name: 'c-cluster-explorer', params: { cluster: c.id } }"
|
|
550
523
|
>
|
|
551
524
|
<ClusterIconMenu
|
|
@@ -623,7 +596,6 @@ export default {
|
|
|
623
596
|
>
|
|
624
597
|
<nuxt-link
|
|
625
598
|
class="option"
|
|
626
|
-
:class="{'active-menu-link': checkActiveRoute(a) }"
|
|
627
599
|
:to="a.to"
|
|
628
600
|
>
|
|
629
601
|
<IconOrSvg
|
|
@@ -651,7 +623,6 @@ export default {
|
|
|
651
623
|
>
|
|
652
624
|
<nuxt-link
|
|
653
625
|
class="option"
|
|
654
|
-
:class="{'active-menu-link': checkActiveRoute(a) }"
|
|
655
626
|
:to="a.to"
|
|
656
627
|
>
|
|
657
628
|
<IconOrSvg
|
|
@@ -681,7 +652,6 @@ export default {
|
|
|
681
652
|
>
|
|
682
653
|
<nuxt-link
|
|
683
654
|
class="option"
|
|
684
|
-
:class="{'active-menu-link': checkActiveRoute(a) }"
|
|
685
655
|
:to="a.to"
|
|
686
656
|
>
|
|
687
657
|
<IconOrSvg
|
|
@@ -793,7 +763,6 @@ export default {
|
|
|
793
763
|
|
|
794
764
|
&.menu-open {
|
|
795
765
|
width: 300px;
|
|
796
|
-
box-shadow: 3px 1px 3px var(--shadow);
|
|
797
766
|
}
|
|
798
767
|
|
|
799
768
|
.title {
|
|
@@ -801,6 +770,7 @@ export default {
|
|
|
801
770
|
height: 55px;
|
|
802
771
|
flex: 0 0 55px;
|
|
803
772
|
width: 100%;
|
|
773
|
+
border-bottom: 1px solid var(--nav-border);
|
|
804
774
|
justify-content: flex-start;
|
|
805
775
|
align-items: center;
|
|
806
776
|
|
|
@@ -901,7 +871,7 @@ export default {
|
|
|
901
871
|
margin-right: 16px;
|
|
902
872
|
}
|
|
903
873
|
|
|
904
|
-
&.
|
|
874
|
+
&.nuxt-link-active {
|
|
905
875
|
background: var(--primary-hover-bg);
|
|
906
876
|
color: var(--primary-hover-text);
|
|
907
877
|
|
|
@@ -953,31 +923,13 @@ export default {
|
|
|
953
923
|
position: relative;
|
|
954
924
|
> input {
|
|
955
925
|
background-color: transparent;
|
|
926
|
+
margin-bottom: 8px;
|
|
956
927
|
padding-right: 35px;
|
|
957
|
-
padding-left: 25px;
|
|
958
|
-
height: 32px;
|
|
959
|
-
}
|
|
960
|
-
> .magnifier {
|
|
961
|
-
position: absolute;
|
|
962
|
-
top: 12px;
|
|
963
|
-
left: 8px;
|
|
964
|
-
width: 12px;
|
|
965
|
-
height: 12px;
|
|
966
|
-
font-size: 12px;
|
|
967
|
-
opacity: 0.4;
|
|
968
|
-
|
|
969
|
-
&.active {
|
|
970
|
-
opacity: 1;
|
|
971
|
-
|
|
972
|
-
&:hover {
|
|
973
|
-
color: var(--body-text);
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
928
|
}
|
|
977
929
|
> i {
|
|
978
930
|
position: absolute;
|
|
979
|
-
font-size:
|
|
980
|
-
top:
|
|
931
|
+
font-size: $clear-search-size;
|
|
932
|
+
top: 11px;
|
|
981
933
|
right: 8px;
|
|
982
934
|
opacity: 0.7;
|
|
983
935
|
cursor: pointer;
|
|
@@ -1014,10 +966,10 @@ export default {
|
|
|
1014
966
|
height: 42px;
|
|
1015
967
|
|
|
1016
968
|
.search {
|
|
1017
|
-
transition: all 0.
|
|
969
|
+
transition: all 0.5s ease-in-out;
|
|
1018
970
|
transition-delay: 2s;
|
|
1019
971
|
width: 72%;
|
|
1020
|
-
height:
|
|
972
|
+
height: 42px;
|
|
1021
973
|
|
|
1022
974
|
input {
|
|
1023
975
|
height: 100%;
|
|
@@ -1043,7 +995,7 @@ export default {
|
|
|
1043
995
|
font-size: 14px;
|
|
1044
996
|
}
|
|
1045
997
|
|
|
1046
|
-
.
|
|
998
|
+
.nuxt-link-active {
|
|
1047
999
|
&:hover {
|
|
1048
1000
|
text-decoration: none;
|
|
1049
1001
|
}
|
|
@@ -1073,7 +1025,7 @@ export default {
|
|
|
1073
1025
|
hr {
|
|
1074
1026
|
margin: 0;
|
|
1075
1027
|
width: 94%;
|
|
1076
|
-
transition: all 0.
|
|
1028
|
+
transition: all 0.5s ease-in-out;
|
|
1077
1029
|
max-width: 100%;
|
|
1078
1030
|
}
|
|
1079
1031
|
}
|
|
@@ -1100,7 +1052,7 @@ export default {
|
|
|
1100
1052
|
text-transform: uppercase;
|
|
1101
1053
|
|
|
1102
1054
|
span {
|
|
1103
|
-
transition: all 0.
|
|
1055
|
+
transition: all 0.5s ease-in-out;
|
|
1104
1056
|
display: flex;
|
|
1105
1057
|
max-height: 16px;
|
|
1106
1058
|
}
|
|
@@ -1109,7 +1061,7 @@ export default {
|
|
|
1109
1061
|
margin: 0;
|
|
1110
1062
|
max-width: 50px;
|
|
1111
1063
|
width: 0;
|
|
1112
|
-
transition: all 0.
|
|
1064
|
+
transition: all 0.5s ease-in-out;
|
|
1113
1065
|
}
|
|
1114
1066
|
}
|
|
1115
1067
|
|
|
@@ -1221,12 +1173,12 @@ export default {
|
|
|
1221
1173
|
}
|
|
1222
1174
|
|
|
1223
1175
|
.fade-enter-active, .fade-leave-active {
|
|
1224
|
-
transition: all 0.
|
|
1176
|
+
transition: all 0.2s;
|
|
1225
1177
|
transition-timing-function: ease;
|
|
1226
1178
|
}
|
|
1227
1179
|
|
|
1228
1180
|
.fade-leave-active {
|
|
1229
|
-
transition: all 0.
|
|
1181
|
+
transition: all 0.4s;
|
|
1230
1182
|
}
|
|
1231
1183
|
|
|
1232
1184
|
.fade-leave-to {
|
package/components/nav/Type.vue
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Favorite from '@shell/components/nav/Favorite';
|
|
3
|
-
import {
|
|
3
|
+
import { FAVORITE, USED } from '@shell/store/type-map';
|
|
4
|
+
import { linkActiveClass } from '@shell/config/router';
|
|
4
5
|
|
|
5
|
-
const showFavoritesFor = [
|
|
6
|
+
const showFavoritesFor = [FAVORITE, USED];
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
|
|
@@ -30,6 +31,7 @@ export default {
|
|
|
30
31
|
near: false,
|
|
31
32
|
over: false,
|
|
32
33
|
menuPath: this.type.route ? this.$router.resolve(this.type.route)?.route?.path : undefined,
|
|
34
|
+
linkActiveClass
|
|
33
35
|
};
|
|
34
36
|
},
|
|
35
37
|
|
|
@@ -90,23 +92,12 @@ export default {
|
|
|
90
92
|
},
|
|
91
93
|
|
|
92
94
|
showCount() {
|
|
93
|
-
return this.count !== undefined;
|
|
95
|
+
return typeof this.type.count !== 'undefined';
|
|
94
96
|
},
|
|
95
97
|
|
|
96
98
|
namespaceIcon() {
|
|
97
99
|
return this.type.namespaced;
|
|
98
100
|
},
|
|
99
|
-
|
|
100
|
-
count() {
|
|
101
|
-
if (this.type.count !== undefined) {
|
|
102
|
-
return this.type.count;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const inStore = this.$store.getters['currentStore'](this.type.name);
|
|
106
|
-
|
|
107
|
-
return this.$store.getters[`${ inStore }/count`]({ name: this.type.name });
|
|
108
|
-
}
|
|
109
|
-
|
|
110
101
|
},
|
|
111
102
|
|
|
112
103
|
methods: {
|
|
@@ -143,7 +134,7 @@ export default {
|
|
|
143
134
|
:to="type.route"
|
|
144
135
|
tag="li"
|
|
145
136
|
class="child nav-type"
|
|
146
|
-
:class="{'root': isRoot, [`depth-${depth}`]: true,
|
|
137
|
+
:class="{'root': isRoot, [`depth-${depth}`]: true, [linkActiveClass]: isCurrent}"
|
|
147
138
|
:exact="type.exact"
|
|
148
139
|
>
|
|
149
140
|
<a
|
|
@@ -173,7 +164,7 @@ export default {
|
|
|
173
164
|
v-if="namespaceIcon"
|
|
174
165
|
class="icon icon-namespace namespaced"
|
|
175
166
|
/>
|
|
176
|
-
{{ count }}
|
|
167
|
+
{{ type.count }}
|
|
177
168
|
</span>
|
|
178
169
|
</a>
|
|
179
170
|
</n-link>
|