@rancher/shell 0.5.3 → 1.2.0
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 +404 -465
- 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
|
@@ -177,16 +177,13 @@ export default {
|
|
|
177
177
|
|
|
178
178
|
project() {
|
|
179
179
|
if (this.isNamespace) {
|
|
180
|
-
const
|
|
180
|
+
const id = (this.value?.metadata?.labels || {})[PROJECT];
|
|
181
|
+
const clusterId = this.$store.getters['currentCluster'].id;
|
|
181
182
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return this.$store.getters['management/byId'](MANAGEMENT.PROJECT, `${ cluster.id }/${ id }`);
|
|
186
|
-
}
|
|
183
|
+
return this.$store.getters['management/byId'](MANAGEMENT.PROJECT, `${ clusterId }/${ id }`);
|
|
184
|
+
} else {
|
|
185
|
+
return null;
|
|
187
186
|
}
|
|
188
|
-
|
|
189
|
-
return null;
|
|
190
187
|
},
|
|
191
188
|
|
|
192
189
|
banner() {
|
|
@@ -373,7 +370,7 @@ export default {
|
|
|
373
370
|
},
|
|
374
371
|
|
|
375
372
|
hideNamespaceLocation() {
|
|
376
|
-
return this.$store.getters['currentProduct'].hideNamespaceLocation
|
|
373
|
+
return this.$store.getters['currentProduct'].hideNamespaceLocation;
|
|
377
374
|
},
|
|
378
375
|
},
|
|
379
376
|
|
|
@@ -422,7 +419,6 @@ export default {
|
|
|
422
419
|
<span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
|
|
423
420
|
<t
|
|
424
421
|
v-else
|
|
425
|
-
class="mastehead-resource-title"
|
|
426
422
|
:k="'resourceDetail.header.' + realMode"
|
|
427
423
|
:subtype="resourceSubtype"
|
|
428
424
|
:name="displayName"
|
|
@@ -545,10 +541,6 @@ export default {
|
|
|
545
541
|
|
|
546
542
|
HEADER {
|
|
547
543
|
margin: 0;
|
|
548
|
-
|
|
549
|
-
.title {
|
|
550
|
-
overflow: hidden;
|
|
551
|
-
}
|
|
552
544
|
}
|
|
553
545
|
|
|
554
546
|
.primaryheader {
|
|
@@ -558,17 +550,6 @@ export default {
|
|
|
558
550
|
|
|
559
551
|
h1 {
|
|
560
552
|
margin: 0;
|
|
561
|
-
overflow: hidden;
|
|
562
|
-
display: flex;
|
|
563
|
-
flex-direction: row;
|
|
564
|
-
align-items: center;
|
|
565
|
-
|
|
566
|
-
.mastehead-resource-title {
|
|
567
|
-
padding: 0 8px;
|
|
568
|
-
text-overflow: ellipsis;
|
|
569
|
-
overflow: hidden;
|
|
570
|
-
white-space: nowrap;
|
|
571
|
-
}
|
|
572
553
|
}
|
|
573
554
|
}
|
|
574
555
|
|
|
@@ -591,6 +572,9 @@ export default {
|
|
|
591
572
|
|
|
592
573
|
.masthead-state {
|
|
593
574
|
font-size: initial;
|
|
575
|
+
display: inline-block;
|
|
576
|
+
position: relative;
|
|
577
|
+
top: -2px;
|
|
594
578
|
}
|
|
595
579
|
|
|
596
580
|
.masthead-istio {
|
|
@@ -28,6 +28,7 @@ function modeFor(route) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async function getYaml(store, model) {
|
|
31
|
+
const inStore = store.getters['currentStore'](model.type);
|
|
31
32
|
let yaml;
|
|
32
33
|
const opt = { headers: { accept: 'application/yaml' } };
|
|
33
34
|
|
|
@@ -35,7 +36,9 @@ async function getYaml(store, model) {
|
|
|
35
36
|
yaml = (await model.followLink('view', opt)).data;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
const cleanedYaml = await store.dispatch(`${ inStore }/cleanForDownload`, yaml);
|
|
40
|
+
|
|
41
|
+
return cleanedYaml;
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
export default {
|
|
@@ -163,7 +163,7 @@ export default {
|
|
|
163
163
|
</script>
|
|
164
164
|
|
|
165
165
|
<template>
|
|
166
|
-
<header>
|
|
166
|
+
<header class="with-subheader">
|
|
167
167
|
<slot name="typeDescription">
|
|
168
168
|
<TypeDescription :resource="resource" />
|
|
169
169
|
</slot>
|
|
@@ -180,6 +180,11 @@ export default {
|
|
|
180
180
|
:indeterminate="loadIndeterminate"
|
|
181
181
|
/>
|
|
182
182
|
</div>
|
|
183
|
+
<div class="sub-header">
|
|
184
|
+
<slot name="subHeader">
|
|
185
|
+
<!--Slot content-->
|
|
186
|
+
</slot>
|
|
187
|
+
</div>
|
|
183
188
|
<div class="actions-container">
|
|
184
189
|
<slot name="actions">
|
|
185
190
|
<div class="actions">
|
|
@@ -221,4 +226,16 @@ export default {
|
|
|
221
226
|
header {
|
|
222
227
|
margin-bottom: 20px;
|
|
223
228
|
}
|
|
229
|
+
|
|
230
|
+
header.with-subheader {
|
|
231
|
+
grid-template-areas:
|
|
232
|
+
'type-banner type-banner'
|
|
233
|
+
'title actions'
|
|
234
|
+
'sub-header sub-header'
|
|
235
|
+
'state-banner state-banner';
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.sub-header {
|
|
239
|
+
grid-area: sub-header;
|
|
240
|
+
}
|
|
224
241
|
</style>
|
|
@@ -97,14 +97,6 @@ export default {
|
|
|
97
97
|
default: 'sortableTable.paging.resource',
|
|
98
98
|
},
|
|
99
99
|
|
|
100
|
-
/**
|
|
101
|
-
* Additional params to pass to the pagingLabel translation
|
|
102
|
-
*/
|
|
103
|
-
pagingParams: {
|
|
104
|
-
type: Object,
|
|
105
|
-
default: null,
|
|
106
|
-
},
|
|
107
|
-
|
|
108
100
|
rowActions: {
|
|
109
101
|
type: Boolean,
|
|
110
102
|
default: true,
|
|
@@ -400,11 +392,7 @@ export default {
|
|
|
400
392
|
return standard.concat(this.listGroups);
|
|
401
393
|
},
|
|
402
394
|
|
|
403
|
-
|
|
404
|
-
if (this.pagingParams) {
|
|
405
|
-
return this.pagingParams;
|
|
406
|
-
}
|
|
407
|
-
|
|
395
|
+
pagingParams() {
|
|
408
396
|
if ( !this.schema ) {
|
|
409
397
|
return {
|
|
410
398
|
singularLabel: '',
|
|
@@ -494,7 +482,7 @@ export default {
|
|
|
494
482
|
:group-options="groupOptions"
|
|
495
483
|
:search="search"
|
|
496
484
|
:paging="true"
|
|
497
|
-
:paging-params="
|
|
485
|
+
:paging-params="pagingParams"
|
|
498
486
|
:paging-label="pagingLabel"
|
|
499
487
|
:row-actions="rowActions"
|
|
500
488
|
:table-actions="_showBulkActions"
|
|
@@ -190,11 +190,6 @@ export default {
|
|
|
190
190
|
|
|
191
191
|
cm.foldLinesMatching(/managedFields/);
|
|
192
192
|
|
|
193
|
-
// Allow the model to supply an array of json paths to fold other sections in the YAML for the given resource type
|
|
194
|
-
if (this.value?.yamlFolding) {
|
|
195
|
-
this.value.yamlFolding.forEach((path) => cm.foldYaml(path));
|
|
196
|
-
}
|
|
197
|
-
|
|
198
193
|
// regardless of edit or create we should probably fold all the comments so they dont get out of hand.
|
|
199
194
|
const saved = cm.getMode().fold;
|
|
200
195
|
|
|
@@ -365,8 +360,6 @@ export default {
|
|
|
365
360
|
>
|
|
366
361
|
<Footer
|
|
367
362
|
v-if="showFooter"
|
|
368
|
-
class="footer"
|
|
369
|
-
:class="{ 'edit': !isView }"
|
|
370
363
|
:mode="mode"
|
|
371
364
|
:errors="errors"
|
|
372
365
|
@save="save"
|
|
@@ -410,29 +403,11 @@ export default {
|
|
|
410
403
|
</template>
|
|
411
404
|
|
|
412
405
|
<style lang='scss' scoped>
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
.footer {
|
|
420
|
-
margin-top: 20px;
|
|
421
|
-
right: 0;
|
|
422
|
-
position: sticky;
|
|
423
|
-
bottom: 0;
|
|
424
|
-
background-color: var(--header-bg);
|
|
425
|
-
|
|
426
|
-
// Overrides outlet padding
|
|
427
|
-
margin-left: -$space-m;
|
|
428
|
-
margin-right: -$space-m;
|
|
429
|
-
margin-bottom: -$space-m;
|
|
430
|
-
padding: $space-s $space-m;
|
|
431
|
-
|
|
432
|
-
&.edit {
|
|
433
|
-
border-top: var(--header-border-size) solid var(--header-border);
|
|
434
|
-
}
|
|
435
|
-
}
|
|
406
|
+
.flex-content {
|
|
407
|
+
display: flex;
|
|
408
|
+
flex-direction: column;
|
|
409
|
+
flex-grow: 1;
|
|
410
|
+
}
|
|
436
411
|
</style>
|
|
437
412
|
|
|
438
413
|
<style lang="scss">
|
|
@@ -444,10 +419,6 @@ export default {
|
|
|
444
419
|
footer .actions {
|
|
445
420
|
text-align: right;
|
|
446
421
|
}
|
|
447
|
-
|
|
448
|
-
.spacer-small {
|
|
449
|
-
padding: 0;
|
|
450
|
-
}
|
|
451
422
|
}
|
|
452
423
|
|
|
453
424
|
</style>
|
package/components/SideNav.vue
CHANGED
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
FAVORITE_TYPES
|
|
8
8
|
} from '@shell/store/prefs';
|
|
9
9
|
import { getVersionInfo } from '@shell/utils/version';
|
|
10
|
-
import {
|
|
11
|
-
addObjects, replaceWith, clear, addObject, sameContents
|
|
12
|
-
} from '@shell/utils/array';
|
|
10
|
+
import { addObjects, replaceWith, clear, addObject } from '@shell/utils/array';
|
|
13
11
|
import { sortBy } from '@shell/utils/sort';
|
|
14
12
|
import { ucFirst } from '@shell/utils/string';
|
|
15
13
|
|
|
16
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
HCI, CATALOG, UI, SCHEMA, COUNT
|
|
16
|
+
} from '@shell/config/types';
|
|
17
17
|
import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
|
|
18
18
|
import { NAME as EXPLORER } from '@shell/config/product/explorer';
|
|
19
|
-
import {
|
|
19
|
+
import { BASIC, FAVORITE, USED } from '@shell/store/type-map';
|
|
20
20
|
import { NAME as NAVLINKS } from '@shell/config/product/navlinks';
|
|
21
21
|
import Group from '@shell/components/nav/Group';
|
|
22
22
|
|
|
@@ -31,7 +31,6 @@ export default {
|
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
created() {
|
|
34
|
-
// Ensure that changes to resource that change often don't resort to spamming redraw of the side nav
|
|
35
34
|
this.queueUpdate = debounce(this.getGroups, 500);
|
|
36
35
|
|
|
37
36
|
this.getGroups();
|
|
@@ -43,25 +42,24 @@ export default {
|
|
|
43
42
|
},
|
|
44
43
|
|
|
45
44
|
watch: {
|
|
45
|
+
counts(a, b) {
|
|
46
|
+
if ( a !== b ) {
|
|
47
|
+
this.queueUpdate();
|
|
48
|
+
}
|
|
49
|
+
},
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*/
|
|
50
|
-
allSchemasIds(a, b) {
|
|
51
|
-
if ( !sameContents(a, b) ) {
|
|
51
|
+
allSchemas(a, b) {
|
|
52
|
+
if ( a !== b ) {
|
|
52
53
|
this.queueUpdate();
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
if (
|
|
57
|
+
allNavLinks(a, b) {
|
|
58
|
+
if ( a !== b ) {
|
|
58
59
|
this.queueUpdate();
|
|
59
60
|
}
|
|
60
61
|
},
|
|
61
62
|
|
|
62
|
-
/**
|
|
63
|
-
* Note - There's no watch on prefs, so this only catches in session changes
|
|
64
|
-
*/
|
|
65
63
|
favoriteTypes(a, b) {
|
|
66
64
|
if ( !isEqual(a, b) ) {
|
|
67
65
|
this.queueUpdate();
|
|
@@ -75,24 +73,23 @@ export default {
|
|
|
75
73
|
},
|
|
76
74
|
|
|
77
75
|
productId(a, b) {
|
|
78
|
-
if ( a
|
|
76
|
+
if ( !isEqual(a, b) ) {
|
|
79
77
|
// Immediately update because you'll see it come in later
|
|
80
78
|
this.getGroups();
|
|
81
79
|
}
|
|
82
80
|
},
|
|
83
81
|
|
|
84
|
-
// Queue namespaceMode and namespaces
|
|
85
|
-
// Changes to namespaceMode can also change namespaces, so keep this simple and execute both in a shortened queue
|
|
86
|
-
|
|
87
82
|
namespaceMode(a, b) {
|
|
88
|
-
if ( a
|
|
89
|
-
|
|
83
|
+
if ( !isEqual(a, b) ) {
|
|
84
|
+
// Immediately update because you'll see it come in later
|
|
85
|
+
this.getGroups();
|
|
90
86
|
}
|
|
91
87
|
},
|
|
92
88
|
|
|
93
89
|
namespaces(a, b) {
|
|
94
90
|
if ( !isEqual(a, b) ) {
|
|
95
|
-
|
|
91
|
+
// Immediately update because you'll see it come in later
|
|
92
|
+
this.getGroups();
|
|
96
93
|
}
|
|
97
94
|
},
|
|
98
95
|
|
|
@@ -103,6 +100,13 @@ export default {
|
|
|
103
100
|
}
|
|
104
101
|
},
|
|
105
102
|
|
|
103
|
+
product(a, b) {
|
|
104
|
+
if ( !isEqual(a, b) ) {
|
|
105
|
+
// Immediately update because you'll see it come in later
|
|
106
|
+
this.getGroups();
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
|
|
106
110
|
$route(a, b) {
|
|
107
111
|
this.$nextTick(() => this.syncNav());
|
|
108
112
|
},
|
|
@@ -170,7 +174,7 @@ export default {
|
|
|
170
174
|
return this.$store.getters['cluster/all'](UI.NAV_LINK);
|
|
171
175
|
},
|
|
172
176
|
|
|
173
|
-
|
|
177
|
+
allSchemas() {
|
|
174
178
|
const managementReady = this.managementReady;
|
|
175
179
|
const product = this.currentProduct;
|
|
176
180
|
|
|
@@ -178,19 +182,33 @@ export default {
|
|
|
178
182
|
return [];
|
|
179
183
|
}
|
|
180
184
|
|
|
181
|
-
|
|
182
|
-
return this.$store.getters[`${ product.inStore }/all`](SCHEMA).map((s) => s.id).sort();
|
|
185
|
+
return this.$store.getters[`${ product.inStore }/all`](SCHEMA);
|
|
183
186
|
},
|
|
184
187
|
|
|
185
|
-
|
|
186
|
-
|
|
188
|
+
counts() {
|
|
189
|
+
const managementReady = this.managementReady;
|
|
190
|
+
const product = this.currentProduct;
|
|
191
|
+
|
|
192
|
+
if ( !managementReady || !product ) {
|
|
193
|
+
return {};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const inStore = product.inStore;
|
|
197
|
+
|
|
198
|
+
// So that there's something to watch for updates
|
|
199
|
+
if ( this.$store.getters[`${ inStore }/haveAll`](COUNT) ) {
|
|
200
|
+
const counts = this.$store.getters[`${ inStore }/all`](COUNT)[0].counts;
|
|
201
|
+
|
|
202
|
+
return counts;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return {};
|
|
187
206
|
},
|
|
188
207
|
|
|
189
|
-
|
|
190
|
-
return this.
|
|
208
|
+
namespaces() {
|
|
209
|
+
return this.$store.getters['activeNamespaceCache'];
|
|
191
210
|
},
|
|
192
211
|
},
|
|
193
|
-
|
|
194
212
|
methods: {
|
|
195
213
|
/**
|
|
196
214
|
* Fetch navigation by creating groups from product schemas
|
|
@@ -209,6 +227,13 @@ export default {
|
|
|
209
227
|
}
|
|
210
228
|
|
|
211
229
|
const currentProduct = this.$store.getters['productId'];
|
|
230
|
+
let namespaces = null;
|
|
231
|
+
|
|
232
|
+
if ( !this.$store.getters['isAllNamespaces'] ) {
|
|
233
|
+
const namespacesObject = this.$store.getters['namespaces']();
|
|
234
|
+
|
|
235
|
+
namespaces = Object.keys(namespacesObject);
|
|
236
|
+
}
|
|
212
237
|
|
|
213
238
|
// Always show cluster-level types, regardless of the namespace filter
|
|
214
239
|
const namespaceMode = 'both';
|
|
@@ -230,8 +255,7 @@ export default {
|
|
|
230
255
|
// This should already have come into the list from above, but in case it hasn't...
|
|
231
256
|
addObject(loadProducts, currentProduct);
|
|
232
257
|
|
|
233
|
-
this.getProductsGroups(out, loadProducts, namespaceMode, productMap);
|
|
234
|
-
|
|
258
|
+
this.getProductsGroups(out, loadProducts, namespaceMode, namespaces, productMap);
|
|
235
259
|
this.getExplorerGroups(out);
|
|
236
260
|
|
|
237
261
|
replaceWith(this.groups, ...sortBy(out, ['weight:desc', 'label']));
|
|
@@ -239,12 +263,12 @@ export default {
|
|
|
239
263
|
this.gettingGroups = false;
|
|
240
264
|
},
|
|
241
265
|
|
|
242
|
-
getProductsGroups(out, loadProducts, namespaceMode, productMap) {
|
|
266
|
+
getProductsGroups(out, loadProducts, namespaceMode, namespaces, productMap) {
|
|
243
267
|
const clusterId = this.$store.getters['clusterId'];
|
|
244
268
|
const currentType = this.$route.params.resource || '';
|
|
245
269
|
|
|
246
270
|
for ( const productId of loadProducts ) {
|
|
247
|
-
const modes = [
|
|
271
|
+
const modes = [BASIC];
|
|
248
272
|
|
|
249
273
|
if ( productId === NAVLINKS ) {
|
|
250
274
|
// Navlinks produce their own top-level nav items so don't need to show it as a product.
|
|
@@ -252,16 +276,14 @@ export default {
|
|
|
252
276
|
}
|
|
253
277
|
|
|
254
278
|
if ( productId === EXPLORER ) {
|
|
255
|
-
modes.push(
|
|
256
|
-
modes.push(
|
|
279
|
+
modes.push(FAVORITE);
|
|
280
|
+
modes.push(USED);
|
|
257
281
|
}
|
|
258
282
|
|
|
259
|
-
// Get all types for all modes
|
|
260
|
-
const typesByMode = this.$store.getters['type-map/allTypes'](productId, modes);
|
|
261
|
-
|
|
262
283
|
for ( const mode of modes ) {
|
|
263
|
-
const types =
|
|
264
|
-
|
|
284
|
+
const types = this.$store.getters['type-map/allTypes'](productId, mode) || {};
|
|
285
|
+
|
|
286
|
+
const more = this.$store.getters['type-map/getTree'](productId, mode, types, clusterId, namespaceMode, namespaces, currentType);
|
|
265
287
|
|
|
266
288
|
if ( productId === EXPLORER || !this.isExplorer ) {
|
|
267
289
|
addObjects(out, more);
|
|
@@ -561,7 +583,7 @@ export default {
|
|
|
561
583
|
}
|
|
562
584
|
}
|
|
563
585
|
|
|
564
|
-
&.
|
|
586
|
+
&.nuxt-link-active:not(:hover) {
|
|
565
587
|
A {
|
|
566
588
|
background-color: var(--nav-active);
|
|
567
589
|
}
|
|
@@ -162,13 +162,15 @@ export default {
|
|
|
162
162
|
const menu = document.querySelector('.table-options-container');
|
|
163
163
|
const elem = document.querySelector('.table-options-btn');
|
|
164
164
|
|
|
165
|
-
this.tableColsMenuPosition
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
if (!this.tableColsMenuPosition) {
|
|
166
|
+
this.tableColsMenuPosition = fitOnScreen(menu, ev || elem, {
|
|
167
|
+
overlapX: true,
|
|
168
|
+
fudgeX: 26,
|
|
169
|
+
fudgeY: -22,
|
|
170
|
+
positionX: CENTER,
|
|
171
|
+
positionY: AUTO,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
172
174
|
|
|
173
175
|
// toggle visibility
|
|
174
176
|
this.tableColsOptionsVisibility = !this.tableColsOptionsVisibility;
|
|
@@ -1026,8 +1026,9 @@ export default {
|
|
|
1026
1026
|
<slot name="header-right" />
|
|
1027
1027
|
<AsyncButton
|
|
1028
1028
|
v-if="isTooManyItemsToAutoUpdate"
|
|
1029
|
+
v-clean-tooltip="t('performance.manualRefresh.buttonTooltip')"
|
|
1029
1030
|
class="manual-refresh"
|
|
1030
|
-
mode="
|
|
1031
|
+
mode="refresh"
|
|
1031
1032
|
:current-phase="currentPhase"
|
|
1032
1033
|
@click="debouncedRefreshTableData"
|
|
1033
1034
|
/>
|
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
LAST_UPDATED, TYPE, REASON, MESSAGE, STATUS
|
|
4
4
|
} from '@shell/config/table-headers';
|
|
5
5
|
import SortableTable from '@shell/components/SortableTable';
|
|
6
|
-
import { copyTextToClipboard } from '@shell/utils/clipboard';
|
|
7
|
-
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
8
6
|
export default {
|
|
9
7
|
components: { SortableTable },
|
|
10
8
|
props: {
|
|
@@ -33,14 +31,12 @@ export default {
|
|
|
33
31
|
$event.stopPropagation();
|
|
34
32
|
$event.preventDefault();
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
this.$copyText(this.$slots.default[0].text).then(() => {
|
|
37
35
|
this.copied = true;
|
|
38
36
|
|
|
39
37
|
setTimeout(() => {
|
|
40
38
|
this.copied = false;
|
|
41
39
|
}, 2000);
|
|
42
|
-
}).catch((e) => {
|
|
43
|
-
this.$emit('error', exceptionToErrorsArray(e));
|
|
44
40
|
});
|
|
45
41
|
},
|
|
46
42
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { mapGetters } from 'vuex';
|
|
3
|
+
import { updatePageTitle } from '@shell/utils/title';
|
|
4
|
+
import { getVendor } from '@shell/config/private-label';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
props: {
|
|
8
|
+
/**
|
|
9
|
+
* Include can be 'full', 'vendor-only' or false
|
|
10
|
+
* 'full': Show's the entire breadcrumb include vendor, product and cluster
|
|
11
|
+
* 'vendor-only': Show only the vendor name in the breadcrumb i.e. 'Rancher > "child"'
|
|
12
|
+
* false: Don't include any part of the breadcrumb
|
|
13
|
+
*/
|
|
14
|
+
breadcrumb: {
|
|
15
|
+
type: [String, Boolean],
|
|
16
|
+
default: 'full',
|
|
17
|
+
validator(value) {
|
|
18
|
+
return ['full', 'vendor-only'].includes(value) || value === false;
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
includeVendor: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
},
|
|
25
|
+
showChild: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
computed: { ...mapGetters(['isExplorer', 'currentCluster', 'currentProduct']) },
|
|
31
|
+
|
|
32
|
+
methods: {
|
|
33
|
+
// This isn't a computed prop because it would trigger a recompute when the $slots changed
|
|
34
|
+
computeTitle() {
|
|
35
|
+
if (!this.$slots.default || this.$slots.default.length !== 1 || this.$slots.default[0].tag || (typeof this.$slots.default[0].text !== 'string')) {
|
|
36
|
+
console.error('The <TabTitle> component only supports text as the child.'); // eslint-disable-line no-console
|
|
37
|
+
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const breadcrumb = [this.$slots.default[0].text.trim()];
|
|
42
|
+
|
|
43
|
+
if (this.breadcrumb === 'full') {
|
|
44
|
+
if (this.currentCluster && (this.isExplorer || this.currentCluster.isHarvester ) ) {
|
|
45
|
+
breadcrumb.unshift(this.currentCluster.nameDisplay);
|
|
46
|
+
} else if (this.currentProduct?.name) {
|
|
47
|
+
const productName = this.$store.getters['i18n/withFallback'](`product.${ this.currentProduct.name }`, null, null);
|
|
48
|
+
|
|
49
|
+
if (productName) {
|
|
50
|
+
breadcrumb.unshift(productName);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (this.includeVendor && ['full', 'vendor-only'].includes(this.breadcrumb)) {
|
|
56
|
+
breadcrumb.unshift(getVendor());
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return breadcrumb;
|
|
60
|
+
},
|
|
61
|
+
updatePageTitle() {
|
|
62
|
+
updatePageTitle(...this.computeTitle());
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
created() {
|
|
67
|
+
this.updatePageTitle();
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
// Using the render function instead of <template> because <template><slot /></template> will yield a compiler error since
|
|
71
|
+
// <slot /> is not allowed to be a root node of a <template> and I don't want to wrap the child to avoid affecting existing styling
|
|
72
|
+
render() {
|
|
73
|
+
if (this.$slots.default) {
|
|
74
|
+
this.$slots.default.forEach((e) => {
|
|
75
|
+
e.text = (e.text || '').trim();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
this.updatePageTitle();
|
|
80
|
+
|
|
81
|
+
return this.showChild ? this.$slots.default : null;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
</script>
|
|
@@ -19,11 +19,6 @@ export default {
|
|
|
19
19
|
default: false
|
|
20
20
|
},
|
|
21
21
|
|
|
22
|
-
hideSingleTab: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
|
|
27
22
|
showTabsAddRemove: {
|
|
28
23
|
type: Boolean,
|
|
29
24
|
default: false
|
|
@@ -91,11 +86,6 @@ export default {
|
|
|
91
86
|
sortedTabs() {
|
|
92
87
|
return sortBy(this.tabs, ['weight:desc', 'labelDisplay', 'name']);
|
|
93
88
|
},
|
|
94
|
-
|
|
95
|
-
// hide tabs based on tab count IF flag is active
|
|
96
|
-
hideTabs() {
|
|
97
|
-
return this.hideSingleTab && this.sortedTabs.length === 1;
|
|
98
|
-
}
|
|
99
89
|
},
|
|
100
90
|
|
|
101
91
|
watch: {
|
|
@@ -235,13 +225,11 @@ export default {
|
|
|
235
225
|
<template>
|
|
236
226
|
<div :class="{'side-tabs': !!sideTabs, 'tabs-only': tabsOnly }">
|
|
237
227
|
<ul
|
|
238
|
-
v-if="!hideTabs"
|
|
239
228
|
ref="tablist"
|
|
240
229
|
role="tablist"
|
|
241
230
|
class="tabs"
|
|
242
231
|
:class="{'clearfix':!sideTabs, 'vertical': sideTabs, 'horizontal': !sideTabs}"
|
|
243
232
|
tabindex="0"
|
|
244
|
-
data-testid="tabbed-block"
|
|
245
233
|
@keydown.right.prevent="selectNext(1)"
|
|
246
234
|
@keydown.left.prevent="selectNext(-1)"
|
|
247
235
|
@keydown.down.prevent="selectNext(1)"
|