Module: nagvis
Branch: master
Commit: b9206ea0222089971d1c686bb18edcb6da19a995
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=b9206ea0222089971d1c686bb18edcb6da19a995

Author: LaMi <[email protected]>
Date:   Fri Mar  5 13:56:03 2010 +0100

Fixed automap coord parsing when using non default cgi-bin url

---

 share/server/core/classes/NagVisAutoMap.php |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/share/server/core/classes/NagVisAutoMap.php 
b/share/server/core/classes/NagVisAutoMap.php
index d7bca85..2a55ea4 100644
--- a/share/server/core/classes/NagVisAutoMap.php
+++ b/share/server/core/classes/NagVisAutoMap.php
@@ -387,6 +387,7 @@ class NagVisAutoMap extends GlobalMap {
                 *
                 * In some cases there may be an ID:
                 * <area shape="rect" id="node1" 
href="/nagios/cgi-bin/status.cgi?host=test_router_0" target="_self" 
title="host_0" alt="" coords="509,378,525,393"/>
+                * <area shape="rect" id="node1" 
href="/icinga/cgi-bin/status.cgi?host=Icinga" target="_self" title="host_0" 
alt="" coords="698,24,713,40"/>
                 *
                 * Coord description:
                 * For a rectangle, you map the top left and bottom right 
corners. All 
@@ -401,7 +402,7 @@ class NagVisAutoMap extends GlobalMap {
                foreach($aMapCode AS $sLine) {
                        // Extract the area objects
                        // Only parsing rect/polys at the moment
-                       
if(preg_match('/^<area\sshape="(rect|poly)"\s(id="[^"]+"\s)?href="\/nagios\/cgi-bin\/status\.cgi\?host=([^"]+)"\starget="_self"\stitle="[^"]+"\salt=""\scoords="([^"]+)"\/>$/i',
 $sLine, $aMatches)) {
+                       
if(preg_match('/^<area\sshape="(rect|poly)"\s(id="[^"]+"\s)?href=".+\/status\.cgi\?host=([^"]+)"\starget="_self"\stitle="[^"]+"\salt=""\scoords="([^"]+)"\/>$/i',
 $sLine, $aMatches)) {
                                if(isset($aMatches[1]) && isset($aMatches[2]) 
&& isset($aMatches[3]) && isset($aMatches[4])) {
                                        $type = $aMatches[1];
                                        $name1 = trim($aMatches[3]);


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to