diff --git a/shell/components/EmptyProductPage.vue b/shell/components/EmptyProductPage.vue new file mode 100644 index 00000000000..8724e10d860 --- /dev/null +++ b/shell/components/EmptyProductPage.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/shell/components/nav/Group.vue b/shell/components/nav/Group.vue index 610a8a33205..346b3b9e78d 100644 --- a/shell/components/nav/Group.vue +++ b/shell/components/nav/Group.vue @@ -196,7 +196,10 @@ export default { const matchesNavLevel = navLevels.filter((param) => !this.$route.params[param] || this.$route.params[param] !== item.route.params[param]).length === 0; const withoutHash = this.$route.hash ? this.$route.fullPath.slice(0, this.$route.fullPath.indexOf(this.$route.hash)) : this.$route.fullPath; const withoutQuery = withoutHash.split('?')[0]; - const itemFullPath = this.$router.resolve(item.route).fullPath; + + let itemFullPath; + + try { itemFullPath = this.$router.resolve(item.route).fullPath; } catch (e) { console.error(e); } if (matchesNavLevel || itemFullPath === withoutQuery) { return true; diff --git a/shell/components/nav/Header.vue b/shell/components/nav/Header.vue index 780cce468e2..1d262eddf48 100644 --- a/shell/components/nav/Header.vue +++ b/shell/components/nav/Header.vue @@ -239,6 +239,26 @@ export default { isHarvester() { return this.$store.getters['currentProduct'].inStore === HARVESTER; }, + + productLabel() { + // Old-style product will just show the branding logo + // version 2 products will show the product label if set + if (!this.currentProduct?.version === 2) { + return false; + } + + if (this.currentProduct?.label) { + return this.currentProduct.label; + } + + if (this.currentProduct?.labelKey) { + return this.$store.getters['i18n/t'](this.currentProduct.labelKey); + } + + const name = this.currentProduct.name; + + return this.$store.getters['i18n/withFallback'](`product."${ name }"`, null, ucFirst(name));; + } }, watch: { @@ -518,7 +538,7 @@ export default { :alt="t('branding.logos.label')" >
- {{ prod }} + {{ productLabel || prod }}
@@ -534,6 +554,13 @@ export default { {{ t(isSingleProduct.productNameKey) }} +
+ {{ productLabel }} +
+