4 <title>NetData Registry Dashboard</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9 <meta name="viewport" content="width=device-width, initial-scale=1">
10 <meta name="apple-mobile-web-app-capable" content="yes">
11 <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
13 <meta property="og:locale" content="en_US" />
14 <meta property="og:image" content="https://my-netdata.io/images/seo-performance-512.png"/>
15 <meta property="og:url" content="http://my-netdata.io/"/>
16 <meta property="og:type" content="website"/>
17 <meta property="og:site_name" content="netdata"/>
18 <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
19 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22 // this section has to appear before loading dashboard.js
25 // uncomment on of the two themes:
27 // var netdataTheme = 'default'; // this is white
28 var netdataTheme = 'slate'; // this is dark
31 // Set the default netdata server.
32 // on charts without a 'data-host', this one will be used.
33 // the default is the server that dashboard.js is downloaded from.
35 // var netdataServer = 'http://my.server:19999/';
37 function registryGotoServer(guid) {
38 console.log('goto server: ' + guid);
41 function registryAddServer(u) {
42 return '<div id="registry_server_' + u.guid + '" class="registry-server-container" onClick="registryGotoServer(\'' + u.guid + '\'); return false;">'
43 + '<div class="registry-server-name">' + u.name + '</div>'
44 + '<div data-netdata="system.cpu"'
45 + ' data-host="' + u.url + '"'
46 + ' data-chart-library="sparkline"'
47 + ' data-sparkline-chartrangemin="0"'
48 + ' data-sparkline-chartrangemax="100"'
49 + ' data-sparkline-chartrangeclip="true"'
50 + ' data-sparkline-disabletooltips="true"'
51 + ' data-sparkline-disableinteraction="true"'
52 + ' data-sparkline-disablehighlight="true"'
53 + ' data-sparkline-linecolor="#444"'
54 + ' data-sparkline-spotcolor="disable"'
55 + ' data-sparkline-minspotcolor="disable"'
56 + ' data-sparkline-maxspotcolor="disable"'
57 + ' data-width="100%"'
58 + ' data-height="20px"'
59 + ' data-after="-200"'
64 var netdataRegistryCallback = function(machines_array) {
70 function name_comparator_desc(a, b) {
71 if (a.name > b.name) return -1;
72 if (a.name < b.name) return 1;
76 var machines = machines_array.sort(name_comparator_desc);
77 var len = machines.length;
79 var u = machines[len];
81 var status = "enabled";
84 if(u.guid === NETDATA.registry.machine_guid)
87 el += registryAddServer(u);
88 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>';
94 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>';
96 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>';
98 a1 += '<li><a href="#"> </a></li>';
100 el += '<li role="separator" class="divider"></li>' +
101 '<li><a href="//london.netdata.rocks/default.html">EU - London (DigitalOcean.com)</a></li>' +
102 '<li><a href="//atlanta.netdata.rocks/default.html">US - Atlanta (CDN77.com)</a></li>' +
103 '<li><a href="//athens.netdata.rocks/default.html">EU - Athens</a></li>';
104 a1 += '<li role="separator" class="divider"></li>' +
105 '<li><a href="#"> </a></li>' +
106 '<li><a href="#"> </a></li>'+
107 '<li><a href="#"> </a></li>';
110 el += '<li role="separator" class="divider"></li>';
111 a1 += '<li role="separator" class="divider"></li>';
113 el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #999;" target="_blank">What is this?</a></li>';
114 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>'
116 document.getElementById('mynetdata_servers').innerHTML = el;
117 //document.getElementById('mynetdata_servers2').innerHTML = el;
118 //document.getElementById('mynetdata_actions1').innerHTML = a1;
119 NETDATA.updatedDom();
126 to host this HTML file on your web server,
127 you have to load dashboard.js from the netdata server.
129 So, pick one the two below
130 If you pick the first, set the server name/IP.
132 The second assumes you host this file on /usr/share/netdata/web
133 and that you have chown it to be owned by netdata:netdata
135 <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
136 <script type="text/javascript" src="dashboard.js?v39"></script>
139 // Set options for TV operation
140 // This has to be done, after dashboard.js is loaded
142 // destroy charts not shown (lowers memory on the browser)
143 NETDATA.options.current.destroy_on_hide = true;
145 // set this to false, to always show all dimensions
146 NETDATA.options.current.eliminate_zero_dimensions = true;
148 // lower the pressure on this browser
149 NETDATA.options.current.concurrent_refreshes = true;
151 // if the tv browser is too slow (a pi?)
153 NETDATA.options.current.parallel_refresher = true;
155 // always update the charts, even if focus is lost
156 // NETDATA.options.current.stop_updates_when_focus_is_lost = false;
160 .registry-container {
164 border: 1px solid #555;
168 /* background-color: #3a3f44; */
171 .registry-server-container {
179 .registry-server-container:hover {
181 background-color: #262626;
183 .registry-server-name {
185 text-decoration: none !important;
196 <div id="mynetdata_servers" class="registry-container" onscroll="NETDATA.onscroll();">
200 </div> <!-- registry-container -->