Changeset 246


Ignore:
Timestamp:
Jun 25, 2018, 11:06:08 AM (2 years ago)
Author:
g7moreau
Message:
  • Add title support and use css for bold style
File:
1 edited

Legend:

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

    r245 r246  
    118118   display: inline;
    119119   }
     120.bold td {
     121   font-weight: bold;
     122   }
    120123</style>
    121124<body>
     
    183186         $bold++ if $service =~ m/$srv_regex/ and $config->{'service'}{$srv_name}{'style'} eq 'bold';
    184187         }
    185       $htmlpage .= "  <td>";
    186       $htmlpage .= "<b>" if $bold;
    187       $htmlpage .= "$service";
    188       $htmlpage .= "</b>" if $bold;
    189       $htmlpage .= "</td>\n";
     188      $htmlpage .= $bold ? '  <td class="bold">' : '  <td>';
     189      $htmlpage .= "$service</td>\n";
    190190
    191191      $htmlpage .= "  <td>$status</td>\n";
     
    261261         my @action = grep !exists $sshdown{$_}, @{$cmdafter{$srv_name}};
    262262         if (@action) {
    263             $htmlpage .= "<h2>Action: $srv_name</h2>\n";
     263            my $srv_title = $config->{'service'}{$srv_name}{'title'} || $srv_name;
     264            $htmlpage .= "<h2>Action: $srv_title</h2>\n";
    264265            $htmlpage .= "<pre>\n";
    265266            my $remote_action = $config->{'service'}{$srv_name}{'command'};
     
    271272               }
    272273            my $hosts_list = join ' ', @hosts;
    273             $htmlpage .= $remote_action =~ s{\%m}{$hosts_list}r;
     274            $htmlpage .= ' ' . $remote_action =~ s{\%m}{$hosts_list}r;
    274275            $htmlpage .= "</pre>\n";
    275276            }
Note: See TracChangeset for help on using the changeset viewer.