@@ -24,6 +24,7 @@ import { ReactComponent as Dropdown } from '../../assets/icons/ic-chevron-down.s
24
24
import { ModuleStatus } from '../v2/devtronStackManager/DevtronStackManager.type'
25
25
import { getModuleInfo } from '../v2/devtronStackManager/DevtronStackManager.service'
26
26
import { BodyType } from './globalConfiguration.type'
27
+ import CodeEditor from '../CodeEditor/CodeEditor'
27
28
28
29
const HostURLConfiguration = lazy ( ( ) => import ( '../hostURL/HostURL' ) )
29
30
const GitOpsConfiguration = lazy ( ( ) => import ( '../gitOps/GitOpsConfiguration' ) )
@@ -40,6 +41,7 @@ const ScopedVariables = lazy(() => import('../scopedVariables/ScopedVariables'))
40
41
const TagListContainer = importComponentFromFELibrary ( 'TagListContainer' )
41
42
const PluginsPolicy = importComponentFromFELibrary ( 'PluginsPolicy' )
42
43
const FilterConditions = importComponentFromFELibrary ( 'FilterConditions' )
44
+ const LockConfiguration = importComponentFromFELibrary ( 'LockConfiguration' )
43
45
44
46
export default function GlobalConfiguration ( props ) {
45
47
const location = useLocation ( )
@@ -421,6 +423,15 @@ function NavItem({ serverMode }) {
421
423
< div className = "flexbox flex-justify" > Filter condition</ div >
422
424
</ NavLink >
423
425
) }
426
+ { LockConfiguration && (
427
+ < NavLink
428
+ to = { URLS . GLOBAL_CONFIG_LOCK_CONFIG }
429
+ key = { URLS . GLOBAL_CONFIG_LOCK_CONFIG }
430
+ activeClassName = "active-route"
431
+ >
432
+ < div className = "flexbox flex-justify" > Lock Deployment config</ div >
433
+ </ NavLink >
434
+ ) }
424
435
</ >
425
436
) }
426
437
</ div >
@@ -583,6 +594,14 @@ function Body({ getHostURLConfig, checkList, serverMode, handleChecklistUpdate,
583
594
< FilterConditions isSuperAdmin = { isSuperAdmin } />
584
595
</ Route >
585
596
) }
597
+ { LockConfiguration && (
598
+ < Route path = { URLS . GLOBAL_CONFIG_LOCK_CONFIG } >
599
+ < LockConfiguration
600
+ isSuperAdmin = { isSuperAdmin }
601
+ CodeEditor = { CodeEditor }
602
+ />
603
+ </ Route >
604
+ ) }
586
605
< Redirect to = { defaultRoute ( ) } />
587
606
</ Switch >
588
607
)
@@ -611,10 +630,18 @@ function Title({ title = '', subtitle = '', style = {}, className = '', tag = ''
611
630
function ListToggle ( { onSelect, enabled = false , isButtonDisabled = false , ...props } ) {
612
631
const handleToggle = ( ) => {
613
632
if ( ! isButtonDisabled ) {
614
- onSelect ( ! enabled ) ;
633
+ onSelect ( ! enabled )
615
634
}
616
- } ;
617
- return < Toggle dataTestId = "toggle-button" { ...props } onSelect = { handleToggle } selected = { enabled } disabled = { isButtonDisabled } />
635
+ }
636
+ return (
637
+ < Toggle
638
+ dataTestId = "toggle-button"
639
+ { ...props }
640
+ onSelect = { handleToggle }
641
+ selected = { enabled }
642
+ disabled = { isButtonDisabled }
643
+ />
644
+ )
618
645
}
619
646
620
647
function DropDown ( { className = '' , dataTestid = '' , style = { } , src = null , ...props } ) {
0 commit comments