File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
src/Shared/Components/CICDHistory Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ import {
67
67
PULSATING_STATUS_MAP ,
68
68
TERMINAL_STATUS_COLOR_CLASS_MAP ,
69
69
PROGRESSING_STATUS ,
70
+ WORKFLOW_STAGE_STATUS_TO_TEXT_MAP ,
70
71
} from './constants'
71
72
import { GitTriggers } from '../../types'
72
73
import LogsRenderer from './LogsRenderer'
@@ -140,7 +141,6 @@ const WorkerStatus = React.memo(
140
141
return (
141
142
< div className = "display-grid trigger-details__grid py-4" >
142
143
< div className = "flexbox dc__content-center" >
143
- { /* TODO: Ask if not started needs to be catered */ }
144
144
{ FAILED_WORKFLOW_STAGE_STATUS_MAP [ podStatus ] ? (
145
145
< ICWarningY5 className = "icon-dim-20 dc__no-shrink" />
146
146
) : (
@@ -153,7 +153,11 @@ const WorkerStatus = React.memo(
153
153
< div className = "flexbox cn-9 fs-13 fw-4 lh-20" >
154
154
< span > { stage === DeploymentStageType . DEPLOY && ! podStatus ? 'Message' : 'Worker' } </ span >
155
155
156
- { podStatus && < span > { podStatus . toLowerCase ( ) } </ span > }
156
+ { podStatus && (
157
+ < span >
158
+ { WORKFLOW_STAGE_STATUS_TO_TEXT_MAP [ podStatus ] || podStatus . toLowerCase ( ) }
159
+ </ span >
160
+ ) }
157
161
</ div >
158
162
159
163
{ stage !== DeploymentStageType . DEPLOY && getViewWorker ( ) }
Original file line number Diff line number Diff line change @@ -116,6 +116,16 @@ export const PULSATING_STATUS_MAP: { [key in keyof typeof statusColor | Workflow
116
116
[ WorkflowStageStatusType . RUNNING . toLowerCase ( ) ] : true ,
117
117
}
118
118
119
+ export const WORKFLOW_STAGE_STATUS_TO_TEXT_MAP : Record < WorkflowStageStatusType , string > = {
120
+ [ WorkflowStageStatusType . NOT_STARTED ] : 'Waiting to start' ,
121
+ [ WorkflowStageStatusType . RUNNING ] : 'Running' ,
122
+ [ WorkflowStageStatusType . SUCCEEDED ] : 'Succeeded' ,
123
+ [ WorkflowStageStatusType . FAILED ] : 'Failed' ,
124
+ [ WorkflowStageStatusType . ABORTED ] : 'Aborted' ,
125
+ [ WorkflowStageStatusType . TIMEOUT ] : 'Timed out' ,
126
+ [ WorkflowStageStatusType . UNKNOWN ] : 'Unknown' ,
127
+ }
128
+
119
129
export const TERMINAL_STATUS_COLOR_CLASS_MAP = {
120
130
[ TERMINAL_STATUS_MAP . SUCCEEDED ] : 'cg-5' ,
121
131
[ TERMINAL_STATUS_MAP . HEALTHY ] : 'cg-5' ,
You can’t perform that action at this time.
0 commit comments