Skip to content

Commit 6d0e525

Browse files
committed
feat: add pulsating status svg in trigger details
1 parent 6b1ff6a commit 6d0e525

File tree

2 files changed

+40
-14
lines changed

2 files changed

+40
-14
lines changed

src/Assets/Icon/ic-pulsate-status.svg

Lines changed: 21 additions & 0 deletions
Loading

src/Shared/Components/CICDHistory/TriggerOutput.tsx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ import React, { useEffect, useMemo, useState } from 'react'
1919
import { Link, NavLink } from 'react-router-dom'
2020
import moment from 'moment'
2121
import { toast } from 'react-toastify'
22-
import { ReactComponent as ICLines } from '@Icons/ic-lines.svg'
2322
import { ShowMoreText } from '@Shared/Components/ShowMoreText'
2423
import { getHandleOpenURL } from '@Shared/Helpers'
2524
import { ImageChipCell } from '@Shared/Components/ImageChipCell'
2625
import { CommitChipCell } from '@Shared/Components/CommitChipCell'
26+
import { ReactComponent as ICLines } from '@Icons/ic-lines.svg'
27+
import { ReactComponent as ICPulsateStatus } from '@Icons/ic-pulsate-status.svg'
2728
import {
2829
ConfirmationDialog,
2930
DATE_TIME_FORMATS,
@@ -67,7 +68,7 @@ import DeploymentDetailSteps from './DeploymentDetailSteps'
6768
import { DeploymentHistoryDetailedView, DeploymentHistoryConfigList } from './DeploymentHistoryDiff'
6869
import { GitChanges, Scroller } from './History.components'
6970
import Artifacts from './Artifacts'
70-
import { statusColor as colorMap, EMPTY_STATE_STATUS } from '../../constants'
71+
import { statusColor as colorMap, EMPTY_STATE_STATUS, PULSATING_STATUS_MAP } from '../../constants'
7172
import './cicdHistory.scss'
7273

7374
const Finished = React.memo(
@@ -377,18 +378,22 @@ const TriggerDetailsStatusIcon = React.memo(
377378
<div className="dc__border-left--n7 h-100" />
378379
</div>
379380

380-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
381-
<circle
382-
cx="10"
383-
cy="10"
384-
r="5"
385-
fill={colorMap[status]}
386-
stroke={colorMap[status]}
387-
strokeOpacity="0.3"
388-
strokeWidth="10"
389-
/>
390-
<path d="M10 0L10 5" stroke="var(--N700)" />
391-
</svg>
381+
{PULSATING_STATUS_MAP[status] ? (
382+
<ICPulsateStatus />
383+
) : (
384+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
385+
<circle
386+
cx="10"
387+
cy="10"
388+
r="5"
389+
fill={colorMap[status]}
390+
stroke={colorMap[status]}
391+
strokeOpacity="0.3"
392+
strokeWidth="10"
393+
/>
394+
<path d="M10 0L10 5" stroke="var(--N700)" />
395+
</svg>
396+
)}
392397
</div>
393398
),
394399
)

0 commit comments

Comments
 (0)