Skip to content

Commit

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

* feat: Add KUBESPHERE_EDITION constants to globals config



* refactor: Update KUBESPHERE_EDITION constants to globals config



---------

Signed-off-by: yazhou <yazhouhu@yunify.com>
Co-authored-by: 古月 <17949154+yazhouio@users.noreply.github.com>
  • Loading branch information
donniean and yazhouio committed Sep 24, 2024
1 parent f90d82a commit 7443151
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 7443151

Please sign in to comment.