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

Author: LaMi <[email protected]>
Date:   Sun Nov  8 17:37:12 2009 +0100

Maps and automaps are now also stronger against core communication problems

---

 share/frontend/nagvis-js/js/frontend.js |   40 ++++++++++++++++++++++++++----
 1 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/share/frontend/nagvis-js/js/frontend.js 
b/share/frontend/nagvis-js/js/frontend.js
index 0029ee0..2d02059 100644
--- a/share/frontend/nagvis-js/js/frontend.js
+++ b/share/frontend/nagvis-js/js/frontend.js
@@ -1906,7 +1906,17 @@ function workerUpdate(iCount, sType, sIdentifier) {
                                eventlog("worker", "error", "Problem while 
reparsing the map after new map configuration");
                        }
                }
-
+               
+               // I don't think empty maps make any sense. So when no objects 
are present: 
+               // Try to fetch them continously
+               if(aMapObjects.length === 0) {
+                       eventlog("worker", "info", "Map is empty. Strange. 
Re-fetching objects");
+                       
+                       if(parseMap(oCurrentFileAges[oPageProperties.map_name], 
oPageProperties.map_name) === false) {
+                               eventlog("worker", "error", "Problem while 
reparsing the map after new map configuration");
+                       }
+               }
+               
                oCurrentFileAges = null;
                
                /*
@@ -2007,7 +2017,25 @@ function workerUpdate(iCount, sType, sIdentifier) {
                                eventlog("worker", "error", "Problem while 
reparsing the automap after new configuration");
                        }
                }
-
+               
+               // I don't think empty maps make any sense. So when no objects 
are present: 
+               // Try to fetch them continously
+               if(aMapObjects.length === 0) {
+                       eventlog("worker", "info", "Automap is empty. Strange. 
Re-fetching objects");
+                       
+                       // Render new background image and dot file
+                       automapParse(oPageProperties.map_name);
+                       
+                       // Update background image for automap
+                       
setMapBackgroundImage(oPageProperties.background_image+iNow);
+                       
+                       // Reparse the automap on changed map configuration
+                       eventlog("worker", "info", "Reparsing the map.");
+                       
if(parseAutomap(oCurrentFileAges[oPageProperties.map_name], 
oPageProperties.map_name) === false) {
+                               eventlog("worker", "error", "Problem while 
reparsing the automap");
+                       }
+               }
+               
                oCurrentFileAges = null;
                
                /*
@@ -2094,10 +2122,6 @@ function workerUpdate(iCount, sType, sIdentifier) {
                
                //FIXME: Map configuration(s) changed?
                
-               /*
-                * Now proceed with real actions when everything is OK
-                */
-               
                // When no automaps/maps present: Try to fetch them continously
                if(aMapObjects.length === 0) {
                        eventlog("worker", "debug", "No automaps/maps found, 
reparsing...");
@@ -2121,6 +2145,10 @@ function workerUpdate(iCount, sType, sIdentifier) {
                        parseContextMenus(aMapObjects);
                }
                
+               /*
+                * Now proceed with real actions when everything is OK
+                */
+               
                // Get objects which need an update
                var arrObj = getObjectsToUpdate(aMapObjects);
                


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to