diff --git a/package.json b/package.json index 02a8a13527..f0834c7c17 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "homepage": "/dashboard", "dependencies": { - "@devtron-labs/devtron-fe-common-lib": "0.2.17-beta-4", + "@devtron-labs/devtron-fe-common-lib": "0.2.17-patch-3", "@esbuild-plugins/node-globals-polyfill": "0.2.3", "@rjsf/core": "^5.13.3", "@rjsf/utils": "^5.13.3", diff --git a/src/components/globalConfigurations/GlobalConfiguration.tsx b/src/components/globalConfigurations/GlobalConfiguration.tsx index 4e3a9219d5..8448982e22 100644 --- a/src/components/globalConfigurations/GlobalConfiguration.tsx +++ b/src/components/globalConfigurations/GlobalConfiguration.tsx @@ -15,8 +15,7 @@ */ import { lazy, useState, useEffect, Suspense, isValidElement } from 'react' -import { Route, NavLink, Router, Switch, Redirect } from 'react-router-dom' -import { useHistory, useLocation } from 'react-router' +import { Route, NavLink, Router, Switch, Redirect, useHistory, useLocation } from 'react-router-dom' import { showError, Progressing, @@ -331,12 +330,11 @@ const NavItem = ({ serverMode }) => { to={`${route.href}`} activeClassName="active-route" data-testid={route.dataTestId} - className={`${ - route.name === 'API tokens' && + className={`${route.name === 'API tokens' && location.pathname.startsWith(`${URLS.GLOBAL_CONFIG_AUTH}/${Routes.API_TOKEN}`) - ? 'active-route' - : '' - }`} + ? 'active-route' + : '' + }`} onClick={(e) => { if (!preventOnClickOp) { handleGroupCollapsedState(e, route) @@ -421,9 +419,8 @@ 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) }} @@ -574,7 +571,7 @@ const Body = ({ getHostURLConfig, checkList, serverMode, handleChecklistUpdate, } return ( - + { @@ -588,7 +585,7 @@ const Body = ({ getHostURLConfig, checkList, serverMode, handleChecklistUpdate, }} /> {!window._env_.K8S_CLIENT && [ - serverMode !== SERVER_MODE.EA_ONLY && ( + ...serverMode !== SERVER_MODE.EA_ONLY ? [( - ), + )] : [], }} />, - serverMode !== SERVER_MODE.EA_ONLY && ( + ...serverMode !== SERVER_MODE.EA_ONLY ? [( }} /> - ), + )] : [], }} />, - serverMode !== SERVER_MODE.EA_ONLY && ( + ...serverMode !== SERVER_MODE.EA_ONLY ? [( - ), + )] : [], , , ...(serverMode !== SERVER_MODE.EA_ONLY ? [ - - - , - ] + + + , + ] : []), ]} {window._env_.ENABLE_SCOPED_VARIABLES && ( @@ -695,47 +692,43 @@ const Body = ({ getHostURLConfig, checkList, serverMode, handleChecklistUpdate, )} - {serverMode !== SERVER_MODE.EA_ONLY && ( - <> - {DeploymentWindow && ( - - - - )} - , - {ImagePromotion && ( - - - - )} - , - {PluginsPolicy && ( - - - - )} - {PullImageDigest && ( - - - - )} - {TagListContainer && ( - - - - )} - {FilterConditions && ( - - - - )} - {LockDeploymentConfiguration && ( - - - - )} - - )} + {serverMode !== SERVER_MODE.EA_ONLY && [ + DeploymentWindow && ( + + + + ), + ImagePromotion && ( + + + + ), + PluginsPolicy && ( + + + + ), + PullImageDigest && ( + + + + ), + TagListContainer && ( + + + + ), + FilterConditions && ( + + + + ), + LockDeploymentConfiguration && ( + + + + ) + ]} ) @@ -826,7 +819,7 @@ export const ProtectedInput = ({ labelClassName = '', placeholder = '', dataTestid = '', - onBlur = (e) => {}, + onBlur = (e) => { }, isRequiredField = false, }: ProtectedInputType) => { const [shown, toggleShown] = useState(false) @@ -889,7 +882,7 @@ export const ShowHide = ({ height="24" className={className} viewBox="0 0 24 24" - onClick={disabled ? () => {} : onClick || defaultOnClick} + onClick={disabled ? () => { } : onClick || defaultOnClick} > @@ -906,7 +899,7 @@ export const ShowHide = ({ height="24" className={className} viewBox="0 0 24 24" - onClick={disabled ? () => {} : onClick || defaultOnClick} + onClick={disabled ? () => { } : onClick || defaultOnClick} > diff --git a/yarn.lock b/yarn.lock index 07030dd9c5..f6e0666a3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -993,10 +993,10 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@devtron-labs/devtron-fe-common-lib@0.2.17-beta-4": - version "0.2.17-beta-4" - resolved "https://registry.yarnpkg.com/@devtron-labs/devtron-fe-common-lib/-/devtron-fe-common-lib-0.2.17-beta-4.tgz#cd4ee5d98e8bae8047218aadbd3398d0ccdd7636" - integrity sha512-bPXxJwnoYsdBzIwzvvqkVHCscB7TMMkDtGi6gnUwVABXLWilKfpMCoGiw4HUGhrQcYCm9EgPpv4af4FdDZwotA== +"@devtron-labs/devtron-fe-common-lib@0.2.17-patch-3": + version "0.2.17-patch-3" + resolved "https://registry.yarnpkg.com/@devtron-labs/devtron-fe-common-lib/-/devtron-fe-common-lib-0.2.17-patch-3.tgz#ae39b05ba6ad740094534318adf2e1cc18098cef" + integrity sha512-ihTCmAqVDrhfCVHO95R/KUxAZhksjt2dZq4t70irAYO3K5vE7oAsMrNR1d3NtZLEPhERz7aNbKAgbdm5409Vaw== dependencies: "@types/react-dates" "^21.8.6" ansi_up "^5.2.1"