optimizatons suggested by sitespeed.io
Costa Tsaousis (ktsaou) committed
Sep 24, 2016 at 17:34 UTC
43cec16e60a8cadaffc0aca4bb08455cbf143b22
10 files changed
+607
-618
web/dashboard.html
+6
-9
@@ -643,16 +643,13 @@ So, to avoid flashing the charts, we destroy and re-create the charts on each up
643
<small>rendered in <span id="time803">X</span> ms</small>
644
</div>
645
646
-
647
-
648
-
649
-
646
</div> <!-- 1st container -->
647
</body>
648
</html>
653
- <!-- you can set your netdata server globally, by ucommenting this -->
654
- <!-- you can also give a different server per chart, with the attribute: data-host="http://netdata.server:19999" -->
655
- <!-- <script> netdataServer = "http://box:19999"; </script> -->
649
657
- <!-- load the dashboard manager - it will do the rest -->
658
- <script type="text/javascript" src="dashboard.js?v51"></script>
650
+<!-- you can set your netdata server globally, by ucommenting this -->
651
+<!-- you can also give a different server per chart, with the attribute: data-host="http://netdata.server:19999" -->
652
+<!-- <script> netdataServer = "http://box:19999"; </script> -->
653
+
654
+<!-- load the dashboard manager - it will do the rest -->
655
+<script type="text/javascript" src="dashboard.js?v51"></script>
web/demo.html
+1
-2
@@ -19,9 +19,8 @@
19
<meta property="og:site_name" content="netdata"/>
20
<meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
21
<meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22
-
23
- <script type="text/javascript" src="dashboard.js?v51"></script>
22
</head>
23
+<script type="text/javascript" src="dashboard.js?v51"></script>
24
<body>
25
26
<div style="width: 100%; text-align: center;">
web/demo2.html
+2
-3
@@ -19,10 +19,9 @@
19
<meta property="og:site_name" content="netdata"/>
20
<meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
21
<meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22
-
23
- <script>var netdataTheme = 'slate';</script>
24
- <script type="text/javascript" src="http://my-netdata.io/dashboard.js?v51"></script>
22
</head>
23
+<script>var netdataTheme = 'slate';</script>
24
+<script type="text/javascript" src="http://my-netdata.io/dashboard.js?v51"></script>
25
<body>
26
27
<div class="container" style="width: 90%; padding-top: 10px; text-align: center; color: #AAA">
web/demosites.html
+91
-93
@@ -18,8 +18,9 @@
18
<meta property="og:site_name" content="netdata"/>
19
<meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
20
<meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
21
+</head>
22
22
- <script>
23
+<script>
24
// --- OPTIONS FOR THE DASHBOARD --
25
26
// this section has to appear before loading dashboard.js
@@ -71,103 +72,100 @@
72
73
// set this to false, to always update the charts, even if focus is lost
74
NETDATA.options.current.stop_updates_when_focus_is_lost = true;
74
- </script>
75
+</script>
76
+<style>
77
+ body {
78
+ font-size: 1vw;
79
+ }
80
+
81
+ .mysparkline {
82
+ position: relative;
83
+ display: inline-block;
84
+ min-height: 50px;
85
+ width: 100%;
86
+ height: 8vmax;
87
+ text-align: left;
88
+ }
89
+
90
+ .mysparkline-overchart-label {
91
+ position: absolute;
92
+ display: block;
93
+ top: 0;
94
+ left: 10px;
95
+ bottom: 0;
96
+ right: 0;
97
+ font-size: 1vmax;
98
+ z-index: 1;
99
+ }
100
76
- <style>
77
-
78
-body {
79
- font-size: 1vw;
80
-}
81
-
82
-.mysparkline {
83
- position: relative;
84
- display: inline-block;
85
- min-height: 50px;
86
- width: 100%;
87
- height: 8vmax;
88
- text-align: left;
89
-}
90
-
91
-.mysparkline-overchart-label {
92
- position: absolute;
93
- display: block;
94
- top: 0;
95
- left: 10px;
96
- bottom: 0;
97
- right: 0;
98
- font-size: 1vmax;
99
- z-index: 1;
100
-}
101
-
102
-.mysparkline-overchart-value {
103
- position: absolute;
104
- display: block;
105
- top: 1.1vmax;
106
- left: 10px;
107
- bottom: 0;
108
- right: 0;
109
- font-size: 5vmax;
110
- z-index: 2;
111
- text-shadow: #333 0px 0px 2px;
112
-}
113
-
114
-.myfullchart {
115
- position: relative;
116
- display: inline-block;
117
- width: 100%;
118
- height: 14vmax;
119
- min-height: 150px;
120
- text-align: left;
121
-}
122
-
123
-.mygauge-combo {
124
- display: inline-block;
125
-}
126
-
127
-.mygauge {
128
- position: relative;
129
- display: block;
130
- width: 18vw;
131
- height: 11vw;
132
-}
133
-
134
-.mygauge-button {
135
- display: block;
136
-}
137
-
138
-.mytitle {
139
- padding-top: 6vw;
140
- padding-bottom: 1vw;
141
- text-align: center;
142
- font-size: 2.4vw;
143
-}
144
-
145
-.mysubtitle {
146
- padding-top: 2vw;
147
- padding-bottom: 1vw;
148
- text-align: center;
149
- font-size: 1.8vw;
150
-}
151
-
152
-.mycontent {
153
- text-align: center;
154
- font-size: 1.5vw;
155
-}
156
-
157
-@media only screen and (min-width : 992px) {
158
- .container {
159
- width: 90%;
101
+ .mysparkline-overchart-value {
102
+ position: absolute;
103
+ display: block;
104
+ top: 1.1vmax;
105
+ left: 10px;
106
+ bottom: 0;
107
+ right: 0;
108
+ font-size: 5vmax;
109
+ z-index: 2;
110
+ text-shadow: #333 0px 0px 2px;
111
}
161
-}
162
-@media only screen and (max-width : 992px) {
163
- .container {
112
+
113
+ .myfullchart {
114
+ position: relative;
115
+ display: inline-block;
116
width: 100%;
117
+ height: 14vmax;
118
+ min-height: 150px;
119
+ text-align: left;
120
}
166
-}
167
- </style>
121
169
-</head>
170
-<body style="text-align: center;">
122
+ .mygauge-combo {
123
+ display: inline-block;
124
+ }
125
+
126
+ .mygauge {
127
+ position: relative;
128
+ display: block;
129
+ width: 18vw;
130
+ height: 11vw;
131
+ }
132
+
133
+ .mygauge-button {
134
+ display: block;
135
+ }
136
+
137
+ .mytitle {
138
+ padding-top: 6vw;
139
+ padding-bottom: 1vw;
140
+ text-align: center;
141
+ font-size: 2.4vw;
142
+ }
143
+
144
+ .mysubtitle {
145
+ padding-top: 2vw;
146
+ padding-bottom: 1vw;
147
+ text-align: center;
148
+ font-size: 1.8vw;
149
+ }
150
+
151
+ .mycontent {
152
+ text-align: center;
153
+ font-size: 1.5vw;
154
+ }
155
+
156
+ @media only screen and (min-width : 992px) {
157
+ .container {
158
+ width: 80%;
159
+ }
160
+ }
161
+ @media only screen and (max-width : 992px) {
162
+ .container {
163
+ width: 100%;
164
+ }
165
+ }
166
+</style>
167
+
168
+<body style="text-align: center; background-color: #272b30;">
169
170
<div class="container">
171
web/goto-host-from-alarm.html
+119
-120
@@ -11,147 +11,146 @@
11
<meta name="apple-mobile-web-app-capable" content="yes">
12
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
13
14
- <script>
15
- var netdataRegistry = true;
16
- var netdataRegistryAfterMs = 0;
17
- var netdataTheme = 'slate';
18
- var netdataShowHelp = true;
19
- </script>
20
- <script type="text/javascript" src="dashboard.js?v51"></script>
21
-
22
- <script>
23
- var urlOptions = {
24
- host: null,
25
- chart: null,
26
- family: null,
27
- alarm: null,
28
- alarm_unique_id: 0,
29
- alarm_id: 0,
30
- alarm_event_id: 0,
31
- hasProperty: function(property) {
32
- return typeof this[property] !== 'undefined';
33
- }
34
- };
35
-
36
- function netdataQueryParse() {
37
- var query = document.location.search.split('?');
38
- var variables = query[1].split('&');
39
- var len = variables.length;
40
- while(len--) {
41
- var p = variables[len].split('=');
42
- if(urlOptions.hasProperty(p[0]) && typeof p[1] !== 'undefined')
43
- urlOptions[p[0]] = decodeURIComponent(p[1]);
44
- }
45
-
46
- if(typeof urlOptions.family !== 'string')
47
- urlOptions.family = '';
48
-
49
- if(typeof urlOptions.chart !== 'string')
50
- urlOptions.chart = '';
14
+</head>
15
+<script>
16
+ var netdataRegistry = true;
17
+ var netdataRegistryAfterMs = 0;
18
+ var netdataTheme = 'slate';
19
+ var netdataShowHelp = true;
20
+</script>
21
+<script type="text/javascript" src="dashboard.js?v51"></script>
22
+
23
+<script>
24
+var urlOptions = {
25
+ host: null,
26
+ chart: null,
27
+ family: null,
28
+ alarm: null,
29
+ alarm_unique_id: 0,
30
+ alarm_id: 0,
31
+ alarm_event_id: 0,
32
+ hasProperty: function(property) {
33
+ return typeof this[property] !== 'undefined';
34
}
52
-
53
- function netdataURL(url) {
54
- return url + '#top'
55
- + ';nowelcome=1'
56
- // + ';show_alarms=1'
57
- + ';chart=' + encodeURIComponent(urlOptions.chart)
58
- + ';family=' + encodeURIComponent(urlOptions.family)
59
- + ';alarm=' + encodeURIComponent(urlOptions.alarm)
60
- + ';alarm_unique_id=' + urlOptions.alarm_unique_id.toString()
61
- + ';alarm_id=' + urlOptions.alarm_id.toString()
62
- + ';alarm_event_id=' + urlOptions.alarm_event_id.toString()
63
- ;
35
+};
36
+
37
+function netdataQueryParse() {
38
+ var query = document.location.search.split('?');
39
+ var variables = query[1].split('&');
40
+ var len = variables.length;
41
+ while(len--) {
42
+ var p = variables[len].split('=');
43
+ if(urlOptions.hasProperty(p[0]) && typeof p[1] !== 'undefined')
44
+ urlOptions[p[0]] = decodeURIComponent(p[1]);
45
}
46
66
- var gotoServerValidateRemaining = 0;
67
- var gotoServerMiddleClick = false;
68
- var gotoServerStop = false;
69
- var thisIsHttps = false;
70
- var urlsInHttp = 0;
71
- function gotoServerValidateUrl(id, guid, url) {
72
- var penaldy = 0;
73
- var error = 'failed';
74
-
75
- if(thisIsHttps === false && url.toString().startsWith('https://')) {
76
- // we penalize https only if the current url is http
77
- // to allow the user walk through all its servers.
78
- penaldy = 500;
79
- }
47
+ if(typeof urlOptions.family !== 'string')
48
+ urlOptions.family = '';
49
+
50
+ if(typeof urlOptions.chart !== 'string')
51
+ urlOptions.chart = '';
52
+}
53
+
54
+function netdataURL(url) {
55
+ return url + '#top'
56
+ + ';nowelcome=1'
57
+ // + ';show_alarms=1'
58
+ + ';chart=' + encodeURIComponent(urlOptions.chart)
59
+ + ';family=' + encodeURIComponent(urlOptions.family)
60
+ + ';alarm=' + encodeURIComponent(urlOptions.alarm)
61
+ + ';alarm_unique_id=' + urlOptions.alarm_unique_id.toString()
62
+ + ';alarm_id=' + urlOptions.alarm_id.toString()
63
+ + ';alarm_event_id=' + urlOptions.alarm_event_id.toString()
64
+ ;
65
+}
66
+
67
+var gotoServerValidateRemaining = 0;
68
+var gotoServerMiddleClick = false;
69
+var gotoServerStop = false;
70
+var thisIsHttps = false;
71
+var urlsInHttp = 0;
72
+function gotoServerValidateUrl(id, guid, url) {
73
+ var penaldy = 0;
74
+ var error = 'failed';
75
+
76
+ if(thisIsHttps === false && url.toString().startsWith('https://')) {
77
+ // we penalize https only if the current url is http
78
+ // to allow the user walk through all its servers.
79
+ penaldy = 500;
80
+ }
81
81
- else if(thisIsHttps === true && url.toString().startsWith('http://')) {
82
- error = 'can\'t check';
83
- urlsInHttp++;
84
- }
82
+ else if(thisIsHttps === true && url.toString().startsWith('http://')) {
83
+ error = 'can\'t check';
84
+ urlsInHttp++;
85
+ }
86
86
- var finalURL = netdataURL(url);
87
+ var finalURL = netdataURL(url);
88
88
- setTimeout(function() {
89
- document.getElementById('gotoServerList').innerHTML += '<tr><td style="padding-left: 20px;"><a href="' + finalURL + '" target="_blank">' + url + '</a></td><td style="padding-left: 30px;"><code id="' + guid + '-' + id + '-status">checking...</code></td></tr>';
89
+ setTimeout(function() {
90
+ document.getElementById('gotoServerList').innerHTML += '<tr><td style="padding-left: 20px;"><a href="' + finalURL + '" target="_blank">' + url + '</a></td><td style="padding-left: 30px;"><code id="' + guid + '-' + id + '-status">checking...</code></td></tr>';
91
91
- NETDATA.registry.hello(url, function(data) {
92
- if (data) {
93
- document.getElementById(guid + '-' + id + '-status').innerHTML = "OK";
92
+ NETDATA.registry.hello(url, function(data) {
93
+ if (data) {
94
+ document.getElementById(guid + '-' + id + '-status').innerHTML = "OK";
95
95
- if(!gotoServerStop) {
96
- gotoServerStop = true;
96
+ if(!gotoServerStop) {
97
+ gotoServerStop = true;
98
98
- if(gotoServerMiddleClick) {
99
- window.open(finalURL);
100
- gotoServerMiddleClick = false;
101
- document.getElementById('gotoServerResponse').innerHTML = '<b>Opening new window to ' + NETDATA.registry.machines[guid].name + '<br/><a href="' + finalURL + '">' + url + '</a></b><br/>(check your pop-up blocker if it fails)';
102
- }
103
- else
104
- document.location = finalURL;
99
+ if(gotoServerMiddleClick) {
100
+ window.open(finalURL);
101
+ gotoServerMiddleClick = false;
102
+ document.getElementById('gotoServerResponse').innerHTML = '<b>Opening new window to ' + NETDATA.registry.machines[guid].name + '<br/><a href="' + finalURL + '">' + url + '</a></b><br/>(check your pop-up blocker if it fails)';
103
}
104
+ else
105
+ document.location = finalURL;
106
}
107
- else {
108
- document.getElementById(guid + '-' + id + '-status').innerHTML = error;
109
- gotoServerValidateRemaining--;
110
- if(gotoServerValidateRemaining <= 0) {
111
- gotoServerMiddleClick = false;
112
- document.getElementById('gotoServerResponse').innerHTML = '<b>Sorry! I cannot find any operational URL for this server</b>';
113
-
114
- if(thisIsHttps === true && urlsInHttp > 0) {
115
- document.getElementById('gotoServerResponse').innerHTML += '<br/>redirecting myself to HTTP to allow checking';
116
- document.location = document.location.toString().replace('https://', 'http://');
117
- }
107
+ }
108
+ else {
109
+ document.getElementById(guid + '-' + id + '-status').innerHTML = error;
110
+ gotoServerValidateRemaining--;
111
+ if(gotoServerValidateRemaining <= 0) {
112
+ gotoServerMiddleClick = false;
113
+ document.getElementById('gotoServerResponse').innerHTML = '<b>Sorry! I cannot find any operational URL for this server</b>';
114
+
115
+ if(thisIsHttps === true && urlsInHttp > 0) {
116
+ document.getElementById('gotoServerResponse').innerHTML += '<br/>redirecting myself to HTTP to allow checking';
117
+ document.location = document.location.toString().replace('https://', 'http://');
118
}
119
}
120
- });
121
- }, (id * 50) + penaldy);
120
+ }
121
+ });
122
+ }, (id * 50) + penaldy);
123
+}
124
+
125
+var netdataRegistryCallback = function(machines_array) {
126
+ if(typeof urlOptions.host !== 'string') {
127
+ document.getElementById('bodylog').innerHTML = "Sorry... bad request.";
128
+ return;
129
}
130
124
- var netdataRegistryCallback = function(machines_array) {
125
- if(typeof urlOptions.host !== 'string') {
126
- document.getElementById('bodylog').innerHTML = "Sorry... bad request.";
127
- return;
128
- }
129
-
130
- document.getElementById('message').innerHTML = 'These are the URLs this machine is known:';
131
+ document.getElementById('message').innerHTML = 'These are the URLs this machine is known:';
132
132
- if(document.location.toString().startsWith('https://'))
133
- thisIsHttps = true;
133
+ if(document.location.toString().startsWith('https://'))
134
+ thisIsHttps = true;
135
135
- if(machines_array) {
136
- var len = machines_array.length;
137
- while(len--) {
138
- if(machines_array[len].name === urlOptions.host) {
139
- var ulen = machines_array[len].alternate_urls.length;
140
- gotoServerValidateRemaining = ulen;
141
- while(ulen--)
142
- gotoServerValidateUrl(ulen, machines_array[len].guid, machines_array[len].alternate_urls[ulen]);
143
- return;
144
- }
136
+ if(machines_array) {
137
+ var len = machines_array.length;
138
+ while(len--) {
139
+ if(machines_array[len].name === urlOptions.host) {
140
+ var ulen = machines_array[len].alternate_urls.length;
141
+ gotoServerValidateRemaining = ulen;
142
+ while(ulen--)
143
+ gotoServerValidateUrl(ulen, machines_array[len].guid, machines_array[len].alternate_urls[ulen]);
144
+ return;
145
}
146
}
147
+ }
148
148
- document.getElementById('bodylog').innerHTML = "Sorry... your account is not linked to a netdata server named: <b>" + urlOptions.host + '</b>';
149
- };
150
-
151
- netdataQueryParse();
152
- </script>
149
+ document.getElementById('bodylog').innerHTML = "Sorry... your account is not linked to a netdata server named: <b>" + urlOptions.host + '</b>';
150
+};
151
154
-</head>
152
+netdataQueryParse();
153
+</script>
154
<body>
155
<div class="container" id="">
156
<div id="bodylog" style="padding-top: 8vmax; font-size: 2.0vmax;">
web/index.html
+192
-193
@@ -36,7 +36,6 @@
36
<meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
37
38
<style>
39
-
39
/* prevent body from hiding under the navbar */
40
body {
41
padding-top: 50px;
@@ -389,241 +388,239 @@
388
}
389
390
</style>
391
+</head>
392
393
- <!-- check which theme to use -->
394
- <script type="text/javascript">
395
- // enable alarms checking and notifications
396
- var netdataShowAlarms = true;
397
-
398
- // enable registry updates
399
- var netdataRegistry = true;
400
-
401
- // --------------------------------------------------------------------
402
- // urlOptions
403
-
404
- var urlOptions = {
405
- hash: '#',
406
- theme: null,
407
- help: null,
408
- pan_and_zoom: false,
409
- after: 0,
410
- before: 0,
411
- nowelcome: false,
412
- show_alarms: false,
413
- chart: null,
414
- family: null,
415
- alarm: null,
416
- alarm_unique_id: 0,
417
- alarm_id: 0,
418
- alarm_event_id: 0,
419
- hasProperty: function(property) {
420
- // console.log('checking property ' + property + ' of type ' + typeof(this[property]));
421
- return typeof this[property] !== 'undefined';
422
- }
423
- };
393
+<!-- check which theme to use -->
394
+<script type="text/javascript">
395
+ // enable alarms checking and notifications
396
+ var netdataShowAlarms = true;
397
425
- function netdataPanAndZoomCallback(status, after, before) {
426
- urlOptions.pan_and_zoom = status;
427
- urlOptions.after = after;
428
- urlOptions.before = before;
429
- netdataHashUpdate();
398
+ // enable registry updates
399
+ var netdataRegistry = true;
400
+
401
+ // --------------------------------------------------------------------
402
+ // urlOptions
403
+
404
+ var urlOptions = {
405
+ hash: '#',
406
+ theme: null,
407
+ help: null,
408
+ pan_and_zoom: false,
409
+ after: 0,
410
+ before: 0,
411
+ nowelcome: false,
412
+ show_alarms: false,
413
+ chart: null,
414
+ family: null,
415
+ alarm: null,
416
+ alarm_unique_id: 0,
417
+ alarm_id: 0,
418
+ alarm_event_id: 0,
419
+ hasProperty: function(property) {
420
+ // console.log('checking property ' + property + ' of type ' + typeof(this[property]));
421
+ return typeof this[property] !== 'undefined';
422
}
423
+ };
424
432
- function netdataHashUpdate() {
433
- history.replaceState(null, '', netdataHash());
434
- }
425
+ function netdataPanAndZoomCallback(status, after, before) {
426
+ urlOptions.pan_and_zoom = status;
427
+ urlOptions.after = after;
428
+ urlOptions.before = before;
429
+ netdataHashUpdate();
430
+ }
431
436
- function netdataHash() {
437
- var hash = urlOptions.hash;
432
+ function netdataHashUpdate() {
433
+ history.replaceState(null, '', netdataHash());
434
+ }
435
439
- if(urlOptions.pan_and_zoom === true) {
440
- hash += ';after=' + urlOptions.after.toString() +
441
- ';before=' + urlOptions.before.toString();
442
- }
436
+ function netdataHash() {
437
+ var hash = urlOptions.hash;
438
444
- if(urlOptions.theme !== null)
445
- hash += ';theme=' + urlOptions.theme.toString();
439
+ if(urlOptions.pan_and_zoom === true) {
440
+ hash += ';after=' + urlOptions.after.toString() +
441
+ ';before=' + urlOptions.before.toString();
442
+ }
443
447
- if(urlOptions.help !== null)
448
- hash += ';help=' + urlOptions.help.toString();
444
+ if(urlOptions.theme !== null)
445
+ hash += ';theme=' + urlOptions.theme.toString();
446
450
- return hash;
451
- }
447
+ if(urlOptions.help !== null)
448
+ hash += ';help=' + urlOptions.help.toString();
449
453
- function netdataHashParse() {
454
- var variables = document.location.hash.split(';');
455
- var len = variables.length;
456
- while(len--) {
457
- if(len !== 0) {
458
- var p = variables[len].split('=');
459
- if(urlOptions.hasProperty(p[0]) && typeof p[1] !== 'undefined')
460
- urlOptions[p[0]] = decodeURIComponent(p[1]);
461
- }
462
- else {
463
- if(variables[len].length > 0)
464
- urlOptions.hash = variables[len];
465
- }
466
- }
450
+ return hash;
451
+ }
452
468
- var booleans = [ 'nowelcome', 'show_alarms', 'pan_and_zoom' ];
469
- len = booleans.length;
470
- while(len--) {
471
- if(urlOptions[booleans[len]] === 'true' || urlOptions[booleans[len]] === true || urlOptions[booleans[len]] === '1' || urlOptions[booleans[len]] === 1)
472
- urlOptions[booleans[len]] = true;
473
- else
474
- urlOptions[booleans[len]] = false;
453
+ function netdataHashParse() {
454
+ var variables = document.location.hash.split(';');
455
+ var len = variables.length;
456
+ while(len--) {
457
+ if(len !== 0) {
458
+ var p = variables[len].split('=');
459
+ if(urlOptions.hasProperty(p[0]) && typeof p[1] !== 'undefined')
460
+ urlOptions[p[0]] = decodeURIComponent(p[1]);
461
}
476
-
477
- if(urlOptions.before > 0 && urlOptions.after > 0) {
478
- urlOptions.pan_and_zoom = true;
479
- urlOptions.nowelcome = true;
462
+ else {
463
+ if(variables[len].length > 0)
464
+ urlOptions.hash = variables[len];
465
}
481
- else
482
- urlOptions.pan_and_zoom = false;
483
-
484
- // console.log(urlOptions);
466
}
467
487
- netdataHashParse();
468
+ var booleans = [ 'nowelcome', 'show_alarms', 'pan_and_zoom' ];
469
+ len = booleans.length;
470
+ while(len--) {
471
+ if(urlOptions[booleans[len]] === 'true' || urlOptions[booleans[len]] === true || urlOptions[booleans[len]] === '1' || urlOptions[booleans[len]] === 1)
472
+ urlOptions[booleans[len]] = true;
473
+ else
474
+ urlOptions[booleans[len]] = false;
475
+ }
476
489
- // --------------------------------------------------------------------
490
- // check options that should be processed before loading netdata.js
491
-
492
- function loadLocalStorage(name) {
493
- var ret = null;
477
+ if(urlOptions.before > 0 && urlOptions.after > 0) {
478
+ urlOptions.pan_and_zoom = true;
479
+ urlOptions.nowelcome = true;
480
+ }
481
+ else
482
+ urlOptions.pan_and_zoom = false;
483
495
- try {
496
- if(typeof Storage !== "undefined" && typeof localStorage === 'object')
497
- ret = localStorage.getItem(name);
498
- }
499
- catch(error) {
500
- ;
501
- }
484
+ // console.log(urlOptions);
485
+ }
486
503
- if(typeof ret === 'undefined' || ret === null)
504
- return null;
487
+ netdataHashParse();
488
506
- // console.log('loaded: ' + name.toString() + ' = ' + ret.toString());
489
+ // --------------------------------------------------------------------
490
+ // check options that should be processed before loading netdata.js
491
+
492
+ function loadLocalStorage(name) {
493
+ var ret = null;
494
508
- return ret;
495
+ try {
496
+ if(typeof Storage !== "undefined" && typeof localStorage === 'object')
497
+ ret = localStorage.getItem(name);
498
+ }
499
+ catch(error) {
500
+ ;
501
}
502
511
- function saveLocalStorage(name, value) {
512
- // console.log('saving: ' + name.toString() + ' = ' + value.toString());
513
- try {
514
- if(typeof Storage !== "undefined" && typeof localStorage === 'object') {
515
- localStorage.setItem(name, value.toString());
516
- return true;
517
- }
518
- }
519
- catch(error) {
520
- ;
521
- }
503
+ if(typeof ret === 'undefined' || ret === null)
504
+ return null;
505
523
- return false;
524
- }
506
+ // console.log('loaded: ' + name.toString() + ' = ' + ret.toString());
507
526
- function getTheme(def) {
527
- var ret = loadLocalStorage('netdataTheme');
528
- if(typeof ret === 'undefined' || ret === null || ret === 'undefined')
529
- return def;
530
- else
531
- return ret;
532
- }
508
+ return ret;
509
+ }
510
534
- function setTheme(theme) {
535
- if(theme === netdataTheme) return false;
536
- return saveLocalStorage('netdataTheme', theme);
511
+ function saveLocalStorage(name, value) {
512
+ // console.log('saving: ' + name.toString() + ' = ' + value.toString());
513
+ try {
514
+ if(typeof Storage !== "undefined" && typeof localStorage === 'object') {
515
+ localStorage.setItem(name, value.toString());
516
+ return true;
517
+ }
518
+ }
519
+ catch(error) {
520
+ ;
521
}
522
539
- var netdataTheme = getTheme('slate');
540
- var netdataShowHelp = true;
523
+ return false;
524
+ }
525
542
- if(urlOptions.theme !== null) {
543
- setTheme(urlOptions.theme);
544
- netdataTheme = urlOptions.theme;
545
- }
526
+ function getTheme(def) {
527
+ var ret = loadLocalStorage('netdataTheme');
528
+ if(typeof ret === 'undefined' || ret === null || ret === 'undefined')
529
+ return def;
530
else
547
- urlOptions.theme = netdataTheme;
531
+ return ret;
532
+ }
533
549
- if(urlOptions.help !== null) {
550
- saveLocalStorage('options.show_help', urlOptions.help);
551
- netdataShowHelp = urlOptions.help;
552
- }
553
- else {
554
- urlOptions.help = loadLocalStorage('options.show_help');
555
- }
534
+ function setTheme(theme) {
535
+ if(theme === netdataTheme) return false;
536
+ return saveLocalStorage('netdataTheme', theme);
537
+ }
538
557
- // --------------------------------------------------------------------
558
- // registry call back to render my-netdata menu
539
+ var netdataTheme = getTheme('slate');
540
+ var netdataShowHelp = true;
541
560
- var netdataRegistryCallback = function(machines_array) {
561
- var el = '';
562
- var a1 = '';
563
- var found = 0;
542
+ if(urlOptions.theme !== null) {
543
+ setTheme(urlOptions.theme);
544
+ netdataTheme = urlOptions.theme;
545
+ }
546
+ else
547
+ urlOptions.theme = netdataTheme;
548
565
- if(machines_array === null) {
566
- var ret = loadLocalStorage("registryCallback");
567
- if(typeof ret !== 'undefined' && ret !== null) {
568
- machines_array = JSON.parse(ret);
569
- console.log("failed to contact the registry - loaded registry data from browser local storage");
570
- }
571
- }
549
+ if(urlOptions.help !== null) {
550
+ saveLocalStorage('options.show_help', urlOptions.help);
551
+ netdataShowHelp = urlOptions.help;
552
+ }
553
+ else {
554
+ urlOptions.help = loadLocalStorage('options.show_help');
555
+ }
556
573
- if(machines_array) {
574
- saveLocalStorage("registryCallback", JSON.stringify(machines_array));
575
-
576
- var machines = machines_array.sort(function (a, b) {
577
- if (a.name > b.name) return -1;
578
- if (a.name < b.name) return 1;
579
- return 0;
580
- });
581
-
582
- var len = machines.length;
583
- while(len--) {
584
- var u = machines[len];
585
- found++;
586
- el += '<li id="registry_server_' + u.guid + '"><a class="registry_link" href="' + u.url + '" onClick="return gotoServerModalHandler(\'' + u.guid + '\');">' + u.name + '</a></li>';
587
- 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>';
588
- }
557
+ // --------------------------------------------------------------------
558
+ // registry call back to render my-netdata menu
559
+
560
+ var netdataRegistryCallback = function(machines_array) {
561
+ var el = '';
562
+ var a1 = '';
563
+ var found = 0;
564
+
565
+ if(machines_array === null) {
566
+ var ret = loadLocalStorage("registryCallback");
567
+ if(typeof ret !== 'undefined' && ret !== null) {
568
+ machines_array = JSON.parse(ret);
569
+ console.log("failed to contact the registry - loaded registry data from browser local storage");
570
}
571
+ }
572
591
- if(!found) {
592
- if(machines)
593
- 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>';
594
- else
595
- 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>';
596
-
597
- a1 += '<li><a href="#" onClick="return false;"> </a></li>';
598
-
599
- el += '<li role="separator" class="divider"></li>' +
600
- '<li><a href="//london.netdata.rocks/default.html">EU - London (DigitalOcean.com)</a></li>' +
601
- '<li><a href="//atlanta.netdata.rocks/default.html">US - Atlanta (CDN77.com)</a></li>' +
602
- '<li><a href="//athens.netdata.rocks/default.html">EU - Athens</a></li>';
603
- a1 += '<li role="separator" class="divider"></li>' +
604
- '<li><a href="#"> </a></li>' +
605
- '<li><a href="#"> </a></li>'+
606
- '<li><a href="#"> </a></li>';
573
+ if(machines_array) {
574
+ saveLocalStorage("registryCallback", JSON.stringify(machines_array));
575
+
576
+ var machines = machines_array.sort(function (a, b) {
577
+ if (a.name > b.name) return -1;
578
+ if (a.name < b.name) return 1;
579
+ return 0;
580
+ });
581
+
582
+ var len = machines.length;
583
+ while(len--) {
584
+ var u = machines[len];
585
+ found++;
586
+ el += '<li id="registry_server_' + u.guid + '"><a class="registry_link" href="' + u.url + '" onClick="return gotoServerModalHandler(\'' + u.guid + '\');">' + u.name + '</a></li>';
587
+ 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>';
588
}
589
+ }
590
609
- el += '<li role="separator" class="divider"></li>';
610
- a1 += '<li role="separator" class="divider"></li>';
591
+ if(!found) {
592
+ if(machines)
593
+ 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>';
594
+ else
595
+ 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>';
596
+
597
+ a1 += '<li><a href="#" onClick="return false;"> </a></li>';
598
+
599
+ el += '<li role="separator" class="divider"></li>' +
600
+ '<li><a href="//london.netdata.rocks/default.html">EU - London (DigitalOcean.com)</a></li>' +
601
+ '<li><a href="//atlanta.netdata.rocks/default.html">US - Atlanta (CDN77.com)</a></li>' +
602
+ '<li><a href="//athens.netdata.rocks/default.html">EU - Athens</a></li>';
603
+ a1 += '<li role="separator" class="divider"></li>' +
604
+ '<li><a href="#"> </a></li>' +
605
+ '<li><a href="#"> </a></li>'+
606
+ '<li><a href="#"> </a></li>';
607
+ }
608
612
- el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #999;" target="_blank">What is this?</a></li>';
613
- a1 += '<li><a href="#" style="color: #999;" onclick="switchRegistryModalHandler(); return false;"><i class="fa fa-sliders" aria-hidden="true" style="color: #999;"></i></a></li>'
609
+ el += '<li role="separator" class="divider"></li>';
610
+ a1 += '<li role="separator" class="divider"></li>';
611
615
- document.getElementById('mynetdata_servers').innerHTML = el;
616
- document.getElementById('mynetdata_servers2').innerHTML = el;
617
- document.getElementById('mynetdata_actions1').innerHTML = a1;
612
+ el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #999;" target="_blank">What is this?</a></li>';
613
+ a1 += '<li><a href="#" style="color: #999;" onclick="switchRegistryModalHandler(); return false;"><i class="fa fa-sliders" aria-hidden="true" style="color: #999;"></i></a></li>'
614
619
- gotoServerInit();
620
- };
615
+ document.getElementById('mynetdata_servers').innerHTML = el;
616
+ document.getElementById('mynetdata_servers2').innerHTML = el;
617
+ document.getElementById('mynetdata_actions1').innerHTML = a1;
618
622
- </script>
619
+ gotoServerInit();
620
+ };
621
+
622
+</script>
623
624
- <!-- load the dashboard manager - it will do the rest -->
625
- <script type="text/javascript" src="dashboard.js?v51"></script>
626
-</head>
624
<body data-spy="scroll" data-target="#sidebar">
625
<div id="loadOverlay" class="loadOverlay" style="background-color: #888; color: #888;">
626
netdata<br/><div style="font-size: 3vh;">Real-time performance monitoring, done right!</div>
@@ -1233,6 +1230,8 @@
1230
</div>
1231
</div>
1232
1233
+<!-- load the dashboard manager - it will do the rest -->
1234
+<script type="text/javascript" src="dashboard.js?v51"></script>
1235
<script type="text/javascript">
1236
var this_is_demo = null;
1237
function isdemo() {
web/netdata-swagger.json
+1
-1
@@ -5,7 +5,7 @@
5
"description": "Real time data collection and graphs...",
6
"version": "1.2.1_master"
7
},
8
- "host": "netdata.firehol.org",
8
+ "host": "registry.my-netdata.io",
9
"schemes": [
10
"http"
11
],
web/netdata-swagger.yaml
+1
-1
@@ -3,7 +3,7 @@ info:
3
title: NetData API
4
description: 'Real time data collection and graphs...'
5
version: 1.2.1_master
6
-host: netdata.firehol.org
6
+host: registry.my-netdata.io
7
schemes:
8
- http
9
basePath: /api/v1
web/registry.html
+137
-138
@@ -18,144 +18,6 @@
18
<meta property="og:site_name" content="netdata"/>
19
<meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
20
<meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
21
-
22
- <script>
23
- // this section has to appear before loading dashboard.js
24
-
25
- // Select a theme.
26
- // uncomment on of the two themes:
27
-
28
- // var netdataTheme = 'default'; // this is white
29
- var netdataTheme = 'slate'; // this is dark
30
-
31
-
32
- // Set the default netdata server.
33
- // on charts without a 'data-host', this one will be used.
34
- // the default is the server that dashboard.js is downloaded from.
35
-
36
- // var netdataServer = 'http://my.server:19999/';
37
-
38
- function registryGotoServer(guid) {
39
- console.log('goto server: ' + guid);
40
- }
41
-
42
- function registryAddServer(u) {
43
- return '<div id="registry_server_' + u.guid + '" class="registry-server-container" onClick="registryGotoServer(\'' + u.guid + '\'); return false;">'
44
- + '<div class="registry-server-name">' + u.name + '</div>'
45
- + '<div data-netdata="system.cpu"'
46
- + ' data-host="' + u.url + '"'
47
- + ' data-chart-library="sparkline"'
48
- + ' data-sparkline-chartrangemin="0"'
49
- + ' data-sparkline-chartrangemax="100"'
50
- + ' data-sparkline-chartrangeclip="true"'
51
- + ' data-sparkline-disabletooltips="true"'
52
- + ' data-sparkline-disableinteraction="true"'
53
- + ' data-sparkline-disablehighlight="true"'
54
- + ' data-sparkline-linecolor="#444"'
55
- + ' data-sparkline-spotcolor="disable"'
56
- + ' data-sparkline-minspotcolor="disable"'
57
- + ' data-sparkline-maxspotcolor="disable"'
58
- + ' data-width="100%"'
59
- + ' data-height="20px"'
60
- + ' data-after="-200"'
61
- + '></div>'
62
- + '</div>';
63
- }
64
-
65
- var netdataRegistryCallback = function(machines_array) {
66
- var el = '';
67
- var a1 = '';
68
- var found = 0;
69
-
70
- if(machines_array) {
71
- function name_comparator_desc(a, b) {
72
- if (a.name > b.name) return -1;
73
- if (a.name < b.name) return 1;
74
- return 0;
75
- }
76
-
77
- var machines = machines_array.sort(name_comparator_desc);
78
- var len = machines.length;
79
- while(len--) {
80
- var u = machines[len];
81
-
82
- var status = "enabled";
83
- found++;
84
-
85
- if(u.guid === NETDATA.registry.machine_guid)
86
- status = "disabled"
87
-
88
- el += registryAddServer(u);
89
- 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>';
90
- }
91
- }
92
-
93
- if(!found) {
94
- if(machines)
95
- 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
- else
97
- 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
-
99
- a1 += '<li><a href="#"> </a></li>';
100
-
101
- el += '<li role="separator" class="divider"></li>' +
102
- '<li><a href="//london.netdata.rocks/default.html">EU - London (DigitalOcean.com)</a></li>' +
103
- '<li><a href="//atlanta.netdata.rocks/default.html">US - Atlanta (CDN77.com)</a></li>' +
104
- '<li><a href="//athens.netdata.rocks/default.html">EU - Athens</a></li>';
105
- a1 += '<li role="separator" class="divider"></li>' +
106
- '<li><a href="#"> </a></li>' +
107
- '<li><a href="#"> </a></li>'+
108
- '<li><a href="#"> </a></li>';
109
- }
110
-
111
- el += '<li role="separator" class="divider"></li>';
112
- a1 += '<li role="separator" class="divider"></li>';
113
-
114
- el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #999;" target="_blank">What is this?</a></li>';
115
- 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
-
117
- document.getElementById('mynetdata_servers').innerHTML = el;
118
- //document.getElementById('mynetdata_servers2').innerHTML = el;
119
- //document.getElementById('mynetdata_actions1').innerHTML = a1;
120
- NETDATA.updatedDom();
121
- };
122
- </script>
123
-
124
- <!--
125
- Load dashboard.js
126
-
127
- to host this HTML file on your web server,
128
- you have to load dashboard.js from the netdata server.
129
-
130
- So, pick one the two below
131
- If you pick the first, set the server name/IP.
132
-
133
- The second assumes you host this file on /usr/share/netdata/web
134
- and that you have chown it to be owned by netdata:netdata
135
- -->
136
- <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
137
- <script type="text/javascript" src="dashboard.js?v51"></script>
138
-
139
- <script>
140
- // Set options for TV operation
141
- // This has to be done, after dashboard.js is loaded
142
-
143
- // destroy charts not shown (lowers memory on the browser)
144
- NETDATA.options.current.destroy_on_hide = true;
145
-
146
- // set this to false, to always show all dimensions
147
- NETDATA.options.current.eliminate_zero_dimensions = true;
148
-
149
- // lower the pressure on this browser
150
- NETDATA.options.current.concurrent_refreshes = true;
151
-
152
- // if the tv browser is too slow (a pi?)
153
- // set this to false
154
- NETDATA.options.current.parallel_refresher = true;
155
-
156
- // always update the charts, even if focus is lost
157
- // NETDATA.options.current.stop_updates_when_focus_is_lost = false;
158
- </script>
21
22
<style>
23
.registry-container {
@@ -192,6 +54,143 @@
54
}
55
</style>
56
</head>
57
+<script>
58
+// this section has to appear before loading dashboard.js
59
+
60
+// Select a theme.
61
+// uncomment on of the two themes:
62
+
63
+// var netdataTheme = 'default'; // this is white
64
+var netdataTheme = 'slate'; // this is dark
65
+
66
+
67
+// Set the default netdata server.
68
+// on charts without a 'data-host', this one will be used.
69
+// the default is the server that dashboard.js is downloaded from.
70
+
71
+// var netdataServer = 'http://my.server:19999/';
72
+
73
+function registryGotoServer(guid) {
74
+ console.log('goto server: ' + guid);
75
+}
76
+
77
+function registryAddServer(u) {
78
+ return '<div id="registry_server_' + u.guid + '" class="registry-server-container" onClick="registryGotoServer(\'' + u.guid + '\'); return false;">'
79
+ + '<div class="registry-server-name">' + u.name + '</div>'
80
+ + '<div data-netdata="system.cpu"'
81
+ + ' data-host="' + u.url + '"'
82
+ + ' data-chart-library="sparkline"'
83
+ + ' data-sparkline-chartrangemin="0"'
84
+ + ' data-sparkline-chartrangemax="100"'
85
+ + ' data-sparkline-chartrangeclip="true"'
86
+ + ' data-sparkline-disabletooltips="true"'
87
+ + ' data-sparkline-disableinteraction="true"'
88
+ + ' data-sparkline-disablehighlight="true"'
89
+ + ' data-sparkline-linecolor="#444"'
90
+ + ' data-sparkline-spotcolor="disable"'
91
+ + ' data-sparkline-minspotcolor="disable"'
92
+ + ' data-sparkline-maxspotcolor="disable"'
93
+ + ' data-width="100%"'
94
+ + ' data-height="20px"'
95
+ + ' data-after="-200"'
96
+ + '></div>'
97
+ + '</div>';
98
+}
99
+
100
+var netdataRegistryCallback = function(machines_array) {
101
+ var el = '';
102
+ var a1 = '';
103
+ var found = 0;
104
+
105
+ if(machines_array) {
106
+ function name_comparator_desc(a, b) {
107
+ if (a.name > b.name) return -1;
108
+ if (a.name < b.name) return 1;
109
+ return 0;
110
+ }
111
+
112
+ var machines = machines_array.sort(name_comparator_desc);
113
+ var len = machines.length;
114
+ while(len--) {
115
+ var u = machines[len];
116
+
117
+ var status = "enabled";
118
+ found++;
119
+
120
+ if(u.guid === NETDATA.registry.machine_guid)
121
+ status = "disabled"
122
+
123
+ el += registryAddServer(u);
124
+ 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>';
125
+ }
126
+ }
127
+
128
+ if(!found) {
129
+ if(machines)
130
+ 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>';
131
+ else
132
+ 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>';
133
+
134
+ a1 += '<li><a href="#"> </a></li>';
135
+
136
+ el += '<li role="separator" class="divider"></li>' +
137
+ '<li><a href="//london.netdata.rocks/default.html">EU - London (DigitalOcean.com)</a></li>' +
138
+ '<li><a href="//atlanta.netdata.rocks/default.html">US - Atlanta (CDN77.com)</a></li>' +
139
+ '<li><a href="//athens.netdata.rocks/default.html">EU - Athens</a></li>';
140
+ a1 += '<li role="separator" class="divider"></li>' +
141
+ '<li><a href="#"> </a></li>' +
142
+ '<li><a href="#"> </a></li>'+
143
+ '<li><a href="#"> </a></li>';
144
+ }
145
+
146
+ el += '<li role="separator" class="divider"></li>';
147
+ a1 += '<li role="separator" class="divider"></li>';
148
+
149
+ el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #999;" target="_blank">What is this?</a></li>';
150
+ 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>'
151
+
152
+ document.getElementById('mynetdata_servers').innerHTML = el;
153
+ //document.getElementById('mynetdata_servers2').innerHTML = el;
154
+ //document.getElementById('mynetdata_actions1').innerHTML = a1;
155
+ NETDATA.updatedDom();
156
+};
157
+</script>
158
+
159
+<!--
160
+ Load dashboard.js
161
+
162
+ to host this HTML file on your web server,
163
+ you have to load dashboard.js from the netdata server.
164
+
165
+ So, pick one the two below
166
+ If you pick the first, set the server name/IP.
167
+
168
+ The second assumes you host this file on /usr/share/netdata/web
169
+ and that you have chown it to be owned by netdata:netdata
170
+-->
171
+<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
172
+<script type="text/javascript" src="dashboard.js?v51"></script>
173
+
174
+<script>
175
+// Set options for TV operation
176
+// This has to be done, after dashboard.js is loaded
177
+
178
+// destroy charts not shown (lowers memory on the browser)
179
+NETDATA.options.current.destroy_on_hide = true;
180
+
181
+// set this to false, to always show all dimensions
182
+NETDATA.options.current.eliminate_zero_dimensions = true;
183
+
184
+// lower the pressure on this browser
185
+NETDATA.options.current.concurrent_refreshes = true;
186
+
187
+// if the tv browser is too slow (a pi?)
188
+// set this to false
189
+NETDATA.options.current.parallel_refresher = true;
190
+
191
+// always update the charts, even if focus is lost
192
+// NETDATA.options.current.stop_updates_when_focus_is_lost = false;
193
+</script>
194
<body>
195
196
<div id="mynetdata_servers" class="registry-container" onscroll="NETDATA.onscroll();">
web/tv.html
+57
-58
@@ -19,70 +19,69 @@
19
<meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
20
<meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
21
22
- <script>
23
- // this section has to appear before loading dashboard.js
22
+</head>
23
+<script>
24
+// this section has to appear before loading dashboard.js
25
25
- // Select a theme.
26
- // uncomment on of the two themes:
26
+// Select a theme.
27
+// uncomment on of the two themes:
28
28
- // var netdataTheme = 'default'; // this is white
29
- var netdataTheme = 'slate'; // this is dark
29
+// var netdataTheme = 'default'; // this is white
30
+var netdataTheme = 'slate'; // this is dark
31
32
32
- // Set the default netdata server.
33
- // on charts without a 'data-host', this one will be used.
34
- // the default is the server that dashboard.js is downloaded from.
33
+// Set the default netdata server.
34
+// on charts without a 'data-host', this one will be used.
35
+// the default is the server that dashboard.js is downloaded from.
36
36
- // var netdataServer = 'http://my.server:19999/';
37
- </script>
37
+// var netdataServer = 'http://my.server:19999/';
38
+</script>
39
39
- <!--
40
- Load dashboard.js
40
+<!--
41
+ Load dashboard.js
42
42
- to host this HTML file on your web server,
43
- you have to load dashboard.js from the netdata server.
43
+ to host this HTML file on your web server,
44
+ you have to load dashboard.js from the netdata server.
45
45
- So, pick one the two below
46
- If you pick the first, set the server name/IP.
46
+ So, pick one the two below
47
+ If you pick the first, set the server name/IP.
48
48
- The second assumes you host this file on /usr/share/netdata/web
49
- and that you have chown it to be owned by netdata:netdata
50
- -->
51
- <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
52
- <script type="text/javascript" src="dashboard.js?v51"></script>
49
+ The second assumes you host this file on /usr/share/netdata/web
50
+ and that you have chown it to be owned by netdata:netdata
51
+-->
52
+<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
53
+<script type="text/javascript" src="dashboard.js?v51"></script>
54
54
- <script>
55
- // Set options for TV operation
56
- // This has to be done, after dashboard.js is loaded
55
+<script>
56
+// Set options for TV operation
57
+// This has to be done, after dashboard.js is loaded
58
58
- // destroy charts not shown (lowers memory on the browser)
59
- NETDATA.options.current.destroy_on_hide = true;
60
-
61
- // set this to false, to always show all dimensions
62
- NETDATA.options.current.eliminate_zero_dimensions = true;
63
-
64
- // lower the pressure on this browser
65
- NETDATA.options.current.concurrent_refreshes = false;
59
+// destroy charts not shown (lowers memory on the browser)
60
+NETDATA.options.current.destroy_on_hide = true;
61
67
- // if the tv browser is too slow (a pi?)
68
- // set this to false
69
- NETDATA.options.current.parallel_refresher = true;
62
+// set this to false, to always show all dimensions
63
+NETDATA.options.current.eliminate_zero_dimensions = true;
64
71
- // always update the charts, even if focus is lost
72
- // NETDATA.options.current.stop_updates_when_focus_is_lost = false;
65
+// lower the pressure on this browser
66
+NETDATA.options.current.concurrent_refreshes = false;
67
74
- // Since you may render charts from many servers and any of them may
75
- // become offline for some time, the charts will break.
76
- // This will reload the page every RELOAD_EVERY minutes
68
+// if the tv browser is too slow (a pi?)
69
+// set this to false
70
+NETDATA.options.current.parallel_refresher = true;
71
78
- var RELOAD_EVERY = 5;
79
- setTimeout(function(){
80
- location.reload();
81
- }, RELOAD_EVERY * 60 * 1000);
72
+// always update the charts, even if focus is lost
73
+// NETDATA.options.current.stop_updates_when_focus_is_lost = false;
74
83
- </script>
75
+// Since you may render charts from many servers and any of them may
76
+// become offline for some time, the charts will break.
77
+// This will reload the page every RELOAD_EVERY minutes
78
85
-</head>
79
+var RELOAD_EVERY = 5;
80
+setTimeout(function(){
81
+ location.reload();
82
+}, RELOAD_EVERY * 60 * 1000);
83
+
84
+</script>
85
<body>
86
87
<div style="width: 100%; text-align: center; display: inline-block;">
@@ -94,8 +93,8 @@
93
<div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
94
<br/>
95
<div data-netdata="system.cpu"
97
- data-host="http://netdata.firehol.org"
98
- data-title="CPU usage of netdata.firehol.org"
96
+ data-host="http://registry.my-netdata.io"
97
+ data-title="CPU usage of registry.my-netdata.io"
98
data-chart-library="dygraph"
99
data-width="49%"
100
data-height="100%"
@@ -118,8 +117,8 @@
117
</div>
118
<div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
119
<div data-netdata="system.io"
121
- data-host="http://netdata.firehol.org"
122
- data-title="I/O on netdata.firehol.org"
120
+ data-host="http://registry.my-netdata.io"
121
+ data-title="I/O on registry.my-netdata.io"
122
data-chart-library="dygraph"
123
data-width="49%"
124
data-height="100%"
@@ -142,8 +141,8 @@
141
</div>
142
<div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
143
<div data-netdata="system.ipv4"
145
- data-host="http://netdata.firehol.org"
146
- data-title="IPv4 traffic on netdata.firehol.org"
144
+ data-host="http://registry.my-netdata.io"
145
+ data-title="IPv4 traffic on registry.my-netdata.io"
146
data-chart-library="dygraph"
147
data-width="49%"
148
data-height="100%"
@@ -165,10 +164,10 @@
164
</div>
165
<div style="width: 100%; max-height: calc(100% - 15px); text-align: center; display: inline-block;">
166
<div style="width: 49%; height:100%; align: center; display: inline-block;">
168
- netdata.firehol.org
167
+ registry.my-netdata.io
168
<br/>
169
<div data-netdata="netdata.requests"
171
- data-host="http://netdata.firehol.org"
170
+ data-host="http://registry.my-netdata.io"
171
data-title="Chart Refreshes/s"
172
data-chart-library="gauge"
173
data-width="20%"
@@ -177,7 +176,7 @@
176
data-points="300"
177
></div>
178
<div data-netdata="netdata.clients"
180
- data-host="http://netdata.firehol.org"
179
+ data-host="http://registry.my-netdata.io"
180
data-title="Sockets"
181
data-chart-library="gauge"
182
data-width="20%"
@@ -188,7 +187,7 @@
187
></div>
188
<div data-netdata="netdata.net"
189
data-dimensions="in"
191
- data-host="http://netdata.firehol.org"
190
+ data-host="http://registry.my-netdata.io"
191
data-title="Requests Traffic"
192
data-chart-library="easypiechart"
193
data-width="15%"
@@ -198,7 +197,7 @@
197
></div>
198
<div data-netdata="netdata.net"
199
data-dimensions="out"
201
- data-host="http://netdata.firehol.org"
200
+ data-host="http://registry.my-netdata.io"
201
data-title="Chart Data Traffic"
202
data-chart-library="easypiechart"
203
data-width="15%"