Skip to content

Commit

Permalink
Merge pull request #365 from richard-cox/fix-about-page
Browse files Browse the repository at this point in the history
Fix the about page
  • Loading branch information
richard-cox authored Nov 27, 2023
2 parents af846fe + 8b2888b commit 59c89a8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
24 changes: 20 additions & 4 deletions dashboard/pkg/epinio/config/epinio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down Expand Up @@ -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);
Expand All @@ -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, [
Expand Down
10 changes: 3 additions & 7 deletions dashboard/pkg/epinio/pages/c/_cluster/about.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<script>
import { MANAGEMENT } from '@shell/config/types';
import { getVendor } from '@shell/config/private-label';
import BackLink from '@shell/components/BackLink';
import BackRoute from '@shell/mixins/back-link';
export default {
layout: 'plain',
components: { BackLink },
mixins: [BackRoute],
async fetch() {
this.settings = await this.$store.dispatch(`management/findAll`, { type: MANAGEMENT.SETTING });
Expand All @@ -19,7 +14,9 @@ export default {
},
computed: {
appName() {
return getVendor();
const isSingleProduct = !!this.$store.getters['isSingleProduct'];
return isSingleProduct ? getVendor() : this.t('epinio.label');
},
downloads() {
Expand Down Expand Up @@ -60,7 +57,6 @@ export default {
<template>
<div class="about">
<template>
<BackLink :link="backLink" />
<h1 v-t="'about.title'">
{{ appName }}
</h1>
Expand Down
1 change: 1 addition & 0 deletions dashboard/pkg/epinio/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const EPINIO_TYPES = {
SERVICE_INSTANCE: 'services',
// Internal
DASHBOARD: 'dashboard',
ABOUT: 'about',
CLUSTER: 'cluster',
APP_ACTION: 'application-action',
APP_INSTANCE: 'application-instance',
Expand Down

0 comments on commit 59c89a8

Please sign in to comment.