From 0318fab39982402f26d647b65c00c5df71d65296 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 20 Nov 2023 14:40:27 +0000 Subject: [PATCH] Fix the about page - previously header icon and link text were rancher based - fix the header by moving the about page to side nav - previously this used the `plain` layout - the plain layout has a hardcoded rancher image (except in standalone mode) - for simplicity just change the about page to a default layout, which means it goes in side nav - annoying this needs to be in a side nav group, otherwise menu item appears above service and advanced groups - fix link text by avoiding getVendor when not in standalone --- dashboard/pkg/epinio/config/epinio.ts | 24 +++++++++++++++---- .../pkg/epinio/pages/c/_cluster/about.vue | 11 ++++----- dashboard/pkg/epinio/types.ts | 1 + 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/dashboard/pkg/epinio/config/epinio.ts b/dashboard/pkg/epinio/config/epinio.ts index 30f32a5..18896a0 100644 --- a/dashboard/pkg/epinio/config/epinio.ts +++ b/dashboard/pkg/epinio/config/epinio.ts @@ -117,6 +117,7 @@ export function init($plugin: any, store: any) { // Groups const ADVANCED_GROUP = 'Advanced'; const SERVICE_GROUP = 'Services'; + const ABOUT = 'System'; // Service Instance configureType(EPINIO_TYPES.SERVICE_INSTANCE, { @@ -149,6 +150,15 @@ export function init($plugin: any, store: any) { showListMasthead: false // Disable default masthead because we provide a custom one. }); + virtualType({ + label: store.getters['i18n/t']('epinio.intro.about'), + icon: 'dashboard', + // group: 'Root', + namespaced: false, + name: EPINIO_TYPES.ABOUT, + route: createEpinioRoute('c-cluster-about', { }) + }); + // Side Nav weightType(EPINIO_TYPES.CATALOG_SERVICE, 150, true); weightType(EPINIO_TYPES.SERVICE_INSTANCE, 151, true); @@ -164,17 +174,23 @@ export function init($plugin: any, store: any) { EPINIO_TYPES.APP_CHARTS ], ADVANCED_GROUP); + basicType([ + EPINIO_TYPES.ABOUT + ], ABOUT); + weightType(EPINIO_TYPES.DASHBOARD, 300, true); weightType(EPINIO_TYPES.APP, 250, true); - weightGroup(SERVICE_GROUP, 2, true); weightType(EPINIO_TYPES.NAMESPACE, 100, true); - weightGroup(ADVANCED_GROUP, 1, true); + weightGroup(SERVICE_GROUP, 30, true); + weightGroup(ADVANCED_GROUP, 20, true); + weightGroup(ABOUT, 10, false); basicType([ EPINIO_TYPES.DASHBOARD, EPINIO_TYPES.APP, - SERVICE_GROUP, EPINIO_TYPES.NAMESPACE, - ADVANCED_GROUP + SERVICE_GROUP, + ADVANCED_GROUP, + ABOUT ]); headers(EPINIO_TYPES.APP, [ diff --git a/dashboard/pkg/epinio/pages/c/_cluster/about.vue b/dashboard/pkg/epinio/pages/c/_cluster/about.vue index 6573a07..7200d14 100644 --- a/dashboard/pkg/epinio/pages/c/_cluster/about.vue +++ b/dashboard/pkg/epinio/pages/c/_cluster/about.vue @@ -1,14 +1,10 @@