mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 13:11:43 +00:00
Add Single product home; add labels
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
parent
675c45f77b
commit
4c14e5250f
@ -1,2 +1,3 @@
|
||||
export const PRODUCT_NAME = 'harvester';
|
||||
export const BLANK_CLUSTER = '_';
|
||||
export const LOGO = require(`@shell/assets/images/providers/harvester.svg`);
|
||||
|
||||
1431
pkg/harvester/l10n/en-us.yaml
Normal file
1431
pkg/harvester/l10n/en-us.yaml
Normal file
File diff suppressed because it is too large
Load Diff
1431
pkg/harvester/l10n/zh-hans.yaml
Normal file
1431
pkg/harvester/l10n/zh-hans.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,28 @@
|
||||
import { IPlugin } from '@shell/core/types';
|
||||
import { PRODUCT_NAME, BLANK_CLUSTER } from './config/harvester';
|
||||
import { PRODUCT_NAME, BLANK_CLUSTER, LOGO as logo } from './config/harvester';
|
||||
import { HCI } from './config/types';
|
||||
|
||||
export function init($plugin: IPlugin, store: any) {
|
||||
const { product } = $plugin.DSL(store, PRODUCT_NAME);
|
||||
|
||||
const isSingleProduct = process.env.rancherEnv === PRODUCT_NAME;
|
||||
|
||||
if (isSingleProduct) {
|
||||
const home = {
|
||||
name: `${ PRODUCT_NAME }-c-cluster`,
|
||||
path: `/${ PRODUCT_NAME }/c/:cluster`
|
||||
};
|
||||
|
||||
store.dispatch('setIsSingleProduct', {
|
||||
productNameKey: 'harvester.productLabel',
|
||||
getVersionInfo: (store: any) => store.getters[`${ PRODUCT_NAME }/byId`]?.(HCI.SETTING, 'server-version')?.value || 'unknown',
|
||||
afterLoginRoute: home,
|
||||
logoRoute: home,
|
||||
supportCustomLogo: true,
|
||||
logo,
|
||||
});
|
||||
}
|
||||
|
||||
product({
|
||||
inStore: 'management',
|
||||
showNamespaceFilter: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user