Changing colours of headings

Information and discussions relating to the Nagios Mobile addon.

Changing colours of headings

Postby MARTINBENZE » Thu Aug 25, 2016 6:56 am

I have found the code to change the colours in the header.inc.php file. I have separated the code a bit so .critical, .down, .hostproblem, .unknown and .unreachable have their own lines of code and colours can be set individually. Although when choosing a colour for .critical it also sets it for the "Unknown" + "Problems" service box. Setting the colour for .down also sets it for "Problems" host box.

So it appears that .hostproblem, .unknown + .unreachable do nothing.

I would like to be able to change the Up and Ok boxes to green. There is no code for this and if i try .UP + .OK it does nothing.

Has anyone managed to do this?


Code for header.inc.php file below:

Code: Select all
if($WEBKIT) {
   echo '
   
   .critical { background: -webkit-gradient(linear, 0% 20%, 0% 100%, from(transparent), to(#c00)) !important;}

   .down { background: -webkit-gradient(linear, 0% 20%, 0% 100%, from(transparent), to(#f00)) !important;}

   .warning { background: -webkit-gradient(linear, 0% 20%, 0% 100%, from(transparent), to(#ff0)) !important;}

.hostproblem { background: -webkit-gradient(linear, 0% 20%, 0% 100%, from(transparent), to(#F00)) !important;}

   .unreachable { background: -webkit-gradient(linear, 0% 20%, 0% 100%, from(transparent), to(#FFF)) !important;}

   .unknown { background: -webkit-gradient(linear, 0% 20%, 0% 100%, from(transparent), to(#FFF)) !important;}

   .Up { background: -webkit-gradient(linear, 0% 20%, 0% 100%, from(transparent), to(#0f0)) !important;}

   .Ok { background: -webkit-gradient(linear, 0% 20%, 0% 100%, from(transparent), to(#0f0)) !important;}

   ';


MARTINBENZE
 
Posts: 1
Joined: Thu Nov 05, 2015 9:27 am

Re: Changing colours of headings

Postby tmcdonald » Thu Aug 25, 2016 3:56 pm

You're welcome to poke around in the code, but if this has not been made configurable in the web interface then I am doubtful that we have this documented anywhere.
Former Nagios employee
tmcdonald
 
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am


Return to Nagios Mobile

Who is online

Users browsing this forum: No registered users and 1 guest