Skip to content

Commit

Permalink
Merge pull request #2079 from devtron-labs/fix/ea-issues
Browse files Browse the repository at this point in the history
chore: fix: redirection to chart store and hide scope variables in EA only mode
  • Loading branch information
eshankvaish authored Sep 24, 2024
2 parents 215319c + 48844b1 commit 7d86138
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/ClusterNodes/ClusterOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const tippyForMetricsApi = () => {
heading="Metrics API is not available"
additionalContent={metricsApiTippyContent()}
documentationLinkText="View metrics-server helm chart"
documentationLink={`/dashboard${URLS.CHARTS_DISCOVER}/?appStoreName=metrics-server`}
documentationLink={`/dashboard${URLS.CHARTS_DISCOVER}?appStoreName=metrics-server`}
iconClassName="icon-dim-20 ml-8 fcn-5"
/>
</div>
Expand Down
40 changes: 21 additions & 19 deletions src/components/globalConfigurations/GlobalConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,9 @@ const NavItem = ({ serverMode }) => {
key={`nav_item_${index}`}
to={route.href}
data-testid="user-authorization-link"
className={`cursor ${collapsedState[route.name] ? '' : 'fw-6'
} flex dc__content-space`}
className={`cursor ${
collapsedState[route.name] ? '' : 'fw-6'
} flex dc__content-space`}
onClick={(e) => {
handleGroupCollapsedState(e, route)
}}
Expand Down Expand Up @@ -484,17 +485,18 @@ const NavItem = ({ serverMode }) => {
<div className="flexbox flex-justify">Catalog Framework</div>
</NavLink>
)}
{window._env_.ENABLE_SCOPED_VARIABLES && (
<NavLink
to={CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
key={`${CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}-nav-link`}
activeClassName="active-route"
>
<div className="flexbox flex-justify">Scoped Variables</div>
</NavLink>
)}
{serverMode !== SERVER_MODE.EA_ONLY && (
<>
{window._env_.ENABLE_SCOPED_VARIABLES && (
<NavLink
to={CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
key={`${CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}-nav-link`}
activeClassName="active-route"
>
<div className="flexbox flex-justify">Scoped Variables</div>
</NavLink>
)}

{PluginsPolicy && (
<NavLink
to={URLS.GLOBAL_CONFIG_PLUGINS}
Expand Down Expand Up @@ -679,20 +681,20 @@ const Body = ({ getHostURLConfig, checkList, serverMode, handleChecklistUpdate,
]
: []),
]}
{window._env_.ENABLE_SCOPED_VARIABLES && (
<Route
key={`${CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}-route`}
path={CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
>
<ScopedVariables isSuperAdmin={isSuperAdmin} />
</Route>
)}
{CatalogFramework && (
<Route key={URLS.GLOBAL_CONFIG_CATALOG_FRAMEWORK} path={URLS.GLOBAL_CONFIG_CATALOG_FRAMEWORK}>
<CatalogFramework isSuperAdmin={isSuperAdmin} />
</Route>
)}
{serverMode !== SERVER_MODE.EA_ONLY && [
window._env_.ENABLE_SCOPED_VARIABLES && (
<Route
key={`${CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}-route`}
path={CommonURLS.GLOBAL_CONFIG_SCOPED_VARIABLES}
>
<ScopedVariables isSuperAdmin={isSuperAdmin} />
</Route>
),
DeploymentWindow && (
<Route key={URLS.GLOBAL_CONFIG_DEPLOYMENT_WINDOW} path={URLS.GLOBAL_CONFIG_DEPLOYMENT_WINDOW}>
<DeploymentWindow isSuperAdmin={isSuperAdmin} />
Expand Down

0 comments on commit 7d86138

Please sign in to comment.