Skip to content

Commit 91f0def

Browse files
authored
Merge pull request #1380 from devtron-labs/feat-async-install-devtron
feat: handled additional deployment states
2 parents c0b851d + 4a0ee13 commit 91f0def

File tree

10 files changed

+41
-4
lines changed

10 files changed

+41
-4
lines changed

src/assets/icons/ic-clock.svg

Lines changed: 1 addition & 1 deletion
Loading

src/components/app/config.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ export const Colors = {
99
export const statusColor = {
1010
suspended: '#ffaa00',
1111
unknown: 'var(--N700)',
12+
queued: 'var(--N700)',
1213
degraded: 'var(--R500)',
1314
healthy: 'var(--G500)',
1415
notdeployed: 'var(--N500)',
1516
missing: 'var(--N700)',
1617
progressing: "var(--orange)",
18+
initiating: "var(--orange)",
1719
starting: "#FF7E5B",
1820
succeeded: '#1dad70',
1921
running: '#FF7E5B',
@@ -28,8 +30,10 @@ export const statusColor = {
2830

2931
export const statusIcon = {
3032
failed:'failed',
33+
queued:'queued',
3134
suspended: 'suspended',
3235
starting: "progressing",
36+
initiating: "progressing",
3337
unknown: 'unknown',
3438
degraded: 'degraded',
3539
healthy: 'healthy',

src/components/app/details/appDetails/DeploymentStatusCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function DeploymentStatusCard({
2828
search: DEPLOYMENT_STATUS_QUERY_PARAM,
2929
})
3030
}
31+
const ProgressingStateList:string[] = [DEPLOYMENT_STATUS.INPROGRESS, DEPLOYMENT_STATUS.STARTING, DEPLOYMENT_STATUS.INITIATING]
3132
const renderDeploymentStatus = () => {
3233
return (
3334
<>
@@ -51,7 +52,7 @@ function DeploymentStatusCard({
5152
<span
5253
data-testid="deployment-status-name"
5354
className={`app-summary__status-name fs-14 mr-8 fw-6 f-${deploymentStatusDetailsBreakdownData?.deploymentStatus?.toLowerCase()} ${
54-
deploymentStatusDetailsBreakdownData?.deploymentStatus === DEPLOYMENT_STATUS.INPROGRESS
55+
ProgressingStateList.includes(deploymentStatusDetailsBreakdownData?.deploymentStatus)
5556
? 'dc__loading-dots'
5657
: ''
5758
}`}

src/components/app/details/appDetails/appDetails.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,8 @@ table.pod__table td:last-child {
759759
color: var(--green);
760760
}
761761

762+
&.f-starting,
763+
&.f-initiating,
762764
&.f-suspended,
763765
&.f-switchedtoactiveservice {
764766
color: var(--orange);

src/components/app/details/cicdHistory/TriggerDetails.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React, { useState } from 'react'
2-
import { showError, Progressing, ConfirmationDialog, not } from '@devtron-labs/devtron-fe-common-lib'
2+
import { showError, Progressing, ConfirmationDialog, not, TippyTheme } from '@devtron-labs/devtron-fe-common-lib'
33
import { createGitCommitUrl, asyncWrap } from '../../../common'
44
import { toast } from 'react-toastify'
5+
import Tippy from '@tippyjs/react'
56
import { useRouteMatch, useLocation, useParams } from 'react-router'
67
import { statusColor as colorMap } from '../../config'
78
import { Moment12HourFormat, ZERO_TIME_STRING } from '../../../../config'
@@ -134,7 +135,18 @@ const WorkerStatus = React.memo(({ message, podStatus, stage }: WorkerStatusType
134135
</div>
135136
)}
136137
</div>
137-
{message && <div className="fs-12 cn-7">{message}</div>}
138+
{message && (
139+
<Tippy
140+
theme={TippyTheme.black}
141+
className="default-tt"
142+
arrow={false}
143+
placement="bottom-start"
144+
animation="shift-toward-subtle"
145+
content={message}
146+
>
147+
<div className="fs-12 cn-7 dc__ellipsis-right__2nd-line">{message}</div>
148+
</Tippy>
149+
)}
138150
</div>
139151
</>
140152
)

src/components/app/details/cicdHistory/types.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,6 @@ export const PROGRESSING_STATUS = {
290290
[TERMINAL_STATUS_MAP.RUNNING]: 'running',
291291
[TERMINAL_STATUS_MAP.PROGRESSING]: 'progressing',
292292
[TERMINAL_STATUS_MAP.STARTING]: 'starting',
293+
[TERMINAL_STATUS_MAP.INITIATING]: 'initiating',
294+
[TERMINAL_STATUS_MAP.QUEUED]: 'queued',
293295
}

src/components/v2/appDetails/sourceInfo/environmentStatus/environmentStatus.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
color: var(--green);
3333
}
3434

35+
.f-starting,
36+
.f-initiating,
3537
.f-suspended,
3638
.f-switchedtoactiveservice {
3739
color: var(--orange);
@@ -64,6 +66,7 @@
6466
color: var(--yellow);
6567
}
6668

69+
.f-queued,
6770
.f-missing,
6871
.f-unknown {
6972
color: var(--N700);

src/config/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,8 @@ export const TERMINAL_STATUS_MAP = {
609609
RUNNING: 'running',
610610
PROGRESSING: 'progressing',
611611
STARTING: 'starting',
612+
INITIATING: 'initiating',
613+
QUEUED: 'queued',
612614
FAILED: 'failed',
613615
ERROR: 'error',
614616
CANCELLED: 'cancelled',
@@ -726,7 +728,10 @@ export const DEPLOYMENT_STATUS = {
726728
UNABLE_TO_FETCH: 'unable_to_fetch',
727729
INPROGRESS: 'inprogress',
728730
PROGRESSING: 'progressing',
731+
STARTING: 'starting',
732+
INITIATING: 'initiating',
729733
SUPERSEDED: 'superseded',
734+
QUEUED: 'queued',
730735
UNKNOWN: 'unknown',
731736
}
732737

src/css/base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,8 @@ button.anchor {
699699
color: var(--G500);
700700
}
701701

702+
&.f-starting,
703+
&.f-initiating,
702704
&.f-suspended,
703705
&.f-switchedtoactiveservice,
704706
&.f-containercreating,
@@ -1113,6 +1115,7 @@ button.anchor {
11131115
width: 24px;
11141116
z-index: 2;
11151117

1118+
&.queued,
11161119
&.pending {
11171120
background: url('../assets/icons/ic-clock.svg'), $background;
11181121
background-size: contain, contain;
@@ -1174,6 +1177,7 @@ button.anchor {
11741177
background-size: contain, contain;
11751178
}
11761179

1180+
&.initiating,
11771181
&.progressing,
11781182
&.running,
11791183
&.request_accepted,

src/css/icons.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
background-image: url('../assets/icons/appstatus/notdeployed.svg');
4242
}
4343

44+
.queued {
45+
background-image: url('../assets/icons/ic-clock.svg');
46+
}
47+
4448
.suspended {
4549
background-image: url('../assets/icons/appstatus/suspended.svg');
4650
}

0 commit comments

Comments
 (0)