@@ -21,6 +21,9 @@ import moment from 'moment'
21
21
import { toast } from 'react-toastify'
22
22
import { ReactComponent as ICLines } from '@Icons/ic-lines.svg'
23
23
import { ShowMoreText } from '@Shared/Components/ShowMoreText'
24
+ import { getHandleOpenURL } from '@Shared/Helpers'
25
+ import { ImageChipCell } from '@Shared/Components/ImageChipCell'
26
+ import { CommitChipCell } from '@Shared/Components/CommitChipCell'
24
27
import {
25
28
ConfirmationDialog ,
26
29
DATE_TIME_FORMATS ,
@@ -65,7 +68,6 @@ import { DeploymentHistoryDetailedView, DeploymentHistoryConfigList } from './De
65
68
import { GitChanges , Scroller } from './History.components'
66
69
import Artifacts from './Artifacts'
67
70
import { statusColor as colorMap , EMPTY_STATE_STATUS , PULSATING_STATUS_MAP } from '../../constants'
68
- import { ImageChipCell } from '../ImageChipCell'
69
71
import './cicdHistory.scss'
70
72
71
73
const Finished = React . memo (
@@ -284,6 +286,7 @@ const StartDetails = ({
284
286
} : StartDetailsType ) : JSX . Element => {
285
287
const { url } = useRouteMatch ( )
286
288
const { pathname } = useLocation ( )
289
+
287
290
return (
288
291
< div className = "pb-12 w-100 pr-20 flex column left dc__border-bottom-n1" >
289
292
< div className = "flexbox dc__gap-8 dc__align-items-center" >
@@ -313,24 +316,25 @@ const StartDetails = ({
313
316
const gitDetail : GitTriggers = gitTriggers [ ciMaterial . id ]
314
317
return gitDetail ? (
315
318
< React . Fragment key = { ciMaterial . id } >
316
- { ciMaterial . type !== 'WEBHOOK' && (
317
- < a
318
- target = "_blank"
319
- rel = "noopener noreferrer"
320
- href = { createGitCommitUrl ( ciMaterial . url , gitDetail . Commit ) }
321
- className = "dc__app-commit__hash bcn-1 cn-7"
322
- >
323
- { gitDetail . Commit ?. substr ( 0 , 7 ) }
324
- </ a >
319
+ { ciMaterial . type !== 'WEBHOOK' && gitDetail . Commit && (
320
+ < CommitChipCell
321
+ commits = { [ gitDetail . Commit ] }
322
+ handleClick = { getHandleOpenURL (
323
+ createGitCommitUrl ( ciMaterial . url , gitDetail . Commit ) ,
324
+ ) }
325
+ />
325
326
) }
326
327
{ ciMaterial . type === 'WEBHOOK' &&
327
328
gitDetail . WebhookData &&
328
- gitDetail . WebhookData . Data && (
329
- < span className = "dc__app-commit__hash" >
330
- { gitDetail . WebhookData . EventActionType === 'merged'
331
- ? gitDetail . WebhookData . Data [ 'target checkout' ] ?. substr ( 0 , 7 )
332
- : gitDetail . WebhookData . Data [ 'target checkout' ] }
333
- </ span >
329
+ gitDetail . WebhookData . Data &&
330
+ gitDetail . WebhookData . Data [ 'target checkout' ] && (
331
+ < CommitChipCell
332
+ commits = {
333
+ gitDetail . WebhookData . EventActionType === 'merged'
334
+ ? gitDetail . WebhookData . Data [ 'target checkout' ] . substr ( 0 , 7 )
335
+ : gitDetail . WebhookData . Data [ 'target checkout' ]
336
+ }
337
+ />
334
338
) }
335
339
</ React . Fragment >
336
340
) : null
@@ -413,12 +417,12 @@ export const TriggerDetails = React.memo(
413
417
triggerMetadata,
414
418
renderDeploymentHistoryTriggerMetaText,
415
419
} : TriggerDetailsType ) : JSX . Element => (
416
- < div className = "trigger-details flexbox-col pb-4 " >
420
+ < div className = "trigger-details flexbox-col pb-12 " >
417
421
< div className = "display-grid trigger-details__grid py-12" >
418
422
< div className = "flexbox dc__content-center" >
419
423
< TriggerDetailsStatusIcon status = { status ?. toLowerCase ( ) } />
420
424
</ div >
421
- < div className = "trigger-details__summary flexbox-col flex-grow-1" >
425
+ < div className = "trigger-details__summary flexbox-col flex-grow-1 lh-20 " >
422
426
< StartDetails
423
427
startedOn = { startedOn }
424
428
triggeredBy = { triggeredBy }
0 commit comments