]> arthur.barton.de Git - netdata.git/commitdiff
do not use (by default) the registry for custom dashboards
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 6 Sep 2016 23:37:35 +0000 (02:37 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 6 Sep 2016 23:37:35 +0000 (02:37 +0300)
src/registry.c
web/dashboard.html
web/dashboard.js
web/demo.html
web/demo2.html
web/demosites.html
web/index.html
web/registry.html
web/tv.html

index 0ac5210981186e31575450f977155df3a001c079..3c0a5ed77b4283a066959f38a6308a746c63251a 100644 (file)
 //    - [DONE] limit the size of PERSON_URL names
 //    - limit the number of requests that add data to the registry,
 //      per client IP per hour
-
-
+//
+// 3. lower memory requirements
+// 
+//    - embed avl structures directly into registry objects, instead of DICTIONARY
+//    - store GUIDs in memory as UUID instead of char *
+//      (this will also remove the index hash, since UUIDs can be compared directly)
+//    - do not track persons using the demo machines only
+//      (i.e. start tracking them only when they access a non-demo machine)
+//    - [DONE] do not track custom dashboards by default
 
 #define REGISTRY_URL_FLAGS_DEFAULT 0x00
 #define REGISTRY_URL_FLAGS_EXPIRED 0x01
index 25f71851094e651634ab7183814908077b0fb0b1..f36707cafed70537828471e610a41a14b8c5ea16 100644 (file)
@@ -655,4 +655,4 @@ So, to avoid flashing the charts, we destroy and re-create the charts on each up
     <!-- <script> netdataServer = "http://box:19999"; </script> -->
 
     <!-- load the dashboard manager - it will do the rest -->
-    <script type="text/javascript" src="dashboard.js?v45"></script>
+    <script type="text/javascript" src="dashboard.js?v46"></script>
index 22a06d31008be86e63f4f7ea7c58758625706cca..485e5f3e46d657fefa1f6ce030934ff210f13ab9 100644 (file)
@@ -12,7 +12,7 @@
 // var netdataNoBootstrap = true;       // do not load bootstrap
 // var netdataDontStart = true;         // do not start the thread to process the charts
 // var netdataErrorCallback = null;     // Callback function that will be invoked upon error
-// var netdataNoRegistry = true;        // Don't update the registry for this access
+// var netdataRegistry = true;          // Update the registry (default disabled)
 // var netdataRegistryCallback = null;  // Callback function that will be invoked with one param,
 //                                         the URLs from the registry
 // var netdataShowHelp = false;         // enable/disable help (default enabled)
     else
         NETDATA.themes.current = NETDATA.themes.white;
 
-    if(typeof netdataShowHelp === 'undefined')
-        netdataShowHelp = true;
-
-    if(typeof netdataShowAlarms === 'undefined')
-        netdataShowAlarms = false;
-
     NETDATA.colors = NETDATA.themes.current.colors;
 
     // these are the colors Google Charts are using
     //                         (blue)     (red)      (orange)   (green)    (pink)     (brown)    (purple)   (yellow)   (gray)
     //NETDATA.colors        = [ '#5DA5DA', '#F15854', '#FAA43A', '#60BD68', '#F17CB0', '#B2912F', '#B276B2', '#DECF3F', '#4D4D4D' ];
 
+    if(typeof netdataShowHelp === 'undefined')
+        netdataShowHelp = true;
+
+    if(typeof netdataShowAlarms === 'undefined')
+        netdataShowAlarms = false;
+
+    if(typeof netdataRegistry === 'undefined') {
+        // backward compatibility
+        if(typeof netdataNoRegistry !== 'undefined' && netdataNoRegistry === false)
+            netdataRegistry = true;
+        else
+            netdataRegistry = false;
+    }
+    if(netdataRegistry === false && typeof netdataRegistryCallback === 'function')
+        netdataRegistry = true;
+
     // ----------------------------------------------------------------------------------------------------------------
     // the defaults for all charts
 
         },
 
         init: function() {
-            if(typeof netdataNoRegistry !== 'undefined' && netdataNoRegistry)
-                return;
+            if(netdataRegistry !== true) return;
 
             NETDATA.registry.hello(NETDATA.serverDefault, function(data) {
                 if(data) {
index 7642cd5a73eea43f143a89f787aa97cf22d62d61..ca55b0ab738f2ec905184aa06fc0b68ba5dd0060 100644 (file)
@@ -20,7 +20,7 @@
     <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
     <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
     
-    <script type="text/javascript" src="dashboard.js?v45"></script>
+    <script type="text/javascript" src="dashboard.js?v46"></script>
 </head>
 <body>
 
index ccf8c0600dd1ca86aaa9ec21ae7c158f25894032..6c20eb5fd6453991aaf9dd5bf6b509d54c60ed30 100644 (file)
@@ -21,7 +21,7 @@
     <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
 
     <script>var netdataTheme = 'slate';</script>
-    <script type="text/javascript" src="http://my-netdata.io/dashboard.js?v45"></script>
+    <script type="text/javascript" src="http://my-netdata.io/dashboard.js?v46"></script>
 </head>
 <body>
 
index 1598ac96618a9abe5091c271c6f9ee0bc8010f9b..fa9c22af487182d045a0e2ebed9c020b40bb5e7f 100644 (file)
@@ -51,7 +51,7 @@
         and that you have chown it to be owned by netdata:netdata
     -->
     <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
-    <script type="text/javascript" src="dashboard.js?v45"></script>
+    <script type="text/javascript" src="dashboard.js?v46"></script>
 
     <script>
     // --- OPTIONS FOR THE CHARTS --
index d37b2926151aad63f59b2fe4a86a4f2dd859ece0..055e8dd47ffb1b94b8ee7f2387b1b560da86be39 100644 (file)
     <script type="text/javascript">
         // enable alarms checking and notifications
         var netdataShowAlarms = true;
+
+        // enable registry updates
+        var netdataRegistry = true;
         
         // --------------------------------------------------------------------
         // urlOptions
     </script>
 
     <!-- load the dashboard manager - it will do the rest -->
-    <script type="text/javascript" src="dashboard.js?v45"></script>
+    <script type="text/javascript" src="dashboard.js?v46"></script>
 </head>
 <body data-spy="scroll" data-target="#sidebar">
     <div id="loadOverlay" class="loadOverlay" style="background-color: #888; color: #888;">
index 6c7589ec7aed380d8a2f8ff095b84504990298bb..d09ad71a0b520ea837bc9dd1ed422466d2ae361a 100644 (file)
         and that you have chown it to be owned by netdata:netdata
     -->
     <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
-    <script type="text/javascript" src="dashboard.js?v45"></script>
+    <script type="text/javascript" src="dashboard.js?v46"></script>
 
     <script>
     // Set options for TV operation
index 7bd2900e1dcb4beaee762fa526fe5b32baa8fe42..224ed29a66eafc725e1d3b1249be592f82daf9ea 100644 (file)
@@ -49,7 +49,7 @@
         and that you have chown it to be owned by netdata:netdata
     -->
     <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
-    <script type="text/javascript" src="dashboard.js?v45"></script>
+    <script type="text/javascript" src="dashboard.js?v46"></script>
 
     <script>
     // Set options for TV operation