From 776305b75765e4fd68172921c52676e587367ef6 Mon Sep 17 00:00:00 2001 From: "Costa Tsaousis (ktsaou)" Date: Sun, 11 Sep 2016 22:39:42 +0300 Subject: [PATCH] faster linking from registry to server on alarm clicks --- web/dashboard.js | 7 ++++++- web/goto-host-from-alarm.html | 31 +++++++++++++++++-------------- web/index.html | 2 +- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/web/dashboard.js b/web/dashboard.js index 1365ab0f..eb8011d0 100644 --- a/web/dashboard.js +++ b/web/dashboard.js @@ -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. @@ -175,6 +177,9 @@ 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) @@ -3461,7 +3466,7 @@ setTimeout(NETDATA.alarms.init, 1000); // Registry initialization - setTimeout(NETDATA.registry.init, 1500); + setTimeout(NETDATA.registry.init, netdataRegistryAfterMs); }; // ---------------------------------------------------------------------------------------------------------------- diff --git a/web/goto-host-from-alarm.html b/web/goto-host-from-alarm.html index e95d9d18..e993a226 100755 --- a/web/goto-host-from-alarm.html +++ b/web/goto-host-from-alarm.html @@ -13,10 +13,11 @@ - + diff --git a/web/index.html b/web/index.html index a1f4ce49..8b1b3a8c 100644 --- a/web/index.html +++ b/web/index.html @@ -613,7 +613,7 @@ - +
-- 2.39.2