Skip to content

Commit 50ed399

Browse files
authored
Merge pull request #432 from devtron-labs/fix/ci-abort-loading
fix: set aborting false on abort close
2 parents feca14a + fb16a11 commit 50ed399

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.1.7",
3+
"version": "1.1.8",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/Modals/VisibleModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export class VisibleModal extends React.Component<{
3434
}
3535

3636
escFunction(event) {
37-
stopPropagation(event)
3837
if (event.keyCode === 27 || event.key === 'Escape') {
38+
stopPropagation(event)
3939
if (this.props.onEscape) {
4040
this.props.onEscape(event)
4141
} else if (this.props.close) {

src/Shared/Components/CICDHistory/TriggerOutput.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,11 @@ const ProgressingStatus = React.memo(({ status, stage, type }: ProgressingStatus
166166
variant: ToastVariantType.success,
167167
description: 'Build Aborted',
168168
})
169-
setAbortConfirmation(false)
170169
setAbortError({
171170
status: false,
172171
message: '',
173172
})
174173
} catch (error) {
175-
setAborting(false)
176-
setAbortConfirmation(false)
177174
if (error.code === 400) {
178175
// code 400 is for aborting a running build
179176
const { errors } = error
@@ -182,6 +179,9 @@ const ProgressingStatus = React.memo(({ status, stage, type }: ProgressingStatus
182179
message: errors[0].userMessage,
183180
})
184181
}
182+
} finally {
183+
setAborting(false)
184+
setAbortConfirmation(false)
185185
}
186186
}
187187

src/Shared/Components/Header/IframePromoButton.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { useState, useCallback } from 'react'
12
import { GenericEmptyState, VisibleModal } from '@Common/index'
23
import { ComponentSizeType } from '@Shared/constants'
3-
import { useState, useCallback } from 'react'
4+
import ReactGA from 'react-ga4'
45
import { ReactComponent as Close } from '@Icons/ic-close.svg'
56
import { Button, ButtonStyleType, ButtonVariantType } from '../Button'
67

@@ -13,7 +14,13 @@ export const IframePromoButton = () => {
1314
FEATURE_PROMO_EMBEDDED_IFRAME_URL,
1415
} = window._env_
1516

16-
const onClickShowIframeModal = useCallback(() => setEmbeddedIframeModal(true), [])
17+
const onClickShowIframeModal = useCallback(() => {
18+
setEmbeddedIframeModal(true)
19+
ReactGA.event({
20+
category: 'PRIMARY_HEADER',
21+
action: 'HEADER_IFRAME_BUTTON_CLICKED',
22+
})
23+
}, [])
1724
const onClickCloseIframeModal = useCallback(() => setEmbeddedIframeModal(false), [])
1825

1926
const renderIframeDrawer = () => (

0 commit comments

Comments
 (0)