@@ -35,6 +35,7 @@ import { EnvironmentList } from './EnvironmentList'
35
35
import { MAX_LENGTH_350 } from '../../../config/constantMessaging'
36
36
import { getModuleInfo } from '../../v2/devtronStackManager/DevtronStackManager.service'
37
37
import { MODAL_STATE , OVERVIEW_TABS , TAB_SEARCH_KEY } from './constants'
38
+ import ReactGA from 'react-ga4'
38
39
const MandatoryTagWarning = importComponentFromFELibrary ( 'MandatoryTagWarning' )
39
40
const Catalog = importComponentFromFELibrary ( 'Catalog' )
40
41
const DependencyList = importComponentFromFELibrary ( 'DependencyList' )
@@ -87,6 +88,15 @@ export default function AppOverview({ appMetaInfo, getAppMetaInfoRes, filteredEn
87
88
history . replace ( { search : searchParams . toString ( ) } )
88
89
}
89
90
91
+ const handleEditDependencyClick = ( ) => {
92
+ ReactGA . event ( {
93
+ category : 'Application Dependency' ,
94
+ action : 'Edit Dependency click' ,
95
+ label : 'Edit Dependency click' ,
96
+ } )
97
+ toggleUpdateDependencyModal ( )
98
+ }
99
+
90
100
useEffect ( ( ) => {
91
101
// add a default tab if not set
92
102
if ( ! activeTab || ! Object . values ( OVERVIEW_TABS ) . includes ( activeTab ) ) {
@@ -481,6 +491,7 @@ export default function AppOverview({ appMetaInfo, getAppMetaInfoRes, filteredEn
481
491
isUpdateModalOpen = { isUpdateDependencyModalOpen }
482
492
toggleUpdateModalOpen = { toggleUpdateDependencyModal }
483
493
toggleButtonDisabledState = { setIsEditDependencyButtonDisabled }
494
+ filteredEnvIds = { filteredEnvIds }
484
495
/>
485
496
) : null ,
486
497
}
@@ -507,7 +518,7 @@ export default function AppOverview({ appMetaInfo, getAppMetaInfoRes, filteredEn
507
518
< button
508
519
type = "button"
509
520
className = { `cta flex h-28 dc__gap-4 ${ isEditDependencyButtonDisabled ? 'disabled-opacity' : '' } ` }
510
- onClick = { isEditDependencyButtonDisabled ? noop : toggleUpdateDependencyModal }
521
+ onClick = { isEditDependencyButtonDisabled ? noop : handleEditDependencyClick }
511
522
>
512
523
< EditIcon className = "mw-14 icon-dim-14 scn-0 dc__no-svg-fill" />
513
524
Edit Dependency
0 commit comments