Enable standalone mode for harvester cluster routing

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-10-23 17:01:00 +02:00
parent cb76589e95
commit bd2d8b1878
4 changed files with 64 additions and 7 deletions
+21
View File
@@ -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,