Skip to content

Commit a69ab93

Browse files
committed
fix: add check for ea mode in global config navlink
1 parent 53e2f54 commit a69ab93

File tree

2 files changed

+49
-22
lines changed

2 files changed

+49
-22
lines changed

src/components/globalConfigurations/GlobalConfiguration.tsx

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ import { Route, NavLink, Router, Switch, Redirect } from 'react-router-dom'
33
import { useHistory, useLocation } from 'react-router'
44
import { URLS } from '../../config'
55
import { ErrorBoundary, importComponentFromFELibrary } from '../common'
6-
import { showError, Progressing, Toggle, ConditionalWrap, TippyCustomized, TippyTheme } from '@devtron-labs/devtron-fe-common-lib'
6+
import {
7+
showError,
8+
Progressing,
9+
Toggle,
10+
ConditionalWrap,
11+
TippyCustomized,
12+
TippyTheme,
13+
} from '@devtron-labs/devtron-fe-common-lib'
714
import arrowTriangle from '../../assets/icons/ic-chevron-down.svg'
815
import { AddNotification } from '../notifications/AddNotification'
916
import { ReactComponent as FormError } from '../../assets/icons/ic-warning.svg'
@@ -275,7 +282,7 @@ function NavItem({ serverMode }) {
275282
const onTippyClose = () => {
276283
// Resetting the tippy state
277284
setTippyConfig({
278-
showTippy: false
285+
showTippy: false,
279286
})
280287
}
281288

@@ -432,15 +439,17 @@ function NavItem({ serverMode }) {
432439
<div className="flexbox flex-justify">External Links</div>
433440
</NavLink>
434441

435-
{CatalogFramework && <NavLink
436-
to={URLS.GLOBAL_CONFIG_CATALOG_FRAMEWORK}
437-
key={URLS.GLOBAL_CONFIG_CATALOG_FRAMEWORK}
438-
activeClassName="active-route"
439-
>
440-
<div className="flexbox flex-justify">Catalog Framework</div>
441-
</NavLink>}
442+
{CatalogFramework && (
443+
<NavLink
444+
to={URLS.GLOBAL_CONFIG_CATALOG_FRAMEWORK}
445+
key={URLS.GLOBAL_CONFIG_CATALOG_FRAMEWORK}
446+
activeClassName="active-route"
447+
>
448+
<div className="flexbox flex-justify">Catalog Framework</div>
449+
</NavLink>
450+
)}
442451

443-
{serverMode !== SERVER_MODE.EA_ONLY && window._env_.ENABLE_SCOPED_VARIABLES && (
452+
{serverMode !== SERVER_MODE.EA_ONLY && window._env_.ENABLE_SCOPED_VARIABLES && (
444453
<NavLink
445454
to={URLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
446455
key={URLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
@@ -486,13 +495,16 @@ function NavItem({ serverMode }) {
486495
<div className="flexbox flex-justify">Lock Deployment config</div>
487496
</NavLink>
488497
)}
489-
<NavLink
490-
to={URLS.GLOBAL_CONFIG_BUILD_INFRA}
491-
key={URLS.GLOBAL_CONFIG_BUILD_INFRA}
492-
activeClassName="active-route"
493-
>
494-
<div className="flexbox flex-justify">Build Infra</div>
495-
</NavLink>
498+
499+
{serverMode !== SERVER_MODE.EA_ONLY && (
500+
<NavLink
501+
to={URLS.GLOBAL_CONFIG_BUILD_INFRA}
502+
key={URLS.GLOBAL_CONFIG_BUILD_INFRA}
503+
activeClassName="active-route"
504+
>
505+
<div className="flexbox flex-justify">Build Infra</div>
506+
</NavLink>
507+
)}
496508
</>
497509
)}
498510
</div>
@@ -729,14 +741,14 @@ export function ProtectedInput({
729741
value,
730742
error,
731743
onChange,
732-
label= '',
744+
label = '',
733745
tabIndex = 1,
734746
disabled = false,
735747
hidden = true,
736748
labelClassName = '',
737749
placeholder = '',
738750
dataTestid = '',
739-
onBlur= (e) => {},
751+
onBlur = (e) => {},
740752
isRequiredField = false,
741753
}: ProtectedInputType) {
742754
const [shown, toggleShown] = useState(false)
@@ -746,7 +758,10 @@ export function ProtectedInput({
746758

747759
return (
748760
<div className="flex column left top ">
749-
<label htmlFor="" className={`form__label ${labelClassName} ${isRequiredField ? 'dc__required-field' : ''}`}>
761+
<label
762+
htmlFor=""
763+
className={`form__label ${labelClassName} ${isRequiredField ? 'dc__required-field' : ''}`}
764+
>
750765
{label}
751766
</label>
752767
<div className="dc__position-rel w-100">

src/css/base.scss

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,6 +2106,10 @@ button.anchor {
21062106

21072107
.dc__border-bottom-2 {
21082108
border-bottom: 2px solid var(--N200);
2109+
2110+
&--b5 {
2111+
border-bottom: 2px solid var(--B500) !important;
2112+
}
21092113
}
21102114

21112115
.dc__border-left {
@@ -2203,6 +2207,10 @@ button.anchor {
22032207
max-width: 120px;
22042208
}
22052209

2210+
.dc__mxw-160 {
2211+
max-width: 160px;
2212+
}
2213+
22062214
.dc__mxw-200 {
22072215
max-width: 200px;
22082216
}
@@ -2995,6 +3003,10 @@ textarea,
29953003
width: auto;
29963004
}
29973005

3006+
.dc__width-min-content {
3007+
width: min-content;
3008+
}
3009+
29983010
.dc_width-max-content {
29993011
width: max-content;
30003012
}
@@ -4133,7 +4145,7 @@ textarea::placeholder {
41334145
outline: none;
41344146

41354147
&:focus-visible {
4136-
outline: 5px auto -webkit-focus-ring-color;
4137-
outline-offset: -2px;
4148+
outline: 5px auto -webkit-focus-ring-color !important;
4149+
outline-offset: 1px;
41384150
}
41394151
}

0 commit comments

Comments
 (0)