Skip to content

Commit 7d86138

Browse files
authored
Merge pull request #2079 from devtron-labs/fix/ea-issues
chore: fix: redirection to chart store and hide scope variables in EA only mode
2 parents 215319c + 48844b1 commit 7d86138

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

src/components/ClusterNodes/ClusterOverview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const tippyForMetricsApi = () => {
7171
heading="Metrics API is not available"
7272
additionalContent={metricsApiTippyContent()}
7373
documentationLinkText="View metrics-server helm chart"
74-
documentationLink={`/dashboard${URLS.CHARTS_DISCOVER}/?appStoreName=metrics-server`}
74+
documentationLink={`/dashboard${URLS.CHARTS_DISCOVER}?appStoreName=metrics-server`}
7575
iconClassName="icon-dim-20 ml-8 fcn-5"
7676
/>
7777
</div>

src/components/globalConfigurations/GlobalConfiguration.tsx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,9 @@ const NavItem = ({ serverMode }) => {
419419
key={`nav_item_${index}`}
420420
to={route.href}
421421
data-testid="user-authorization-link"
422-
className={`cursor ${collapsedState[route.name] ? '' : 'fw-6'
423-
} flex dc__content-space`}
422+
className={`cursor ${
423+
collapsedState[route.name] ? '' : 'fw-6'
424+
} flex dc__content-space`}
424425
onClick={(e) => {
425426
handleGroupCollapsedState(e, route)
426427
}}
@@ -484,17 +485,18 @@ const NavItem = ({ serverMode }) => {
484485
<div className="flexbox flex-justify">Catalog Framework</div>
485486
</NavLink>
486487
)}
487-
{window._env_.ENABLE_SCOPED_VARIABLES && (
488-
<NavLink
489-
to={CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
490-
key={`${CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}-nav-link`}
491-
activeClassName="active-route"
492-
>
493-
<div className="flexbox flex-justify">Scoped Variables</div>
494-
</NavLink>
495-
)}
496488
{serverMode !== SERVER_MODE.EA_ONLY && (
497489
<>
490+
{window._env_.ENABLE_SCOPED_VARIABLES && (
491+
<NavLink
492+
to={CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
493+
key={`${CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}-nav-link`}
494+
activeClassName="active-route"
495+
>
496+
<div className="flexbox flex-justify">Scoped Variables</div>
497+
</NavLink>
498+
)}
499+
498500
{PluginsPolicy && (
499501
<NavLink
500502
to={URLS.GLOBAL_CONFIG_PLUGINS}
@@ -679,20 +681,20 @@ const Body = ({ getHostURLConfig, checkList, serverMode, handleChecklistUpdate,
679681
]
680682
: []),
681683
]}
682-
{window._env_.ENABLE_SCOPED_VARIABLES && (
683-
<Route
684-
key={`${CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}-route`}
685-
path={CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
686-
>
687-
<ScopedVariables isSuperAdmin={isSuperAdmin} />
688-
</Route>
689-
)}
690684
{CatalogFramework && (
691685
<Route key={URLS.GLOBAL_CONFIG_CATALOG_FRAMEWORK} path={URLS.GLOBAL_CONFIG_CATALOG_FRAMEWORK}>
692686
<CatalogFramework isSuperAdmin={isSuperAdmin} />
693687
</Route>
694688
)}
695689
{serverMode !== SERVER_MODE.EA_ONLY && [
690+
window._env_.ENABLE_SCOPED_VARIABLES && (
691+
<Route
692+
key={`${CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}-route`}
693+
path={CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
694+
>
695+
<ScopedVariables isSuperAdmin={isSuperAdmin} />
696+
</Route>
697+
),
696698
DeploymentWindow && (
697699
<Route key={URLS.GLOBAL_CONFIG_DEPLOYMENT_WINDOW} path={URLS.GLOBAL_CONFIG_DEPLOYMENT_WINDOW}>
698700
<DeploymentWindow isSuperAdmin={isSuperAdmin} />

0 commit comments

Comments
 (0)