Skip to content

Commit fccfbb9

Browse files
authored
Merge pull request #134 from grisu48/review
Display reviewed jobs in summary as reviewed
2 parents f6675e5 + b23bfa5 commit fccfbb9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/openqa-revtui/tui.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@ func (tui *TUI) buildJobsScreenByGroup(width int) []string {
373373
}
374374
// Increase status counter
375375
status := job.JobState()
376+
if status == "failed" && tui.Model.reviewed[job.ID] {
377+
status = "reviewed"
378+
}
376379
if c, exists := statC[status]; exists {
377380
statC[status] = c + 1
378381
} else {
@@ -391,6 +394,8 @@ func (tui *TUI) buildJobsScreenByGroup(width int) []string {
391394
line += ANSI_MAGENTA
392395
} else if s == "failed" || s == "parallel_failed" || s == "incomplete" {
393396
line += ANSI_RED
397+
} else if s == "reviewed" {
398+
line += ANSI_MAGENTA
394399
} else if s == "softfailed" {
395400
line += ANSI_YELLOW
396401
} else if s == "uploading" || s == "scheduled" || s == "running" {
@@ -622,6 +627,7 @@ func (tui *TUI) formatJobLine(job gopenqa.Job, width int) string {
622627
if state == "failed" || state == "incomplete" || state == "parallel_failed" {
623628
if reviewed, found := tui.Model.reviewed[job.ID]; found && reviewed {
624629
c2 = ANSI_MAGENTA
630+
state = "reviewed"
625631
}
626632
}
627633

0 commit comments

Comments
 (0)