diff options
author | Andrii Ostapenko <aostapenko@stackalytics.io> | 2021-08-08 15:52:04 -0600 |
---|---|---|
committer | Andrii Ostapenko <anost1986@gmail.com> | 2021-09-20 19:10:54 +0000 |
commit | 8e3abe62a4a050116afae747961a6575bfc48cb6 (patch) | |
tree | ed89ca1ac8991a213fd6d89524228f9e55951d82 /web/src/containers/status/ChangePanel.jsx | |
parent | d6c738abdbd93e1296a7229e3293d4c9c03d450d (diff) | |
download | zuul-8e3abe62a4a050116afae747961a6575bfc48cb6.tar.gz |
Treat 'waiting' jobs same as 'queued' in buildset progress bar
Currently 'waiting' jobs are marked the same color as 'running' in
buildset progress bar that is counterintuitive.
Also refactors function for better readability.
Change-Id: Id580b843f9c9fd06468bcdc31c9a0677a132ccc2
Signed-off-by: Andrii Ostapenko <aostapenko@stackalytics.io>
Diffstat (limited to 'web/src/containers/status/ChangePanel.jsx')
-rw-r--r-- | web/src/containers/status/ChangePanel.jsx | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/web/src/containers/status/ChangePanel.jsx b/web/src/containers/status/ChangePanel.jsx index 64d9df9e9..967310aca 100644 --- a/web/src/containers/status/ChangePanel.jsx +++ b/web/src/containers/status/ChangePanel.jsx @@ -125,36 +125,35 @@ class ChangePanel extends React.Component { <div className='progress zuul-change-total-result'> {change.jobs.map((job, idx) => { let result = this.jobStrResult(job) - if (result !== 'queued') { - let className = '' - switch (result) { - case 'success': - className = ' progress-bar-success' - break - case 'lost': - case 'failure': - className = ' progress-bar-danger' - break - case 'unstable': - case 'retry_limit': - case 'post_failure': - case 'node_failure': - className = ' progress-bar-warning' - break - case 'paused': - case 'skipped': - className = ' progress-bar-info' - break - default: - break - } - return <div className={'progress-bar' + className} - key={idx} - title={job.name} - style={{width: jobPercent + '%'}}/> - } else { + if (['queued', 'waiting'].includes(result)) { return '' } + let className = '' + switch (result) { + case 'success': + className = ' progress-bar-success' + break + case 'lost': + case 'failure': + className = ' progress-bar-danger' + break + case 'unstable': + case 'retry_limit': + case 'post_failure': + case 'node_failure': + className = ' progress-bar-warning' + break + case 'paused': + case 'skipped': + className = ' progress-bar-info' + break + default: + break + } + return <div className={'progress-bar' + className} + key={idx} + title={job.name} + style={{width: jobPercent + '%'}}/> })} </div> ) |