Page 1 of 1

Google Map (turn off clickable links)

Posted: Tue Oct 03, 2017 1:47 pm
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,.

Re: Google Map (turn off clickable links)

Posted: Tue Oct 03, 2017 4:55 pm
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.

Re: Google Map (turn off clickable links)

Posted: Wed Oct 04, 2017 8:13 am
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,

Re: Google Map (turn off clickable links)

Posted: Wed Oct 04, 2017 10:44 am
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.

Re: Google Map (turn off clickable links)

Posted: Wed Oct 04, 2017 10:46 am
by rbarnhart
I'm not really a programmer, but is editing the PHP code something that can be scripted or implemented with a procedure?

Re: Google Map (turn off clickable links)

Posted: Wed Oct 04, 2017 11:12 am
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.

Re: Google Map (turn off clickable links)

Posted: Wed Oct 04, 2017 11:20 am
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