Google Map (turn off clickable links)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rbarnhart
Posts: 3
Joined: Tue Oct 03, 2017 1:36 pm

Google Map (turn off clickable links)

Post by rbarnhart »

I set up google map as a popout link, is there a way to keep it simple by turning off the links to host detail and the link for changing the :"set map defaults".

The idea is to provide a basic up down outage map for customers, but do not want them to be able to link down into stuff or change the layout...

Basically only want them to be able to zoom in and out that is it....to see if site is up or down on google earth,,,, I did try guest with auto login and read only but one can click down pretty far into the software....

Thanks,.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Google Map (turn off clickable links)

Post by dwhitfield »

Please go to http://YOURSERVER/nagiosxi/admin/components.php and see what version of the Google Maps component you are running. If it's not 1.5.0, please use the "Check for Updates" button at the top, and then upgrade that component. Feel free to update others too.

Also, for clarity, you mention Google Map in the subject and then Google Earth. I am obviously assuming above that the mention of Google Earth is a typo (and I feel pretty secure in that assumption since I'm not aware of any Google Earth integration), but I just want to be sure before moving forward.

Lastly, can you post a screenshot of the pop up you are talking about? When I click on Google Maps there is no pop up, so we're probably in different places.
rbarnhart
Posts: 3
Joined: Tue Oct 03, 2017 1:36 pm

Re: Google Map (turn off clickable links)

Post by rbarnhart »

Sorry Not google earth (google maps) and plugin is up to date, here is the screen shot,i circled in red items i would like to be able to remove I just would like to know if it is possible to remove
the clickable links and access to the Host Status details.... Basically would like the option to just show good status and bad status only with ability to zoom it, no extended information on the pop-out...

thanks,
Attachments
nagios ps.png
kyang

Re: Google Map (turn off clickable links)

Post by kyang »

Since this is a component and there are no options to hide the links, it's most likely something that would require editing the PHP code for that google map component.
rbarnhart
Posts: 3
Joined: Tue Oct 03, 2017 1:36 pm

Re: Google Map (turn off clickable links)

Post by rbarnhart »

I'm not really a programmer, but is editing the PHP code something that can be scripted or implemented with a procedure?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Google Map (turn off clickable links)

Post by mcapra »

Lines 111-112 of googlemap/buildmarkers.inc.php:

Code: Select all

111                       "<p><a href=\"../xicore/status.php?show=hostdetail&host={$hostdata['host_name']}\">" .
112                       "{$hostdata['host_name']} Details</a></p>" .
Should be all you'd need to remove. Though that wouldn't persist through updates to the Google Maps component; The changes would be overwritten when the Google Maps component is updated. The custom includes component would allow you to write some Javascript that could permanently remove those links (and be persistent through updates), but it'd be more code than the simple 2-line change mentioned above.
Former Nagios employee
https://www.mcapra.com/
kyang

Re: Google Map (turn off clickable links)

Post by kyang »

Thanks @mcapra!
Beat me to it, but yes remove those lines and update as he suggested.
Note: I also removed line 131 and 132 in that file.

Code: Select all

131                        "<p><a href=\"../xicore/status.php?show=hostdetail&host={$hostdata['host_name']}\">" .
132                        "{$hostdata['host_name']} Details</a></p>" .
Here's my example of when I removed those lines in the buildmarkers PHP file.
2.PNG
Locked