Skip to content

Commit 0dc27e2

Browse files
committed
feat: integrate FEATURE_MANAGE_TRAFFIC_ENABLE flag
1 parent 2c80d53 commit 0dc27e2

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false
6666
GATEKEEPER_URL=https://license.devtron.ai/dashboard
6767
FEATURE_AI_INTEGRATION_ENABLE=false
6868
LOGIN_PAGE_IMAGE=
69+
FEATURE_MANAGE_TRAFFIC_ENABLE=false

src/components/ApplicationGroup/Details/EnvironmentOverview/EnvironmentOverview.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,9 @@ const EnvironmentOverview = ({
512512
<span className="flex">
513513
<GridIcon className="icon-dim-20 mr-8 scn-9" /> {GROUP_LIST_HEADER.APPLICATIONS}
514514
</span>
515-
{ManageTrafficButton && <ManageTrafficButton onClick={handleOpenManageTrafficDrawer} />}
515+
{window._env_.FEATURE_MANAGE_TRAFFIC_ENABLE && ManageTrafficButton && (
516+
<ManageTrafficButton onClick={handleOpenManageTrafficDrawer} />
517+
)}
516518
</div>
517519
<EnvironmentOverviewTable
518520
rows={environmentOverviewTableRows}
@@ -540,7 +542,7 @@ const EnvironmentOverview = ({
540542
count={selectedAppDetailsList.length}
541543
onClose={handleBulkSelectionWidgetClose}
542544
popUpMenuItems={[
543-
...(getManageTrafficMenuButtonConfig
545+
...(window._env_.FEATURE_MANAGE_TRAFFIC_ENABLE && getManageTrafficMenuButtonConfig
544546
? [getManageTrafficMenuButtonConfig({ onClick: handleOpenManageTrafficDrawer })]
545547
: []),
546548
...(ClonePipelineMenuButton && appListData.environment

src/components/app/details/appDetails/SourceInfo.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -440,16 +440,18 @@ export const SourceInfo = ({
440440
filteredEnvIds={filteredEnvIds}
441441
/>
442442
)}
443-
{!isVirtualEnvironment && DeploymentStrategyCard && (
444-
<DeploymentStrategyCard
445-
appId={appDetails.appId}
446-
envId={appDetails.environmentId}
447-
appName={appDetails.appName}
448-
envName={appDetails.environmentName}
449-
renderRollbackButton={() => renderAppDetailsCDButton(true)}
450-
isResourceTreeReloading={isResourceTreeReloading}
451-
/>
452-
)}
443+
{window._env_.FEATURE_MANAGE_TRAFFIC_ENABLE &&
444+
!isVirtualEnvironment &&
445+
DeploymentStrategyCard && (
446+
<DeploymentStrategyCard
447+
appId={appDetails.appId}
448+
envId={appDetails.environmentId}
449+
appName={appDetails.appName}
450+
envName={appDetails.environmentName}
451+
renderRollbackButton={() => renderAppDetailsCDButton(true)}
452+
isResourceTreeReloading={isResourceTreeReloading}
453+
/>
454+
)}
453455
{!appDetails?.deploymentAppDeleteRequest &&
454456
!appMigratedFromExternalSourceAndIsNotTriggered && (
455457
<SecurityVulnerabilityCard

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ if (!window || !window._env_) {
169169
GATEKEEPER_URL: 'https://license.devtron.ai/dashboard',
170170
FEATURE_AI_INTEGRATION_ENABLE: false,
171171
LOGIN_PAGE_IMAGE: '',
172+
FEATURE_MANAGE_TRAFFIC_ENABLE: false,
172173
}
173174
}
174175

0 commit comments

Comments
 (0)