mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 13:16:05 +08:00
Enable standalone mode for harvester cluster routing
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import extensionRoutes from './routing/harvester-routing';
|
||||
import harvesterCommonStore from './store/harvester-common';
|
||||
import harvesterStore from './store/harvester-store';
|
||||
import customValidators from './validators';
|
||||
import { PRODUCT_NAME } from './config/harvester';
|
||||
|
||||
// Init the package
|
||||
export default function (plugin: IPlugin) {
|
||||
@@ -17,7 +18,12 @@ export default function (plugin: IPlugin) {
|
||||
// Built-in icon
|
||||
plugin.metadata.icon = require('./icon.svg');
|
||||
|
||||
plugin.addProduct(require('./config/harvester-manager'));
|
||||
const isSingleVirtualCluster = process.env.rancherEnv === PRODUCT_NAME;
|
||||
|
||||
if (!isSingleVirtualCluster) {
|
||||
plugin.addProduct(require('./config/harvester-manager'));
|
||||
}
|
||||
|
||||
plugin.addProduct(require('./config/harvester-cluster'));
|
||||
|
||||
plugin.addDashboardStore(harvesterCommonStore.config.namespace, harvesterCommonStore.specifics, harvesterCommonStore.config);
|
||||
|
||||
Reference in New Issue
Block a user