Author:   Lars Michelsen <[email protected]>
Date:     Wed Aug 24 23:01:34 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Wed Aug 24 23:01:34 2011 +0200

Some small cleanups

---

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

diff --git a/share/frontend/nagvis-js/js/ajax.js 
b/share/frontend/nagvis-js/js/ajax.js
index 8352888..9546a44 100644
--- a/share/frontend/nagvis-js/js/ajax.js
+++ b/share/frontend/nagvis-js/js/ajax.js
@@ -114,15 +114,22 @@ function ajaxError(e) {
     eventlog("ajax", "critical", "Problem while ajax transaction");
     eventlog("ajax", "debug", e.toString());
 
-    frontendMessage({'type': 'CRITICAL', 'title': 'Ajax transaction error', 
'message': 'Problem while ajax transaction. Is the NagVis host reachable?'}, 0, 
'ajaxError');
+    frontendMessage({'type': 'CRITICAL',
+                     'title': 'Ajax transaction error',
+                     'message': 'Problem while ajax transaction. Is the NagVis 
host reachable?'},
+                    0, 'ajaxError');
 }
 
 function phpError(text) {
-    frontendMessage({'type': 'CRITICAL', 'title': 'PHP error', 'message': "PHP 
error in ajax request handler:\n" + text});
+    frontendMessage({'type': 'CRITICAL',
+                     'title': 'PHP error',
+                     'message': "PHP error in ajax request handler:\n" + 
text});
 }
 
 function jsonError(text) {
-    frontendMessage({'type': 'CRITICAL', 'title': 'Syntax error', 'message': 
text}, 0, 'jsonError');
+    frontendMessage({'type': 'CRITICAL',
+                     'title': 'Syntax error',
+                     'message': text}, 0, 'jsonError');
 }
 
 /**
@@ -146,7 +153,9 @@ function getAsyncRequest(sUrl, bCacheable, callback, 
callbackParams) {
     sUrl = sUrl.replace("+", "%2B");
 
     // use cache if last request is less than 30 seconds (30,000 milliseconds) 
ago
-    if(bCacheable && typeof(ajaxQueryCache[sUrl]) !== 'undefined' && iNow - 
ajaxQueryCache[sUrl].timestamp <= ajaxQueryCacheLifetime) {
+    if(bCacheable
+       && typeof(ajaxQueryCache[sUrl]) !== 'undefined'
+       && iNow - ajaxQueryCache[sUrl].timestamp <= ajaxQueryCacheLifetime) {
         // Prevent using invalid code in cache
         eventlog("ajax", "debug", "Using cached query");
         if(ajaxQueryCache[sUrl].response !== '')
@@ -229,7 +238,9 @@ function getSyncRequest(sUrl, bCacheable, bRetryable) {
     sUrl = sUrl.replace("+", "%2B");
 
     // use cache if last request is less than 30 seconds (30,000 milliseconds) 
ago
-    if(bCacheable && typeof(ajaxQueryCache[sUrl]) !== 'undefined' && iNow - 
ajaxQueryCache[sUrl].timestamp <= ajaxQueryCacheLifetime) {
+    if(bCacheable
+       && typeof(ajaxQueryCache[sUrl]) !== 'undefined'
+       && iNow - ajaxQueryCache[sUrl].timestamp <= ajaxQueryCacheLifetime) {
         eventlog("ajax", "debug", "Using cached query");
         responseText = ajaxQueryCache[sUrl].response;
 


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to