Skip to content

Commit

Permalink
Display reviewed jobs in summary as reviewed
Browse files Browse the repository at this point in the history
Display reviewed jobs in the summary as "reviewed" instead of "failed".
  • Loading branch information
grisu48 committed Dec 20, 2023
1 parent f6675e5 commit b23bfa5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/openqa-revtui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ func (tui *TUI) buildJobsScreenByGroup(width int) []string {
}
// Increase status counter
status := job.JobState()
if status == "failed" && tui.Model.reviewed[job.ID] {
status = "reviewed"
}
if c, exists := statC[status]; exists {
statC[status] = c + 1
} else {
Expand All @@ -391,6 +394,8 @@ func (tui *TUI) buildJobsScreenByGroup(width int) []string {
line += ANSI_MAGENTA
} else if s == "failed" || s == "parallel_failed" || s == "incomplete" {
line += ANSI_RED
} else if s == "reviewed" {
line += ANSI_MAGENTA
} else if s == "softfailed" {
line += ANSI_YELLOW
} else if s == "uploading" || s == "scheduled" || s == "running" {
Expand Down Expand Up @@ -622,6 +627,7 @@ func (tui *TUI) formatJobLine(job gopenqa.Job, width int) string {
if state == "failed" || state == "incomplete" || state == "parallel_failed" {
if reviewed, found := tui.Model.reviewed[job.ID]; found && reviewed {
c2 = ANSI_MAGENTA
state = "reviewed"
}
}

Expand Down

0 comments on commit b23bfa5

Please sign in to comment.