16
16
17
17
import { useMemo , useState } from 'react'
18
18
import { Link , useHistory , useParams } from 'react-router-dom'
19
+ import ReactGA from 'react-ga4'
19
20
import moment from 'moment'
20
21
import {
21
22
Button ,
@@ -33,7 +34,7 @@ import {
33
34
Tooltip ,
34
35
} from '@devtron-labs/devtron-fe-common-lib'
35
36
import { ReactComponent as ICCamera } from '@Icons/ic-camera.svg'
36
- import { URLS } from '../../../../config'
37
+ import { APP_COMPOSE_STAGE , getAppComposeURL , URLS } from '../../../../config'
37
38
import { EnvSelector } from './AppDetails'
38
39
import { DeploymentAppTypeNameMapping } from '../../../../config/constantMessaging'
39
40
import { Nodes , SourceInfoType } from '../../types'
@@ -52,6 +53,7 @@ import { ReactComponent as Trash } from '../../../../assets/icons/ic-delete-dots
52
53
import { ReactComponent as ScaleDown } from '../../../../assets/icons/ic-scale-down.svg'
53
54
import HelmAppConfigApplyStatusCard from '@Components/v2/appDetails/sourceInfo/environmentStatus/HelmAppConfigApplyStatusCard'
54
55
import { HibernationModalTypes } from './appDetails.type'
56
+ import { DA_APP_DETAILS_GA_EVENTS } from './constants'
55
57
56
58
const AppDetailsDownloadCard = importComponentFromFELibrary ( 'AppDetailsDownloadCard' )
57
59
const DeploymentWindowStatusCard = importComponentFromFELibrary ( 'DeploymentWindowStatusCard' )
@@ -155,7 +157,8 @@ export const SourceInfo = ({
155
157
}
156
158
157
159
const onClickSliderVerticalButton = ( ) => {
158
- history . push ( `${ URLS . APP } /${ params . appId } /edit/${ URLS . APP_ENV_OVERRIDE_CONFIG } /${ params . envId } ` )
160
+ history . push ( `${ getAppComposeURL ( params . appId , APP_COMPOSE_STAGE . ENV_OVERRIDE , false , false ) } /${ params . envId } ` )
161
+ ReactGA . event ( DA_APP_DETAILS_GA_EVENTS . GoToEnvironmentConfiguration )
159
162
}
160
163
161
164
const renderDevtronAppsEnvironmentSelector = ( environment ) => {
@@ -286,14 +289,14 @@ export const SourceInfo = ({
286
289
/>
287
290
) }
288
291
< Button
289
- dataTestId = "deploy -button"
292
+ dataTestId = "app-details-env-config -button"
290
293
size = { ComponentSizeType . small }
291
294
icon = { < Icon name = "ic-sliders-vertical" color = { null } /> }
292
295
variant = { ButtonVariantType . secondary }
293
296
onClick = { onClickSliderVerticalButton }
294
297
component = { ButtonComponentType . button }
295
298
style = { ButtonStyleType . neutral }
296
- ariaLabel = "Go to Env Configuration"
299
+ ariaLabel = "Go to Environment Configuration"
297
300
/>
298
301
{ window . _env_ . FEATURE_SWAP_TRAFFIC_ENABLE &&
299
302
SwapTraffic &&
0 commit comments