Add waiting status to status page

If a job is "waiting", add a tooltip so users can find out upon
what the job is waiting.

Change-Id: I94ec3bb6bfc8c0cb828f9dab8999e8df5a60aea9
This commit is contained in:
James E. Blair 2021-04-27 16:22:45 -07:00
parent 5f9f597adf
commit 94bf1d306e
1 changed files with 11 additions and 5 deletions

View File

@ -215,8 +215,8 @@ class ChangePanel extends React.Component {
)
}
renderJobStatusLabel (result) {
let className
renderJobStatusLabel (job, result) {
let className, title
switch (result) {
case 'success':
className = 'label-success'
@ -234,13 +234,19 @@ class ChangePanel extends React.Component {
case 'skipped':
className = 'label-info'
break
// 'in progress' 'queued' 'lost' 'aborted' 'waiting' ...
case 'waiting':
className = 'label-default'
if (job.waiting_status !== null) {
title = 'Waiting on ' + job.waiting_status
}
break
// 'in progress' 'queued' 'lost' 'aborted' ...
default:
className = 'label-default'
}
return (
<span className={'zuul-job-result label ' + className}>{result}</span>
<span className={'zuul-job-result label ' + className} title={title}>{result}</span>
)
}
@ -272,7 +278,7 @@ class ChangePanel extends React.Component {
resultBar = this.renderJobProgressBar(
job.elapsed_time, job.remaining_time)
} else {
resultBar = this.renderJobStatusLabel(result)
resultBar = this.renderJobStatusLabel(job, result)
}
return (