Skip to content

Commit

Permalink
feat: Add KUBESPHERE_EDITION constants to globals config (#4308)
Browse files Browse the repository at this point in the history
* feat: Add KUBESPHERE_EDITION constants to globals config

Signed-off-by: yazhou <yazhouhu@yunify.com>

* refactor: Update KUBESPHERE_EDITION constants to globals config

Signed-off-by: yazhou <yazhouhu@yunify.com>

---------

Signed-off-by: yazhou <yazhouhu@yunify.com>
  • Loading branch information
yazhouio committed Sep 24, 2024
1 parent d169338 commit 89430ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/core/src/run.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, { Suspense } from 'react';
import ReactDOM from 'react-dom';
import { Loading } from '@kubed/components';

import { CacheStoreProvider } from '@ks-console/shared';
import { CacheStoreProvider, ENV } from '@ks-console/shared';
import Context from './utils/Context';
import { registerInternalExtensions } from './utils/extensions.internal';
import { registerLocalExtensions } from './utils/extensions.local';
Expand All @@ -17,10 +17,12 @@ import i18n from './utils/i18n';
import emitter from './utils/emitter';

import App from './App';
import { isEmpty } from 'lodash';
import { isEmpty, set } from 'lodash';

globals.context = new Context();
set(globals, 'config.isKsEdition', ENV.isKsEdition);
set(globals, 'config.isKseEdition', ENV.isKseEdition);

globals.context = new Context();
if (!isEmpty(globals?.ksConfig?.enabledExtensionModulesStatus)) {
Object.entries(globals.ksConfig.enabledExtensionModulesStatus).forEach(([key, value]) => {
if ((value as Record<string, any>).annotations) {
Expand Down

0 comments on commit 89430ef

Please sign in to comment.