summaryrefslogtreecommitdiffstats
path: root/web/registry.html
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2016-11-23 15:49:10 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2016-11-23 15:49:10 +0000
commit87649cf32bd0e14d5a903fb85b01e9f41a253540 (patch)
treebbefda6dac074aeb87529592e8e5064f69cbe024 /web/registry.html
parentImported Upstream version 1.3.0+dfsg (diff)
downloadnetdata-87649cf32bd0e14d5a903fb85b01e9f41a253540.tar.xz
netdata-87649cf32bd0e14d5a903fb85b01e9f41a253540.zip
New upstream version 1.4.0+dfsgupstream/1.4.0+dfsg
Diffstat (limited to 'web/registry.html')
-rw-r--r--web/registry.html275
1 files changed, 137 insertions, 138 deletions
diff --git a/web/registry.html b/web/registry.html
index 74c67622..dde481fb 100644
--- a/web/registry.html
+++ b/web/registry.html
@@ -18,144 +18,6 @@
<meta property="og:site_name" content="netdata"/>
<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>
- // this section has to appear before loading dashboard.js
-
- // Select a theme.
- // uncomment on of the two themes:
-
- // var netdataTheme = 'default'; // this is white
- var netdataTheme = 'slate'; // this is dark
-
-
- // Set the default netdata server.
- // on charts without a 'data-host', this one will be used.
- // the default is the server that dashboard.js is downloaded from.
-
- // var netdataServer = 'http://my.server:19999/';
-
- function registryGotoServer(guid) {
- console.log('goto server: ' + guid);
- }
-
- function registryAddServer(u) {
- return '<div id="registry_server_' + u.guid + '" class="registry-server-container" onClick="registryGotoServer(\'' + u.guid + '\'); return false;">'
- + '<div class="registry-server-name">' + u.name + '</div>'
- + '<div data-netdata="system.cpu"'
- + ' data-host="' + u.url + '"'
- + ' data-chart-library="sparkline"'
- + ' data-sparkline-chartrangemin="0"'
- + ' data-sparkline-chartrangemax="100"'
- + ' data-sparkline-chartrangeclip="true"'
- + ' data-sparkline-disabletooltips="true"'
- + ' data-sparkline-disableinteraction="true"'
- + ' data-sparkline-disablehighlight="true"'
- + ' data-sparkline-linecolor="#444"'
- + ' data-sparkline-spotcolor="disable"'
- + ' data-sparkline-minspotcolor="disable"'
- + ' data-sparkline-maxspotcolor="disable"'
- + ' data-width="100%"'
- + ' data-height="20px"'
- + ' data-after="-200"'
- + '></div>'
- + '</div>';
- }
-
- var netdataRegistryCallback = function(machines_array) {
- var el = '';
- var a1 = '';
- var found = 0;
-
- if(machines_array) {
- function name_comparator_desc(a, b) {
- if (a.name > b.name) return -1;
- if (a.name < b.name) return 1;
- return 0;
- }
-
- var machines = machines_array.sort(name_comparator_desc);
- var len = machines.length;
- while(len--) {
- var u = machines[len];
-
- var status = "enabled";
- found++;
-
- if(u.guid === NETDATA.registry.machine_guid)
- status = "disabled"
-
- el += registryAddServer(u);
- a1 += '<li id="registry_action_' + u.guid + '"><a href="#" onclick="deleteRegistryModalHandler(\'' + u.guid + '\',\'' + u.name + '\',\'' + u.url + '\'); return false;"><i class="fa fa-trash-o" aria-hidden="true" style="color: #999;"></i></a></li>';
- }
- }
-
- if(!found) {
- if(machines)
- el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #666;" target="_blank">your netdata server list is empty...</a></li>';
- else
- el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #666;" target="_blank">failed to contact the registry...</a></li>';
-
- a1 += '<li><a href="#">&nbsp;</a></li>';
-
- el += '<li role="separator" class="divider"></li>' +
- '<li><a href="//london.netdata.rocks/default.html">EU - London (DigitalOcean.com)</a></li>' +
- '<li><a href="//atlanta.netdata.rocks/default.html">US - Atlanta (CDN77.com)</a></li>' +
- '<li><a href="//athens.netdata.rocks/default.html">EU - Athens</a></li>';
- a1 += '<li role="separator" class="divider"></li>' +
- '<li><a href="#">&nbsp;</a></li>' +
- '<li><a href="#">&nbsp;</a></li>'+
- '<li><a href="#">&nbsp;</a></li>';
- }
-
- el += '<li role="separator" class="divider"></li>';
- a1 += '<li role="separator" class="divider"></li>';
-
- el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #999;" target="_blank">What is this?</a></li>';
- a1 += '<li><a href="#" style="color: #999;" onclick="switchRegistryModalHandler(); return false;"><i class="fa fa-cog" aria-hidden="true" style="color: #999;"></i></a></li>'
-
- document.getElementById('mynetdata_servers').innerHTML = el;
- //document.getElementById('mynetdata_servers2').innerHTML = el;
- //document.getElementById('mynetdata_actions1').innerHTML = a1;
- NETDATA.updatedDom();
- };
- </script>
-
- <!--
- Load dashboard.js
-
- to host this HTML file on your web server,
- you have to load dashboard.js from the netdata server.
-
- So, pick one the two below
- If you pick the first, set the server name/IP.
-
- The second assumes you host this file on /usr/share/netdata/web
- 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?v42"></script>
-
- <script>
- // Set options for TV operation
- // This has to be done, after dashboard.js is loaded
-
- // destroy charts not shown (lowers memory on the browser)
- NETDATA.options.current.destroy_on_hide = true;
-
- // set this to false, to always show all dimensions
- NETDATA.options.current.eliminate_zero_dimensions = true;
-
- // lower the pressure on this browser
- NETDATA.options.current.concurrent_refreshes = true;
-
- // if the tv browser is too slow (a pi?)
- // set this to false
- NETDATA.options.current.parallel_refresher = true;
-
- // always update the charts, even if focus is lost
- // NETDATA.options.current.stop_updates_when_focus_is_lost = false;
- </script>
<style>
.registry-container {
@@ -192,6 +54,143 @@
}
</style>
</head>
+<script>
+// this section has to appear before loading dashboard.js
+
+// Select a theme.
+// uncomment on of the two themes:
+
+// var netdataTheme = 'default'; // this is white
+var netdataTheme = 'slate'; // this is dark
+
+
+// Set the default netdata server.
+// on charts without a 'data-host', this one will be used.
+// the default is the server that dashboard.js is downloaded from.
+
+// var netdataServer = 'http://my.server:19999/';
+
+function registryGotoServer(guid) {
+ console.log('goto server: ' + guid);
+}
+
+function registryAddServer(u) {
+ return '<div id="registry_server_' + u.guid + '" class="registry-server-container" onClick="registryGotoServer(\'' + u.guid + '\'); return false;">'
+ + '<div class="registry-server-name">' + u.name + '</div>'
+ + '<div data-netdata="system.cpu"'
+ + ' data-host="' + u.url + '"'
+ + ' data-chart-library="sparkline"'
+ + ' data-sparkline-chartrangemin="0"'
+ + ' data-sparkline-chartrangemax="100"'
+ + ' data-sparkline-chartrangeclip="true"'
+ + ' data-sparkline-disabletooltips="true"'
+ + ' data-sparkline-disableinteraction="true"'
+ + ' data-sparkline-disablehighlight="true"'
+ + ' data-sparkline-linecolor="#444"'
+ + ' data-sparkline-spotcolor="disable"'
+ + ' data-sparkline-minspotcolor="disable"'
+ + ' data-sparkline-maxspotcolor="disable"'
+ + ' data-width="100%"'
+ + ' data-height="20px"'
+ + ' data-after="-200"'
+ + '></div>'
+ + '</div>';
+}
+
+var netdataRegistryCallback = function(machines_array) {
+ var el = '';
+ var a1 = '';
+ var found = 0;
+
+ if(machines_array) {
+ function name_comparator_desc(a, b) {
+ if (a.name > b.name) return -1;
+ if (a.name < b.name) return 1;
+ return 0;
+ }
+
+ var machines = machines_array.sort(name_comparator_desc);
+ var len = machines.length;
+ while(len--) {
+ var u = machines[len];
+
+ var status = "enabled";
+ found++;
+
+ if(u.guid === NETDATA.registry.machine_guid)
+ status = "disabled"
+
+ el += registryAddServer(u);
+ a1 += '<li id="registry_action_' + u.guid + '"><a href="#" onclick="deleteRegistryModalHandler(\'' + u.guid + '\',\'' + u.name + '\',\'' + u.url + '\'); return false;"><i class="fa fa-trash-o" aria-hidden="true" style="color: #999;"></i></a></li>';
+ }
+ }
+
+ if(!found) {
+ if(machines)
+ el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #666;" target="_blank">your netdata server list is empty...</a></li>';
+ else
+ el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #666;" target="_blank">failed to contact the registry...</a></li>';
+
+ a1 += '<li><a href="#">&nbsp;</a></li>';
+
+ el += '<li role="separator" class="divider"></li>' +
+ '<li><a href="//london.netdata.rocks/default.html">EU - London (DigitalOcean.com)</a></li>' +
+ '<li><a href="//atlanta.netdata.rocks/default.html">US - Atlanta (CDN77.com)</a></li>' +
+ '<li><a href="//athens.netdata.rocks/default.html">EU - Athens</a></li>';
+ a1 += '<li role="separator" class="divider"></li>' +
+ '<li><a href="#">&nbsp;</a></li>' +
+ '<li><a href="#">&nbsp;</a></li>'+
+ '<li><a href="#">&nbsp;</a></li>';
+ }
+
+ el += '<li role="separator" class="divider"></li>';
+ a1 += '<li role="separator" class="divider"></li>';
+
+ el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #999;" target="_blank">What is this?</a></li>';
+ a1 += '<li><a href="#" style="color: #999;" onclick="switchRegistryModalHandler(); return false;"><i class="fa fa-cog" aria-hidden="true" style="color: #999;"></i></a></li>'
+
+ document.getElementById('mynetdata_servers').innerHTML = el;
+ //document.getElementById('mynetdata_servers2').innerHTML = el;
+ //document.getElementById('mynetdata_actions1').innerHTML = a1;
+ NETDATA.updatedDom();
+};
+</script>
+
+<!--
+ Load dashboard.js
+
+ to host this HTML file on your web server,
+ you have to load dashboard.js from the netdata server.
+
+ So, pick one the two below
+ If you pick the first, set the server name/IP.
+
+ The second assumes you host this file on /usr/share/netdata/web
+ 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?v20161004-1"></script>
+
+<script>
+// Set options for TV operation
+// This has to be done, after dashboard.js is loaded
+
+// destroy charts not shown (lowers memory on the browser)
+NETDATA.options.current.destroy_on_hide = true;
+
+// set this to false, to always show all dimensions
+NETDATA.options.current.eliminate_zero_dimensions = true;
+
+// lower the pressure on this browser
+NETDATA.options.current.concurrent_refreshes = true;
+
+// if the tv browser is too slow (a pi?)
+// set this to false
+NETDATA.options.current.parallel_refresher = true;
+
+// always update the charts, even if focus is lost
+// NETDATA.options.current.stop_updates_when_focus_is_lost = false;
+</script>
<body>
&nbsp;
<div id="mynetdata_servers" class="registry-container" onscroll="NETDATA.onscroll();">