Changeset 286


Ignore:
Timestamp:
Jul 16, 2018, 7:36:34 PM (6 years ago)
Author:
g7moreau
Message:
  • Try to push force check with a red arrow
Location:
trunk/nagios-velvice
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/nagios-velvice/velvice.cgi

    r285 r286  
    1515use strict;
    1616use warnings;
    17 use version; our $VERSION = version->declare('0.8.4');
     17use version; our $VERSION = version->declare('0.8.5');
    1818
    1919use CGI;
     
    179179      my $color = $status eq 'CRITICAL' ? '#F88888' : '#FFFF00';
    180180      $color = alertcolor($color, $downtime);
    181       $htmlpage .= " <tr style='background:$color;'>\n";
     181      my $stylecolor = "style='background:$color;'";
     182      $htmlpage .= " <tr>\n";
    182183      if ($hostname ne $current_host) {
    183184         $current_host = $hostname;
    184          $htmlpage .= "  <td rowspan='$hostcount{$hostname}' style='vertical-align:middle;'>"
     185         $htmlpage .= "  <td rowspan='$hostcount{$hostname}' $stylecolor>"
    185186            . "<a href=\"$cgi_script_name?check=" . uri_encode($hostname) . '">&#8623;</a></td>' . "\n";
    186          $htmlpage .= "  <td class='hoop' rowspan='$hostcount{$hostname}' style='vertical-align:middle;'>"
     187         $htmlpage .= "  <td class='hoop' rowspan='$hostcount{$hostname}' $stylecolor>"
    187188            . "<a href=\"$config->{'nagios-server'}{'status-cgi'}?host=" . uri_encode($hostname) . "\">$hostname</a></td>\n";
    188189         }
     
    194195         $bold++ if $service =~ m/$act_regex/ and $config->{'remote-action'}{$act_name}{'style'} eq 'bold';
    195196         }
    196       $htmlpage .= $bold ? '  <td class="hoop bold">' : '  <td class="hoop">';
     197      $htmlpage .= $bold ? "  <td class='hoop bold' $stylecolor>" : "  <td class='hoop' $stylecolor>";
    197198      $htmlpage .= "$service</td>\n";
    198199
    199       $htmlpage .= "  <td class='hoop'>$status</td>\n";
    200       $htmlpage .= "  <td style='max-width:60%;'><small>$output";
     200      $htmlpage .= "  <td class='hoop' $stylecolor>$status</td>\n";
     201      $htmlpage .= "  <td class='comment' $stylecolor>$output</td>\n";
     202      $htmlpage .= "  <td class='days";
    201203
    202204      if (($cgi_check =~ m/all/i)
     
    213215         my $future = $now + 20 + int(rand($interval - 20)); # 5 * 60 = 300
    214216
    215          $htmlpage .= " -- <b>CHECK</b> [$now/" . ($future - $now) . "]";
     217         $htmlpage .= ' checking'; # add class checking
     218         #$htmlpage .= " -- <b>CHECK</b> [$now/" . ($future - $now) . "]";
    216219         printf $nagios_cmd "[%lu] SCHEDULE_FORCED_SVC_CHECK;%s;%s;%lu\n", $now, $hostname, $service, $now;
    217220         # delay future command
     
    236239         }
    237240
    238       $htmlpage .= "</small></td>\n";
    239       $htmlpage .= "  <td style='text-align:right;'>$downtime days</td>\n";
     241      $htmlpage .= "' $stylecolor>$downtime days</td>\n";
    240242      $htmlpage .= " </tr>\n";
    241243      }
  • trunk/nagios-velvice/velvice.css

    r284 r286  
    7676td {
    7777   border:           0px;
     78   vertical-align:   middle;
    7879   }
    7980
     
    8485td.hoop {
    8586   border:           1px solid #777;
     87   }
     88
     89td.comment {
     90   max-width:        60%;
     91   font-size:        small;
     92   }
     93
     94td.days {
     95   text-align:       right;
     96   }
     97
     98td.checking:after {
     99   background-color: red;
     100   color:            white;
     101   content:          "\21B5";
     102   padding:          0ex 0.8ex 0ex 0.8ex;
     103   border-radius:    0ex 0px 0px 2ex;
    86104   }
    87105
Note: See TracChangeset for help on using the changeset viewer.