]> arthur.barton.de Git - netdata.git/blobdiff - web/dashboard.js
faster linking from registry to server on alarm clicks
[netdata.git] / web / dashboard.js
index 1365ab0f828a234baa7068cf865d81aeca1c53ec..eb8011d03a0a971a82939ba79195126fba417023 100644 (file)
@@ -18,6 +18,8 @@
 // var netdataShowHelp = false;         // enable/disable help (default enabled)
 // var netdataShowAlarms = true;        // enable/disable alarms checks and notifications (default disabled)
 //
+// var netdataRegistryAfterMs = 1500    // the time to consult to registry on startup
+//
 // You can also set the default netdata server, using the following.
 // When this variable is not set, we assume the page is hosted on your
 // netdata server already.
     if(typeof netdataShowAlarms === 'undefined')
         netdataShowAlarms = false;
 
+    if(typeof netdataRegistryAfterMs !== 'number' || netdataRegistryAfterMs < 0)
+        netdataRegistryAfterMs = 1500;
+
     if(typeof netdataRegistry === 'undefined') {
         // backward compatibility
         if(typeof netdataNoRegistry !== 'undefined' && netdataNoRegistry === false)
         setTimeout(NETDATA.alarms.init, 1000);
 
         // Registry initialization
-        setTimeout(NETDATA.registry.init, 1500);
+        setTimeout(NETDATA.registry.init, netdataRegistryAfterMs);
     };
 
     // ----------------------------------------------------------------------------------------------------------------