@@ -81,7 +81,7 @@ import { DEFAULT_GIT_OPS_FEATURE_FLAGS } from './constants'
81
81
import { ParsedTabsData , ParsedTabsDataV1 } from '../DynamicTabs/types'
82
82
import { SwitchThemeDialog } from '@Pages/Shared'
83
83
import { SwitchThemeDialogProps } from '@Pages/Shared/SwitchThemeDialog/types'
84
- import { getShowStackManager } from 'src/utils '
84
+ import { EnvironmentDataStateType } from './types '
85
85
86
86
// Monaco Editor worker initialization
87
87
self . MonacoEnvironment = {
@@ -152,16 +152,12 @@ export default function NavigationRoutes() {
152
152
}
153
153
const [ environmentId , setEnvironmentId ] = useState ( null )
154
154
const contextValue = useMemo ( ( ) => ( { environmentId, setEnvironmentId } ) , [ environmentId ] )
155
- const [ environmentDataState , setEnvironmentDataState ] = useState <
156
- Pick <
157
- MainContext ,
158
- 'isAirgapped' | 'isManifestScanningEnabled' | 'canOnlyViewPermittedEnvOrgLevel' | 'featureGitOpsFlags'
159
- >
160
- > ( {
155
+ const [ environmentDataState , setEnvironmentDataState ] = useState < EnvironmentDataStateType > ( {
161
156
isAirgapped : false ,
162
157
isManifestScanningEnabled : false ,
163
158
canOnlyViewPermittedEnvOrgLevel : false ,
164
159
featureGitOpsFlags : structuredClone ( DEFAULT_GIT_OPS_FEATURE_FLAGS ) ,
160
+ devtronManagedLicensingEnabled : false ,
165
161
} )
166
162
const [ userPreferences , setUserPreferences ] = useState < UserPreferencesType > ( null )
167
163
const [ userPreferencesError , setUserPreferencesError ] = useState < ServerErrors > ( null )
@@ -173,7 +169,8 @@ export default function NavigationRoutes() {
173
169
appTheme,
174
170
} = useTheme ( )
175
171
176
- const { isAirgapped, isManifestScanningEnabled, canOnlyViewPermittedEnvOrgLevel } = environmentDataState
172
+ const { isAirgapped, isManifestScanningEnabled, canOnlyViewPermittedEnvOrgLevel, devtronManagedLicensingEnabled } =
173
+ environmentDataState
177
174
178
175
const handleCloseLicenseInfoDialog = ( ) => {
179
176
setLicenseInfoDialogType ( null )
@@ -342,6 +339,7 @@ export default function NavigationRoutes() {
342
339
isManifestScanningEnabled : false ,
343
340
canOnlyViewPermittedEnvOrgLevel : false ,
344
341
featureGitOpsFlags : structuredClone ( DEFAULT_GIT_OPS_FEATURE_FLAGS ) ,
342
+ devtronManagedLicensingEnabled : false ,
345
343
}
346
344
347
345
if ( ! getEnvironmentData ) {
@@ -361,6 +359,7 @@ export default function NavigationRoutes() {
361
359
isManifestScanningEnabled : result . isManifestScanningEnabled ,
362
360
canOnlyViewPermittedEnvOrgLevel : result . canOnlyViewPermittedEnvOrgLevel ,
363
361
featureGitOpsFlags : parsedFeatureGitOpsFlags ,
362
+ devtronManagedLicensingEnabled : result . devtronManagedLicensingEnabled || false ,
364
363
}
365
364
} catch {
366
365
return fallbackResponse
@@ -408,6 +407,7 @@ export default function NavigationRoutes() {
408
407
isManifestScanningEnabled : environmentDataResponse . isManifestScanningEnabled ,
409
408
canOnlyViewPermittedEnvOrgLevel : environmentDataResponse . canOnlyViewPermittedEnvOrgLevel ,
410
409
featureGitOpsFlags : environmentDataResponse . featureGitOpsFlags ,
410
+ devtronManagedLicensingEnabled : environmentDataResponse . devtronManagedLicensingEnabled ,
411
411
} )
412
412
413
413
setServerMode ( serverModeResponse )
@@ -484,11 +484,13 @@ export default function NavigationRoutes() {
484
484
}
485
485
const _isOnboardingPage = isOnboardingPage ( )
486
486
487
- const handleOpenLicenseInfoDialog = ( initialDialogTab ?: LicenseInfoDialogType . ABOUT | LicenseInfoDialogType . LICENSE ) => {
487
+ const handleOpenLicenseInfoDialog = (
488
+ initialDialogTab ?: LicenseInfoDialogType . ABOUT | LicenseInfoDialogType . LICENSE ,
489
+ ) => {
488
490
setLicenseInfoDialogType ( initialDialogTab || LicenseInfoDialogType . ABOUT )
489
491
}
490
492
491
- const showStackManager = getShowStackManager ( currentServerInfo . serverInfo ?. installationType , ! ! licenseData )
493
+ const showStackManager = ! devtronManagedLicensingEnabled
492
494
493
495
return (
494
496
< MainContextProvider
0 commit comments