diff --git a/.env b/.env index a318e8d6f7..e5a196d10f 100644 --- a/.env +++ b/.env @@ -60,3 +60,4 @@ FEATURE_CONFIG_DRIFT_ENABLE=false FEATURE_PROMO_EMBEDDED_BUTTON_TEXT= FEATURE_PROMO_EMBEDDED_MODAL_TITLE= FEATURE_PROMO_EMBEDDED_IFRAME_URL= +FEATURE_SWAP_TRAFFIC_ENABLE=true diff --git a/package.json b/package.json index da09101a02..28c68563dc 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "homepage": "/dashboard", "dependencies": { - "@devtron-labs/devtron-fe-common-lib": "0.6.5", + "@devtron-labs/devtron-fe-common-lib": "0.6.5-beta-6", "@esbuild-plugins/node-globals-polyfill": "0.2.3", "@rjsf/core": "^5.13.3", "@rjsf/utils": "^5.13.3", diff --git a/src/components/app/details/appDetails/SourceInfo.tsx b/src/components/app/details/appDetails/SourceInfo.tsx index bc09641539..c53f3eb4a2 100644 --- a/src/components/app/details/appDetails/SourceInfo.tsx +++ b/src/components/app/details/appDetails/SourceInfo.tsx @@ -53,6 +53,7 @@ import HelmAppConfigApplyStatusCard from '@Components/v2/appDetails/sourceInfo/e const AppDetailsDownloadCard = importComponentFromFELibrary('AppDetailsDownloadCard') const DeploymentWindowStatusCard = importComponentFromFELibrary('DeploymentWindowStatusCard') const ConfigSyncStatusButton = importComponentFromFELibrary('ConfigSyncStatusButton', null, 'function') +const SwapTraffic = importComponentFromFELibrary('SwapTraffic', null, 'function') export const SourceInfo = ({ appDetails, @@ -158,15 +159,18 @@ export const SourceInfo = ({ )} - {appDetails?.resourceTree && !isIsolatedEnv && window._env_.FEATURE_CONFIG_DRIFT_ENABLE && ConfigSyncStatusButton && ( -
- -
- )} + {appDetails?.resourceTree && + !isIsolatedEnv && + window._env_.FEATURE_CONFIG_DRIFT_ENABLE && + ConfigSyncStatusButton && ( +
+ +
+ )} {isdeploymentAppDeleting && (
@@ -214,6 +218,18 @@ export const SourceInfo = ({ style={ButtonStyleType.neutral} /> )} + {window._env_.FEATURE_SWAP_TRAFFIC_ENABLE && + SwapTraffic && + !!appDetails.pcoId && + !appDetails.trafficSwitched && ( + + )} {!isVirtualEnvironment && showHibernateModal && (