@@ -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,7 @@ export default function NavigationRoutes() {
173
169
appTheme,
174
170
} = useTheme ( )
175
171
176
- const { isAirgapped, isManifestScanningEnabled, canOnlyViewPermittedEnvOrgLevel } = environmentDataState
172
+ const { isAirgapped, isManifestScanningEnabled, canOnlyViewPermittedEnvOrgLevel, devtronManagedLicensingEnabled } = environmentDataState
177
173
178
174
const handleCloseLicenseInfoDialog = ( ) => {
179
175
setLicenseInfoDialogType ( null )
@@ -342,6 +338,7 @@ export default function NavigationRoutes() {
342
338
isManifestScanningEnabled : false ,
343
339
canOnlyViewPermittedEnvOrgLevel : false ,
344
340
featureGitOpsFlags : structuredClone ( DEFAULT_GIT_OPS_FEATURE_FLAGS ) ,
341
+ devtronManagedLicensingEnabled : false ,
345
342
}
346
343
347
344
if ( ! getEnvironmentData ) {
@@ -361,6 +358,7 @@ export default function NavigationRoutes() {
361
358
isManifestScanningEnabled : result . isManifestScanningEnabled ,
362
359
canOnlyViewPermittedEnvOrgLevel : result . canOnlyViewPermittedEnvOrgLevel ,
363
360
featureGitOpsFlags : parsedFeatureGitOpsFlags ,
361
+ devtronManagedLicensingEnabled : result . devtronManagedLicensingEnabled || false ,
364
362
}
365
363
} catch {
366
364
return fallbackResponse
@@ -408,6 +406,7 @@ export default function NavigationRoutes() {
408
406
isManifestScanningEnabled : environmentDataResponse . isManifestScanningEnabled ,
409
407
canOnlyViewPermittedEnvOrgLevel : environmentDataResponse . canOnlyViewPermittedEnvOrgLevel ,
410
408
featureGitOpsFlags : environmentDataResponse . featureGitOpsFlags ,
409
+ devtronManagedLicensingEnabled : environmentDataResponse . devtronManagedLicensingEnabled ,
411
410
} )
412
411
413
412
setServerMode ( serverModeResponse )
@@ -484,11 +483,13 @@ export default function NavigationRoutes() {
484
483
}
485
484
const _isOnboardingPage = isOnboardingPage ( )
486
485
487
- const handleOpenLicenseInfoDialog = ( initialDialogTab ?: LicenseInfoDialogType . ABOUT | LicenseInfoDialogType . LICENSE ) => {
486
+ const handleOpenLicenseInfoDialog = (
487
+ initialDialogTab ?: LicenseInfoDialogType . ABOUT | LicenseInfoDialogType . LICENSE ,
488
+ ) => {
488
489
setLicenseInfoDialogType ( initialDialogTab || LicenseInfoDialogType . ABOUT )
489
490
}
490
491
491
- const showStackManager = getShowStackManager ( currentServerInfo . serverInfo ?. installationType , ! ! licenseData )
492
+ const showStackManager = ! devtronManagedLicensingEnabled
492
493
493
494
return (
494
495
< MainContextProvider
0 commit comments