mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-03 20:56:06 +08:00
Enable standalone mode for harvester cluster routing
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -65,6 +65,27 @@ export function init($plugin, store) {
|
||||
weightType,
|
||||
} = $plugin.DSL(store, PRODUCT_NAME);
|
||||
|
||||
const isSingleVirtualCluster = process.env.rancherEnv === PRODUCT_NAME;
|
||||
|
||||
if (isSingleVirtualCluster) {
|
||||
const home = {
|
||||
name: `${PRODUCT_NAME}-c-cluster-resource`,
|
||||
params: {
|
||||
product: PRODUCT_NAME,
|
||||
resource: HCI.DASHBOARD
|
||||
}
|
||||
};
|
||||
|
||||
store.dispatch('setIsSingleProduct', {
|
||||
logo: require(`@shell/assets/images/providers/harvester.svg`),
|
||||
productNameKey: 'harvester.productLabel',
|
||||
getVersionInfo: (store) => store.getters[`${PRODUCT_NAME}/byId`]?.(HCI.SETTING, 'server-version')?.value || 'unknown',
|
||||
afterLoginRoute: home,
|
||||
logoRoute: home,
|
||||
supportCustomLogo: true
|
||||
});
|
||||
}
|
||||
|
||||
product({
|
||||
inStore: 'harvester',
|
||||
removable: false,
|
||||
|
||||
Reference in New Issue
Block a user