Color scheme manipulation and relative URIs ?

This support forum board is for questions relating to Nagios Fusion.
jiec168
Posts: 26
Joined: Thu May 19, 2016 10:55 am

Color scheme manipulation and relative URIs ?

Post by jiec168 »

Hi,

We have encountered two issues during our evaluation of Fusion 4.0.0. Not sure if they won't be issues for the licensed version.

1) color scheme manipulation like Nagios core.
The blue color wordings inside the critical redish fields in the dashboard are barely visible. This is the biggest complaint from our potential users during our demo.
fusion dashboard.PNG
2) we have a use case that we would like to display the dashboards in our big TV screens ( with Intel Compute Sticks ) in HQ office. Our nagios servers are installed in remote data centers. Corporate offices can't access the DCs without vpn token authentication. Currently we use a proxy server in DMZ zone of the data centers to display nagios server dashboards so that our big TV screens have access. But this doesn't work for nagiosfusion dashboards. We have found that they are using absolute URLs instead of relative URIs in the javascript/css sourcing.
fusion login page.PNG
Thanks.
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Color scheme manipulation and relative URIs ?

Post by cdienger »

Can you clarify a little more about the problem with the relative URIs? It's not clear to me how the full URI would break this. Is this a reverse or transparent proxy? I'll need to follow up with dev tomorrow to see if changes like this can easily be made.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jiec168
Posts: 26
Joined: Thu May 19, 2016 10:55 am

Re: Color scheme manipulation and relative URIs ?

Post by jiec168 »

We use the following apache virtualhost config to do the proxy for nagios and fusion. It works for nagios but not for fusion.
fusion proxy setting.PNG
As you see in nagios page, it has relative URIs to source js and css. So no matter where the request is proxied from, it can display the page properly.
nagios page.PNG
Thanks.
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Color scheme manipulation and relative URIs ?

Post by tmcdonald »

I spoke to the developer and he said it should be easy enough to convert to relative URLs, but this would need to be done as a feature request and implemented in a future Fusion release. I created feature request #12481, "Use relative URLs in all links". When/if it is implemented, it will appear in the changelog here: https://assets.nagios.com/downloads/nag ... HANGES.TXT
Former Nagios employee
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: Color scheme manipulation and relative URIs ?

Post by bheden »

As an FYI, Fusion 4.0.1 is available today, and contains this fix. After upgrading to this version of Fusion, you'll need to update your config.inc.php file by adding an element called 'force_relative_path' and setting it to true. Such as:

Code: Select all

vi /usr/local/nagiosfusion/html/config.inc.php
and changing it from

Code: Select all

<?php

load_config();

function load_config() {

    global $cfg;

    $cfg = array(

        'root_dir' => '/usr/local/nagiosfusion',
to

Code: Select all

<?php

load_config();

function load_config() {

    global $cfg;

    $cfg = array(

        'force_relative_path' => true,

        'root_dir' => '/usr/local/nagiosfusion',
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
jiec168
Posts: 26
Joined: Thu May 19, 2016 10:55 am

Re: Color scheme manipulation and relative URIs ?

Post by jiec168 »

Yes. just upgraded to version 4.0.1 and made the recommended config change. It works! The dashboard can now be shown via proxy. Thanks.

BTW, anyone knows how to address my first question on the font color? How can I change the wording font color to black over the critical red background?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Color scheme manipulation and relative URIs ?

Post by npolovenko »

@jiec168, Glad it worked! You could modify the css files inside the /usr/local/nagios/share/stylesheets to change the font color. I will also file a separate feature request, and hopefully, this will be implemented in the next upgrade.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jiec168
Posts: 26
Joined: Thu May 19, 2016 10:55 am

Re: Color scheme manipulation and relative URIs ?

Post by jiec168 »

/usr/local/nagios/share/stylesheets is for nagios core color scheme.

At any rate, I modified /usr/local/nagiosfusion/html/static/css/base.css by changing
from
td.hostdown, td.servicecritical { background-color: #FF795F !important; }
.state-select-service .critical { background-color: #FF795F; }
.fa-critical { color: #FF795F; }
to
td.hostdown, td.servicecritical { background-color: #FFC1B3 !important; }
.state-select-service .critical { background-color: #FFC1B3; }
.fa-critical { color: #FFC1B3; }

But the change to lighter color doesn't work even after clearing browser cache and restarting the apache server.

Thanks.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Color scheme manipulation and relative URIs ?

Post by npolovenko »

@jiec168, That's right, my apologies. Can you modify the following lines in base.css file:

Code: Select all

line 1542
.host_status_summary_dashlet .havehostdown {
    background-color: #FFC1B3 !important;
}

line 1572
 .service_status_summary_dashlet .haveservicecritical {
    background-color: #FF795F !important;
}
Let us know how if that worked for you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jiec168
Posts: 26
Joined: Thu May 19, 2016 10:55 am

Re: Color scheme manipulation and relative URIs ?

Post by jiec168 »

@npolovenko, it works! I finally use #FFB3B3. Thank you.
Locked