]> mj.ucw.cz Git - bex.git/commitdiff
bex prun: Let NOPING entries be displayed in a different color from FAILED
authorMartin Mares <mj@ucw.cz>
Sun, 6 Jan 2013 11:20:09 +0000 (12:20 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 6 Jan 2013 11:20:09 +0000 (12:20 +0100)
lib/bin/bex-prun

index 63be4798149baf8ba58fa7cfb4c2975c98e93034..685c8be0b06d4e065c168fa623e785f2deeb44cf 100755 (executable)
@@ -151,6 +151,7 @@ sub new($) {
        init_pair(2, COLOR_YELLOW, COLOR_RED);
        init_pair(3, COLOR_YELLOW, COLOR_BLACK);
        init_pair(4, COLOR_RED, COLOR_BLACK);
+       init_pair(5, COLOR_BLUE, COLOR_BLACK);
 
        $nrows = $C->getmaxy - 2;
        if ($BEX::Config::max_parallel_jobs > $nrows) {
@@ -293,7 +294,7 @@ sub redraw_slot($) {
        $C->addstr(sprintf("%3dD %3dW", $jcnt->{'done'}, $jcnt->{'ready'}));
        if ($stat eq 'DONE') {
                if (defined $host_last_fail_stat{$mach}) {
-                       $C->bkgdset(COLOR_PAIR(4));
+                       $C->bkgdset(($host_last_fail_stat{$mach} eq 'NOPING') ? COLOR_PAIR(5) : COLOR_PAIR(4));
                        $C->addstr(sprintf("  %-8s %s", $host_last_fail_stat{$mach}, $queue->job_name($host_last_fail_job{$mach})));
                }
        } else {