Author:   Lars Michelsen <[email protected]>
Date:     Sat Jul 23 12:42:28 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Sat Jul 23 12:42:28 2011 +0200

Added workaround for FF4 bug when reloading the page after changed main config 
file

---

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

diff --git a/share/frontend/nagvis-js/js/frontend.js 
b/share/frontend/nagvis-js/js/frontend.js
index 249adf1..dd28d7a 100644
--- a/share/frontend/nagvis-js/js/frontend.js
+++ b/share/frontend/nagvis-js/js/frontend.js
@@ -42,6 +42,7 @@ var bBlockUpdates = false;
 // map config files
 var iNumUnlocked = false;
 var cacheHeaderHeight = null;
+var workerTimeoutID   = null;
 
 /**
  * Checks if a view is in maintenance mode and shows a message if
@@ -1903,6 +1904,9 @@ function workerUpdate(iCount, sType, sIdentifier) {
     if(oCurrentFileAges && checkMainCfgChanged(oCurrentFileAges.mainCfg)) {
         // FIXME: Not handled by ajax frontend, reload the page
         eventlog("worker", "info", "Main configuration file was updated. Need 
to reload the page");
+        // Clear the scheduling timeout to prevent problems with FF4 bugs
+        if(workerTimeoutID)
+            window.clearTimeout(workerTimeoutID);
         window.location.reload(true);
     }
 
@@ -2107,7 +2111,7 @@ function runWorker(iCount, sType, sIdentifier) {
     }
 
     // Sleep until next worker run (1 Second)
-    window.setTimeout(function() { runWorker((iCount+1), sType); }, 1000);
+    workerTimeoutID = window.setTimeout(function() { runWorker((iCount+1), 
sType); }, 1000);
 
     // Pro forma return
     return true;


------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to