1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
|
<!DOCTYPE html>
<html lang="en">
<head>
<title>netdata dashboard</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="author" content="costa@tsaousis.gr">
<link rel="shortcut icon" href="images/seo-performance-multi-size.ico">
<link rel="apple-touch-icon" href="images/seo-performance-72.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/seo-performance-72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/seo-performance-114.png">
<link rel="icon" type="image/png" sizes="512x512" href="images/seo-performance-512.png">
<link rel="icon" type="image/png" sizes="256x256" href="images/seo-performance-256.png">
<link rel="icon" type="image/png" sizes="128x128" href="images/seo-performance-128.png">
<link rel="icon" type="image/png" sizes="64x64" href="images/seo-performance-64.png">
<link rel="icon" type="image/png" sizes="48x48" href="images/seo-performance-48.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/seo-performance-32.png">
<link rel="icon" type="image/png" sizes="24x24" href="images/seo-performance-24.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/seo-performance-16.png">
<style>
/* prevent body from hiding under the navbar */
body {
padding-top: 50px;
}
.modal-wide .modal-dialog {
width: 80%;
}
/* fix # anchors scrolling under the navbar
https://github.com/twbs/bootstrap/issues/1768#issuecomment-46519033
*/
h1 {
position: relative;
z-index: -1;
}
h2 {
position: relative;
z-index: -2;
}
h1:before, h2:before {
display: block;
content: " ";
margin-top: -70px;
height: 70px;
visibility: hidden;
}
.p {
display: block;
margin-top: 15px;
}
.option-row,
.option-control {
vertical-align: top;
padding: 10px;
padding-top: 30px;
padding-left: 30px;
}
.option-info {
padding: 10px;
}
.chart-message {
display: block;
margin-top: 10px;
}
.container {
width: 90% !important;
}
#masthead h1 {
/*font-size: 30px;*/
line-height: 1;
padding-top: 30px;
}
#masthead .well {
margin-top:4%;
}
/* fix the navbar shifting when a modal is open */
/* https://github.com/twbs/bootstrap/issues/14040#issuecomment-159891033 */
body.modal-open{
width: 100% !important;
padding-right: 0 !important;
/* overflow-y: scroll !important; */
/* position: fixed !important;*/
overflow: visible;
}
/*
* Side navigation
*
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
* sections of docs content.
*/
.affix {
position: static;
top: 70px !important;
/*width: 220px;*/
}
.affix-top {
/*width: 220px;*/
}
.dashboard-sidebar {
max-height: calc(100% - 70px) !important;
overflow-y: auto;
/*width: 220px !important;*/
}
/* By default it's not affixed in mobile views, so undo that */
.dashboard-sidebar.affix {
position: static;
}
@media (min-width: 768px) {
.dashboard-sidebar {
padding-left: 20px;
}
}
/* First level of nav */
.dashboard-sidenav {
margin-top: 20px;
margin-bottom: 20px;
}
/* All levels of nav */
.dashboard-sidebar .nav > li > a {
display: block;
padding: 4px 20px;
font-size: 13px;
font-weight: 500;
color: #767676;
}
.dashboard-sidebar .nav > li > a:hover,
.dashboard-sidebar .nav > li > a:focus {
padding-left: 19px;
color: #563d7c;
text-decoration: none;
background-color: transparent;
border-left: 1px solid #563d7c;
}
.dashboard-sidebar .nav > .active > a,
.dashboard-sidebar .nav > .active:hover > a,
.dashboard-sidebar .nav > .active:focus > a {
padding-left: 18px;
font-weight: bold;
color: #563d7c;
background-color: transparent;
border-left: 2px solid #563d7c;
}
/* Nav: second level (shown on .active) */
.dashboard-sidebar .nav .nav {
display: none; /* Hide by default, but at >768px, show it */
padding-bottom: 10px;
}
.dashboard-sidebar .nav .nav > li > a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 30px;
font-size: 12px;
font-weight: normal;
}
.dashboard-sidebar .nav .nav > li > a:hover,
.dashboard-sidebar .nav .nav > li > a:focus {
padding-left: 29px;
}
.dashboard-sidebar .nav .nav > .active > a,
.dashboard-sidebar .nav .nav > .active:hover > a,
.dashboard-sidebar .nav .nav > .active:focus > a {
padding-left: 28px;
font-weight: 500;
}
.dropdown-menu {
min-width: 200px;
}
.dropdown-menu.columns-2 {
margin: 0;
padding: 0;
width: 400px;
}
.dropdown-menu li a {
padding: 5px 15px;
font-weight: 300;
}
.dropdown-menu.multi-column {
overflow-x: hidden;
}
.multi-column-dropdown {
list-style: none;
padding: 0;
}
.multi-column-dropdown li a {
display: block;
clear: both;
line-height: 1.428571429;
white-space: normal;
}
.multi-column-dropdown li a:hover {
text-decoration: none;
color: #f5f5f5;
background-color: #262626;
}
.scrollable-menu {
height: auto;
max-height: 80vh;
overflow-x: hidden;
}
/* Back to top (hidden on mobile) */
.back-to-top,
.dashboard-theme-toggle {
display: none;
padding: 4px 10px;
margin-top: 10px;
margin-left: 10px;
font-size: 12px;
font-weight: 500;
color: #999;
}
.back-to-top:hover,
.dashboard-theme-toggle:hover {
color: #563d7c;
text-decoration: none;
}
.dashboard-theme-toggle {
margin-top: 0;
}
@media (min-width: 768px) {
.back-to-top,
.dashboard-theme-toggle {
display: block;
}
/* Widen the fixed sidebar */
.dashboard-sidebar.affix,
.dashboard-sidebar.affix-top,
.dashboard-sidebar.affix-bottom {
width: 200px !important;
}
.dashboard-sidebar.affix {
position: fixed; /* Undo the static from mobile first approach */
top: 20px;
}
.dashboard-sidebar.affix-bottom {
position: absolute; /* Undo the static from mobile first approach */
}
.dashboard-sidebar.affix-bottom .dashboard-sidenav,
.dashboard-sidebar.affix .dashboard-sidenav {
margin-top: 0;
margin-bottom: 0;
}
}
/* Show and affix the side nav when space allows it */
@media (min-width: 992px) {
.dashboard-sidebar .nav > .active > ul {
display: block;
}
/* Widen the fixed sidebar */
.dashboard-sidebar.affix,
.dashboard-sidebar.affix-top,
.dashboard-sidebar.affix-bottom {
width: 200px !important;
}
.dashboard-sidebar.affix {
position: fixed; /* Undo the static from mobile first approach */
top: 20px;
}
.dashboard-sidebar.affix-bottom {
position: absolute; /* Undo the static from mobile first approach */
}
.dashboard-sidebar.affix-bottom .dashboard-sidenav,
.dashboard-sidebar.affix .dashboard-sidenav {
margin-top: 0;
margin-bottom: 0;
}
}
@media (min-width: 1200px) {
/* Widen the fixed sidebar again */
.dashboard-sidebar.affix-bottom,
.dashboard-sidebar.affix-top,
.dashboard-sidebar.affix {
width: 263px;
}
}
</style>
<!-- you can set your netdata server globally, by ucommenting this -->
<!-- you can also give a different server per chart, with the attribute: data-host="http://netdata.server:19999" -->
<!-- <script> netdataServer = "http://box:19999"; </script> -->
<!-- check which theme to use -->
<script>
function loadLocalStorage(name) {
var ret = null;
try {
if(typeof Storage !== "undefined" && typeof localStorage === 'object')
ret = localStorage.getItem(name);
}
catch(error) {
;
}
if(typeof ret === 'undefined' || ret === null)
return null;
return ret;
}
function saveLocalStorage(name, value) {
try {
if(typeof Storage !== "undefined" && typeof localStorage === 'object') {
localStorage.setItem(name, value.toString());
return true;
}
}
catch(error) {
;
}
return false;
}
function getTheme(def) {
var ret = loadLocalStorage('netdataTheme');
if(typeof ret === 'undefined' || ret === null || ret === 'undefined')
return def;
else
return ret;
}
var netdataTheme = getTheme('slate');
function setTheme(theme) {
if(theme === netdataTheme) return false;
return saveLocalStorage('netdataTheme', theme);
}
var netdataRegistryCallback = function(urls_array) {
var el = '';
var a1 = '';
var found = 0;
if(urls_array) {
function name_comparator_desc(a, b) {
if (a.name > b.name) return -1;
if (a.name < b.name) return 1;
return 0;
}
var urls = urls_array.sort(name_comparator_desc);
var len = urls.length;
while(len--) {
var u = urls[len];
var status = "enabled";
found++;
if(u.guid === NETDATA.registry.machine_guid)
status = "disabled"
el += '<li id="registry_server_' + u.guid + '" class="' + status + '"><a href="' + u.url + '">' + u.name + '</a></li>';
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(urls)
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="#"> </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="#"> </a></li>' +
'<li><a href="#"> </a></li>'+
'<li><a href="#"> </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;
};
</script>
<!-- load the dashboard manager - it will do the rest -->
<script type="text/javascript" src="dashboard.js?v37"></script>
</head>
<body data-spy="scroll" data-target="#sidebar">
<nav class="navbar navbar-default navbar-fixed-top" role="banner">
<div class="container">
<nav id="mynetdata_nav" class="collapse navbar-collapse navbar-left hidden-sm hidden-xs" role="navigation" style="padding-right: 20px;">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="current_view">my-netdata <strong class="caret"></strong></a>
<ul class="dropdown-menu scrollable-menu inpagemenu multi-column columns-2" role="menu">
<div class="row">
<div class="col-sm-6" style="width: 85%; padding-right: 0;">
<ul id="mynetdata_servers" class="multi-column-dropdown">
<li><a href="#" onclck="return false;" style="color: #999;">loading...</a></li>
</ul>
</div>
<div class="col-sm-3 hidden-xs" style="width: 15%; padding-left: 0;">
<ul id="mynetdata_actions1" class="multi-column-dropdown">
<li style="color: #999;"> </li>
</ul>
</div>
</div>
</ul>
</li>
</ul>
</nav>
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/" class="navbar-brand" id="hostname">netdata</a>
</div>
<nav class="collapse navbar-collapse navbar-right" role="navigation">
<ul class="nav navbar-nav">
<li class="hidden-sm"><a href="#" class="btn" data-toggle="modal" data-target="#optionsModal"><i class="fa fa-cog"></i> settings</a></li>
<li class="hidden-sm"><a href="https://github.com/firehol/netdata/wiki" class="btn" target="_blank"><i class="fa fa-github"></i> community</a></li>
<li class="hidden-sm" id="updateButton"><a href="#" class="btn" data-toggle="modal" data-target="#updateModal"><i class="fa fa-cloud-download"></i> update</a></li>
<li class="hidden-sm"><a href="#" class="btn" data-toggle="modal" data-target="#helpModal"><i class="fa fa-question-circle"></i> help</a></li>
<li class="dropdown hidden-md hidden-lg hidden-xs">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="current_view">Menu <strong class="caret"></strong></a>
<ul class="dropdown-menu scrollable-menu inpagemenu" role="menu">
<li><a href="#" class="btn" data-toggle="modal" data-target="#optionsModal"><i class="fa fa-cog"></i> settings</a></li>
<li><a href="https://github.com/firehol/netdata/wiki" class="btn" target="_blank"><i class="fa fa-github"></i> community</a></li>
<li><a href="#" class="btn" data-toggle="modal" data-target="#helpModal"><i class="fa fa-question-circle"></i> help</a></li>
</ul>
</li>
<li class="dropdown hidden-sm hidden-md hidden-lg">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="current_view">my-netdata <strong class="caret"></strong></a>
<ul id="mynetdata_servers2" class="dropdown-menu scrollable-menu inpagemenu" role="menu">
<li><a href="#" onclck="return false;" style="color: #999;">loading...</a></li>
</ul>
</li>
</ul>
</nav>
</nav>
</div>
</nav>
<div id="masthead" style="display: none;">
<div class="container">
<div class="row">
<div class="col-md-7">
<h1>Netdata
<p class="lead">Real-time performance monitoring, in the greatest possible detail</p>
</h1>
</div>
<div class="col-md-5">
<div class="well well-lg">
<div class="row">
<div class="col-md-6">
<b>Drag</b> charts to pan.
<b>Shift + wheel</b> on them, to zoom in and out.
<b>Double-click</b> on them, to reset.
<b>Hover</b> on them too!
</div>
<div class="col-md-6">
<div data-netdata="system.intr" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-dygraph-type="line" data-dygraph-strokewidth="3" data-dygraph-smooth="true" data-dygraph-highlightcirclesize="6" data-after="-90" data-height="60px" data-colors="#C66"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-10" role="main">
<div id="charts_div"></div>
</div>
<div class="col-md-2" role="complementary">
<nav class="dashboard-sidebar hidden-print hidden-xs hidden-sm" id="sidebar" role="menu"></nav>
</div>
</div>
</div>
<div id="footer" class="container" style="display: none;">
<div class="row">
<div class="col-md-10" role="main">
<div class="p">
<big><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></big><br/>
<i class="fa fa-copyright"></i> Copyright 2016, Costa Tsaousis.<br/>
Released under <a href="http://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank">GPL v3 or later</a>.<br/>
</div>
<div class="p">
<small>
<a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a> re-distributes these software tools:
<i class="fa fa-circle"></i> The excellent <a href="http://dygraphs.com/" target="_blank">Dygraphs.com</a> web chart library,
<i class="fa fa-copyright"></i> Copyright 2009, Dan Vanderkam, <a href="http://dygraphs.com/legal.html" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="http://omnipotent.net/jquery.sparkline/" target="_blank">jQuery Sparklines</a> web chart library,
<i class="fa fa-copyright"></i> Copyright 2009-2012, Splunk Inc., <a href="http://opensource.org/licenses/BSD-3-Clause" target="_blank">New BSD License</a>
<i class="fa fa-circle"></i> <a href="http://benpickles.github.io/peity/" target="_blank">Peity</a> web chart library,
<i class="fa fa-copyright"></i> Copyright 2009-2015, Ben Pickles, <a href="https://github.com/benpickles/peity/blob/master/MIT-LICENCE" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="https://rendro.github.io/easy-pie-chart/" target="_blank">Easy Pie Chart</a> web chart library,
<i class="fa fa-copyright"></i> Copyright 2013, Robert Fleischmann, <a href="https://github.com/rendro/easy-pie-chart/blob/master/LICENSE" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="http://bernii.github.io/gauge.js/" target="_blank">Gauge.js</a> web chart library,
<i class="fa fa-copyright"></i> Copyright, Bernard Kobos, <a href="http://bernii.github.io/gauge.js/" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="https://jquery.org/" target="_blank">jQuery</a>,
<i class="fa fa-copyright"></i> Copyright 2015, jQuery Foundation, <a href="https://jquery.org/license/" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="http://getbootstrap.com/getting-started/" target="_blank">Bootstrap</a>,
<i class="fa fa-copyright"></i> Copyright 2015, Twitter, <a href="http://getbootstrap.com/getting-started/#license-faqs" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="http://www.bootstraptoggle.com/" target="_blank">Bootstrap Toggle</a>,
<i class="fa fa-copyright"></i> Copyright (c) 2011-2014 Min Hur, The New York Times Company, <a href="https://github.com/minhur/bootstrap-toggle/blob/master/LICENSE" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="https://jamesflorentino.github.io/nanoScrollerJS/" target="_blank">NanoScroller</a>,
<i class="fa fa-copyright"></i> Copyright 2012, James Florentino, <a href="https://github.com/jamesflorentino/nanoScrollerJS/blob/master/LICENSE" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="https://github.com/marcj/css-element-queries" target="_blank">CSS Element Queries</a>,
<i class="fa fa-copyright"></i> Copyright Marc J. Schmidt, <a href="https://github.com/marcj/css-element-queries/blob/master/LICENSE" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="https://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome</a>,
<i class="fa fa-copyright"></i> Created by Dave Gandy, Font: <a href="http://scripts.sil.org/OFL" target="_blank">SIL OFL 1.1 License</a>, CSS: <a href="http://opensource.org/licenses/mit-license.html" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="http://www.iconsdb.com/soylent-red-icons/seo-performance-icon.html" target="_blank">IconsDB.com Icons</a>, Icons provided as CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
<i class="fa fa-circle"></i> <a href="http://morrisjs.github.io/morris.js/" target="_blank">morris.js</a>,
<i class="fa fa-copyright"></i> Copyright 2013, Olly Smith, <a href="http://morrisjs.github.io/morris.js/" target="_blank">Simplified BSD License</a>
<i class="fa fa-circle"></i> <a href="http://raphaeljs.com/" target="_blank">Raphaël</a>,
<i class="fa fa-copyright"></i> Copyright 2008, Dmitry Baranovskiy, <a href="http://raphaeljs.com/license.html" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="http://C3js.org/" target="_blank">C3</a>,
<i class="fa fa-copyright"></i> Copyright 2013, Masayuki Tanaka, <a href="https://github.com/masayuki0812/c3/blob/master/LICENSE" target="_blank">MIT License</a>
<i class="fa fa-circle"></i> <a href="http://D3js.org/" target="_blank">D3</a>,
<i class="fa fa-copyright"></i> Copyright 2015, Mike Bostock, <a href="http://opensource.org/licenses/BSD-3-Clause" target="_blank">BSD License</a>
</small>
</div>
</div>
</div>
</div>
<div class="modal fade" id="welcomeModal" tabindex="-1" role="dialog" aria-labelledby="welcomeModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="welcomeModalLabel">Welcome!</h4>
</div>
<div class="modal-body">
<div class="p">
<b><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></b> is the fastest way to visualize metrics. It is a resource efficient, highly optimized system for collecting and visualizing any type of real-time time series data, from CPU usage, disk activity, SQL queries, API calls, web site visitors, etc.
</div>
<div class="p">
<b><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></b> tries to visualize the truth of <b>now</b>, in its <b>greatest detail</b>, so that you can get insights of what is happening now and what just happened, on your systems and applications.
</div>
<div class="p">
To make a chart in <b><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></b>, you just need a <b>number</b>. Just a number you can read somehow. <b><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></b> will turn this number to a real time, interactive, web chart. For collecting these numbers, it supports <a href="https://github.com/firehol/netdata/wiki/External-Plugins" target="_blank">external plugins</a>, even <a href="https://github.com/firehol/netdata/wiki/General-Info---charts.d" target="_blank">shell</a> or <a href="https://github.com/firehol/netdata/wiki/General-Info---charts.d" target="_blank">node.js</a> plugins. Any computer program, in any language, that can print a few lines of text on its standard output, can be a netdata data collector.
</div>
<div class="p">
<b><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></b> can embed charts everywhere, like this one <div data-netdata="system.cpu" data-dimensions="system" data-after="-120" data-width="25%" data-height="15px" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-show-value-of-system-at="system.cpu.system.modal.1"></div> (my CPU system usage which is <span id="system.cpu.system.modal.1" style="display: inline-block; width: 40px; text-align: right;"></span>%),
or this one <div data-netdata="ipv4.tcppackets" data-dimensions="received" data-after="-120" data-width="25%" data-height="15px" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-show-value-of-received-at="ipv4.tcppackets.received.modal.1"></div> (my IPv4 received TCP packets, which are <span id="ipv4.tcppackets.received.modal.1" style="display: inline-block; width: 60px; text-align: right;"></span>/second).
</div>
<div class="p">
You can have <b><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></b> charts on your site too. Just give it a <code>div</code> and a real time chart, zoomable and draggable will appear (try it even on these tiny ones - <b>drag</b> them to pan horizontally, <b>shift + drag</b> to zoom in, on <b>chrome shift + mouse wheel</b> to zoom in/out, <b>double click</b> on them to reset them - don't be afraid of <b><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></b> performance - <a href="https://github.com/firehol/netdata/wiki/Performance" target="_blank">a raspberry pi 2 can sustain 300 charts updates per second</a>!).
</div>
<div class="p">
For more information please refer to the <b><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata wiki</a></b>.
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="helpModal" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="helpModalLabel">Dashboard Help</h4>
</div>
<div class="modal-body">
<h4>Dygraphs (line, area and stacked area charts)</h4>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#help_mouse" aria-controls="help_mouse" role="tab" data-toggle="tab">Mouse Interface</a></li>
<li role="presentation"><a href="#help_touch" aria-controls="help_touch" role="tab" data-toggle="tab">Touch Interface</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="help_mouse">
<div class="p">
<h4>Mouse Over / Hover</h4>
Mouse over on a chart to show, at its legend, the values for the timestamp under the mouse (the chart will also highlight the point at the chart).
<br/>
All the other visible charts will also show and highlight their values for the same timestamp.
</div>
<hr/>
<div class="p">
<h4>Drag Chart Contents</h4>
Drag the contents of a chart to pan it horizontally.
<br/>
All the charts will follow soon after you let the chart alone (this little delay is by design: it speeds up your browser and lets you focus on what you are exploring).
<br/>
Once a chart is panned, auto refreshing stops for all charts. To enable it again, <b>double click</b> a panned chart.
</div>
<hr/>
<div class="p">
<h4>Double Click</h4>
Double Click a chart to reset all the charts to their default auto-refreshing state.
</div>
<hr/>
<div class="p">
<h4>SHIFT + Drag</h4>
While pressing the shift key, click on the contents of a chart and move the mouse to select an area, to zoom in. The other charts will follow too. Zooming is performed in two phases:
<ul>
<li>The already loaded chart contents are zoomed (low resolution)</li>
<li>New data are transferred from the netdata server, to refresh the chart with possibly more detail.</li>
</ul>
Once a chart is zoomed, auto refreshing stops for all charts. To enable it again, <b>double click</b> a zoomed chart.
</div>
<hr/>
<div class="p">
<h4>SHIFT + Mouse Wheel <small>(does not work on firefox and IE/Edge)</small></h4>
While pressing the shift key and the mouse pointer is over the contents of a chart, scroll the mouse wheel to zoom in or out. This kind of zooming is aligned to center below the mouse pointer. The other charts will follow too.
<br/>
Once a chart is zoomed, auto refreshing stops for all charts. To enable it again, <b>double click</b> a zoomed chart.
</div>
<hr/>
<div class="p">
<h4>Legend Operations</h4>
Click on the label or value of a dimension, will select / un-select this dimension.
<br/>
You can press any of the SHIFT or CONTROL keys and then click on legend labels or values, to select / un-select multiple dimensions.
</div>
</div>
<div role="tabpanel" class="tab-pane" id="help_touch">
<div class="p">
<h4>Single Tap</h4>
Single Tap on the contents of a chart to show, at its legend, the values for the timestamp tapped (the chart will also highlight the point at the chart).
<br/>
All the other visible charts will also show and highlight their values for the same timestamp.
</div>
<hr/>
<div class="p">
<h4>Drag Chart Contents</h4>
Touch and Drag the contents of a chart to pan it horizontally.
<br/>
All the charts will follow soon after you let the chart alone (this little delay is by design: it speeds up your browser and lets you focus on what you are exploring).
<br/>
Once a chart is panned, auto refreshing stops for all charts. To enable it again, <b>double tap</b> a panned chart.
</div>
<hr/>
<div class="p">
<h4>Double Tap</h4>
Double tap a chart to reset all the charts to their default auto-refreshing state.
</div>
<hr/>
<div class="p">
<h4>Zoom <small>(does not work on firefox and IE/Edge)</small></h4>
With two fingers, zoom in or out.
<br/>
Once a chart is zoomed, auto refreshing stops for all charts. To enable it again, <b>double click</b> a zoomed chart.
</div>
<hr/>
<div class="p">
<h4>Legend Operations</h4>
Tap on the label or value of a dimension, will select / un-select this dimension.
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="optionsModal" tabindex="-1" role="dialog" aria-labelledby="optionsModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="optionsModalLabel">netdata dashboard options</h4>
</div>
<div class="modal-body">
<center>
<small style="color: #BBBBBB;">These are browser settings. Each viewer has its own. They do not affect the operation of your netdata server.
<br/>
Settings take effect immediately and are saved permanently to browser local storage (except the refresh on focus / always option).
<br/>
To reset all options (including charts sizes) to their defaults, click <a href="#" onclick="resetDashboardOptions(); return false;">here</a>.</small>
</center>
<div style="padding: 10px;"></div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#settings_performance" aria-controls="settings_performance" role="tab" data-toggle="tab">Performance</a></li>
<li role="presentation"><a href="#settings_sync" aria-controls="settings_sync" role="tab" data-toggle="tab">Synchronization</a></li>
<li role="presentation"><a href="#settings_visual" aria-controls="settings_visual" role="tab" data-toggle="tab">Visual</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="settings_performance">
<form id="optionsForm1" method="get" class="form-horizontal">
<div class="form-group">
<table>
<tr class="option-row">
<td class="option-control"><input id="stop_updates_when_focus_is_lost" type="checkbox" checked data-toggle="toggle" data-offstyle="danger" data-onstyle="success" data-on="On Focus" data-off="Always" data-width="110px"></td>
<td class="option-info"><strong>When to refresh the charts?</strong><br/>
<small>When set to <b>On Focus</b>, the charts will stop being updated if the page / tab does not have the focus of the user. When set to <b>Always</b>, the charts will always be refreshed. Set it to <b>On Focus</b> it to lower the CPU requirements of the browser (and extend the battery of laptops and tablets) when this page does not have your focus. Set to <b>Always</b> to work on another window (i.e. change the settings of something) and have the charts auto-refresh in this window.</small>
</td>
</tr>
<tr class="option-row">
<td class="option-control">
<input id="eliminate_zero_dimensions" type="checkbox" checked data-toggle="toggle" data-on="Non Zero" data-off="All" data-width="110px">
</td>
<td class="option-info"><strong>Which dimensions to show?</strong><br/>
<small>When set to <b>Non Zero</b>, dimensions that have all their values (within the current view) set to zero will not be transferred from the netdata server (except if all dimensions of the chart are zero, in which case this setting does nothing - all dimensions are transferred and shown). When set to <b>All</b>, all dimensions will always be shown. Set it to <b>Non Zero</b> to lower the data transferred between netdata and your browser, lower the CPU requirements of your browser (fewer lines to draw) and increase the focus on the legends (fewer entries at the legends).</small>
</td>
</tr>
<tr class="option-row">
<td class="option-control"><input id="destroy_on_hide" type="checkbox" data-toggle="toggle" data-on="Destroy" data-off="Hide" data-width="110px"></td>
<td class="option-info"><strong>How to handle hidden charts?</strong><br/>
<small>When set to <b>Destroy</b>, charts that are not in the current viewport of the browser (are above, or below the visible area of the page), will be destroyed and re-created if and when they become visible again. When set to <b>Hide</b>, the not-visible charts will be just hidden, to simplify the DOM and speed up your browser. Set it to <b>Destroy</b>, to lower the memory requirements of your browser. Set it to <b>Hide</b> for smoother page scrolling.</small>
</td>
</tr>
</table>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="settings_sync">
<form id="optionsForm2" method="get" class="form-horizontal">
<div class="form-group">
<table>
<tr class="option-row">
<td class="option-control"><input id="parallel_refresher" type="checkbox" checked data-toggle="toggle" data-on="Parallel" data-off="Sequential" data-width="110px"></td>
<td class="option-info"><strong>Which chart refresh policy to use?</strong><br/>
<small>When set to <b>parallel</b>, visible charts are refreshed in parallel (all queries are sent to netdata server in parallel) and are rendered asynchronously. When set to <b>sequential</b> charts are refreshed one after another. Set it to parallel if your browser can cope with it (most modern browsers do), set it to sequential if you work on an older/slower computer.</small>
</td>
</tr>
<tr class="option-row" id="concurrent_refreshes_row">
<td class="option-control"></td>
<td class="option-info">
<table>
<tr class="option-row">
<td class="option-control">
<input id="concurrent_refreshes" type="checkbox" checked data-toggle="toggle" data-on="Resync" data-off="Best Effort" data-width="110px">
</td>
<td class="option-info">
<strong>Shall we re-sync chart refreshes?</strong><br/>
<small>When set to <b>Resync</b>, the dashboard will attempt to re-synchronize all the charts so that they are refreshed concurrently. When set to <b>Best Effort</b>, each chart may be refreshed with a little time difference to the others. Normally, the dashboard starts refreshing them in parallel, but depending on the speed of your computer and the network latencies, charts start having a slight time difference. Setting this to <b>Resync</b> will attempt to re-synchronize the charts on every update. Setting it to <b>Best Effort</b> may lower the pressure on your browser and the network.</small>
</td>
</tr>
</table>
</td>
</tr>
<tr class="option-row">
<td class="option-control"><input id="sync_selection" type="checkbox" checked data-toggle="toggle" data-on="Sync" data-off="Don't Sync" data-onstyle="success" data-offstyle="danger" data-width="110px"></td>
<td class="option-info"><strong>Sync hover selection on all charts?</strong><br/>
<small>When enabled, a selection on one chart will automatically select the same time on all other visible charts and the legends of all visible charts will be updated to show the selected values. When disabled, only the chart getting the user's attention will be selected. Enable it to get better insights of the data. Disable it if you are on a very slow computer that cannot actually do it.</small>
</td>
</tr>
<tr class="option-row">
<td class="option-control"><input id="sync_pan_and_zoom" type="checkbox" checked data-toggle="toggle" data-on="Sync" data-off="Don't Sync" data-onstyle="success" data-offstyle="danger" data-width="110px"></td>
<td class="option-info"><strong>Sync pan and zoom on all charts?</strong><br/>
<small>When enabled, pan and zoom operations on a chart will be replicated to all charts (even the ones that are not currently visible - of course only when they will become visible). When disabled, pan and zoom operations will not be propagated to other charts.</small>
</td>
</tr>
</table>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="settings_visual">
<form id="optionsForm3" method="get" class="form-horizontal">
<div class="form-group">
<table>
<tr class="option-row">
<td class="option-control"><input id="netdata_theme_control" type="checkbox" checked data-toggle="toggle" data-offstyle="danger" data-onstyle="success" data-on="Dark" data-off="White" data-width="110px"></td>
<td class="option-info"><strong>Which theme to use?</strong><br/>
<small>Netdata comes with two themes: <b>Dark</b> (the default) and <b>White</b>.
<br/>
<b>Switching this will reload the dashboard</b>.
</small>
</td>
</tr>
<tr class="option-row">
<td class="option-control"><input id="show_help" type="checkbox" checked data-toggle="toggle" data-on="Help Me" data-off="No Help" data-width="110px"></td>
<td class="option-info"><strong>Do you need help?</strong><br/>
<small>Netdata can show some help in some areas to help you use the dashboard. If all these balloons bother you, disable them using this switch.
<br/>
<b>Switching this will reload the dashboard</b>.
</small>
</td>
</tr>
<tr class="option-row">
<td class="option-control"><input id="pan_and_zoom_data_padding" type="checkbox" checked data-toggle="toggle" data-on="Pad" data-off="Don't Pad" data-width="110px"></td>
<td class="option-info"><strong>Enable data padding when panning and zooming?</strong><br/>
<small>When set to <b>Pad</b> the charts will be padded with more data, both before and after the visible area, thus giving the impression the whole database is loaded. This padding will happen only after the first pan or zoom operation on the chart (initially all charts have only the visible data). When set to <b>Don't Pad</b> only the visible data will be transfered from the netdata server, even after the first pan and zoom operation.</small>
</td>
</tr>
<tr class="option-row">
<td class="option-control"><input id="smooth_plot" type="checkbox" checked data-toggle="toggle" data-on="Smooth" data-off="Rough" data-width="110px"></td>
<td class="option-info"><strong>Enable Bézier lines on charts?</strong><br/>
<small>When set to <b>Smooth</b> the charts libraries that support it, will plot smooth curves instead of simple straight lines to connect the points.
<br/>
Keep in mind <a href="http://dygraphs.com" target="_blank">dygraphs</a>, the main charting library in netdata dashboards, can only smooth line charts. It cannot smooth area or stacked charts. When set to <b>Rough</b>, this setting can lower the CPU resources consumed by your browser.</small>
</td>
</tr>
</table>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="updateModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="updateModalLabel">Update Check</h4>
</div>
<div class="modal-body">
Your netdata version: <b><code><span id="netdataVersion">Unknown</span></code></b>
<br/>
<div style="padding: 10px;"></div>
<div id="versionCheckLog">Not checked yet. Please press the Check Now button.</div>
</div>
<div class="modal-footer">
<a href="#" onclick="notifyForUpdate(true);" type="button" class="btn btn-default">Check Now</a>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="deleteRegistryModal" tabindex="-1" role="dialog" aria-labelledby="deleteRegistryModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="deleteRegistryModalLabel">Delete <span id="deleteRegistryServerName"></span>?</h4>
</div>
<div class="modal-body">
You are about to delete, from your personal list of netdata servers, the following server:
<p style="text-align: center; padding-top: 10px; padding-bottom: 10px; line-height: 2;">
<b><span id="deleteRegistryServerName2"></span></b>
<br/>
<b><span id="deleteRegistryServerURL"></span></b>
</p>
Are you sure you want to do this?
<br/>
<div style="padding: 10px;"></div>
<small>Keep in mind, this server will be added back if and when you visit it again.</small>
<br/>
<div id="deleteRegistryResponse" style="display: block; width: 100%; text-align: center; padding-top: 20px;"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">keep it</button>
<a href="#" onclick="notifyForDeleteRegistry(true); return false;" type="button" class="btn btn-danger">delete it</a>
</div>
</div>
</div>
</div>
<div class="modal fade" id="switchRegistryModal" tabindex="-1" role="dialog" aria-labelledby="switchRegistryModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="switchRegistryModalLabel">Switch Netdata Registry Identity</h4>
</div>
<div class="modal-body">
You can copy and paste the following ID to all your browsers (e.g. work and home).
<br/>
All the browsers with the same ID will identify <b>you</b>, so please don't share this with others.
<p style="text-align: center; padding-top: 10px; padding-bottom: 10px; line-height: 2;">
<form action="#">
<input type="text" class="form-control" id="switchRegistryPersonGUID" placeholder="your personal ID" maxlength="36" autocomplete="off" style="text-align: center; font-size: 1.4em;">
</form>
</p>
Either copy this ID and paste it to another browser, or paste here the ID you have taken from another browser.
<p style="padding-top: 10px;"><small>
Keep in mind that:
<ul>
<li>when you switch ID, your previous ID will be lost forever - this is irreversible.</li>
<li>both IDs (your old and the new) must list this netdata at their personal lists.</li>
<li>both IDs have to be known by the registry: <b><span id="switchRegistryURL"></span></b>.</li>
<li>to get a new ID, just clear your browser cookies.</li>
</ul>
</small></p>
<div id="switchRegistryResponse" style="display: block; width: 100%; text-align: center; padding-top: 20px;"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">cancel</button>
<a href="#" onclick="notifyForSwitchRegistry(true); return false;" type="button" class="btn btn-danger">impersonate</a>
</div>
</div>
</div>
</div>
<script>
var this_is_demo = null;
function isdemo() {
if(this_is_demo !== null) return this_is_demo;
this_is_demo = false;
try {
if(typeof document.location.hostname === 'string') {
if(document.location.hostname.endsWith('.my-netdata.io') ||
document.location.hostname.endsWith('.mynetdata.io') ||
document.location.hostname.endsWith('.netdata.rocks') ||
document.location.hostname.endsWith('.firehol.org') ||
document.location.hostname.endsWith('.netdata.online'))
this_is_demo = true;
}
}
catch(error) {
;
}
return this_is_demo;
}
if(isdemo()) {
document.getElementById('masthead').style.display = 'block';
}
function switchRegistryModalHandler() {
document.getElementById('switchRegistryPersonGUID').value = NETDATA.registry.person_guid;
document.getElementById('switchRegistryURL').innerHTML = NETDATA.registry.server;
document.getElementById('switchRegistryResponse').innerHTML = '';
$('#switchRegistryModal').modal('show');
}
function notifyForSwitchRegistry() {
var n = document.getElementById('switchRegistryPersonGUID').value;
if(n !== '' && n.length === 36) {
NETDATA.registry.switch(n, function(result) {
if(result !== null) {
$('#switchRegistryModal').modal('hide');
NETDATA.registry.init();
}
else {
document.getElementById('switchRegistryResponse').innerHTML = "<b>Sorry! The registry rejected your request.</b>";
}
});
}
else
document.getElementById('switchRegistryResponse').innerHTML = "<b>The ID you have entered is not a GUID.</b>";
}
var deleteRegistryUrl = null;
function deleteRegistryModalHandler(guid, name, url) {
deleteRegistryUrl = url;
document.getElementById('deleteRegistryServerName').innerHTML = name;
document.getElementById('deleteRegistryServerName2').innerHTML = name;
document.getElementById('deleteRegistryServerURL').innerHTML = url;
document.getElementById('deleteRegistryResponse').innerHTML = '';
$('#deleteRegistryModal').modal('show');
}
function notifyForDeleteRegistry() {
if(deleteRegistryUrl) {
NETDATA.registry.delete(deleteRegistryUrl, function(result) {
if(result !== null) {
deleteRegistryUrl = null;
$('#deleteRegistryModal').modal('hide');
NETDATA.registry.init();
}
else {
document.getElementById('deleteRegistryResponse').innerHTML = "<b>Sorry! this command was rejected by the registry server.</b>";
}
});
}
}
var options = {
sparklines_registry: {},
submenu_names: {},
data: null,
hostname: 'netdata_server', // will be overwritten by the netdata server
categories: new Array(),
categories_idx: {},
families: new Array(),
families_idx: {},
chartsPerRow: 0,
chartsMinWidth: 1450,
chartsHeight: 180,
sparklinesHeight: 60
};
// generate a sparkline
// used in the documentation
function sparkline(chart, dimension, units) {
var key = chart + '.' + dimension;
if(typeof units === 'undefined')
units = '';
if(typeof options.sparklines_registry[key] === 'undefined')
options.sparklines_registry[key] = { count: 1 };
else
options.sparklines_registry[key].count++;
key = key + '.' + options.sparklines_registry[key].count;
var h = '<div data-netdata="' + chart + '" data-after="-120" data-width="25%" data-height="15px" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-dimensions="' + dimension + '" data-show-value-of-' + dimension + '-at="' + key + '"></div> (<span id="' + key + '" style="display: inline-block; min-width: 50px; text-align: right;">X</span>' + units + ')';
return h;
}
function chartsPerRow(total) {
if(options.chartsPerRow === 0) {
width = Math.floor(total / options.chartsMinWidth);
if(width === 0) width = 1;
return width;
}
else return options.chartsPerRow;
}
function prioritySort(a, b) {
if(a.priority < b.priority) return -1;
if(a.priority > b.priority) return 1;
if(a.name < b.name) return -1;
return 1;
}
function sortObjectByPriority(object) {
var idx = {};
var sorted = new Array();
for(var i in object) {
if(typeof idx[i] === 'undefined') {
idx[i] = object[i];
sorted.push(i);
}
}
sorted.sort(function(a, b) {
if(idx[a].priority < idx[b].priority) return -1;
if(idx[a].priority > idx[b].priority) return 1;
if(a < b) return -1;
return 1;
});
return sorted;
}
// ----------------------------------------------------------------------------
function gaugeChart(title, width, dimensions, colors) {
if(typeof colors === 'undefined')
colors = '';
if(typeof dimensions === 'undefined')
dimensions = '';
return '<div data-netdata="CHART_UNIQUE_ID"'
+ ' data-dimensions="' + dimensions + '"'
+ ' data-chart-library="gauge"'
+ ' data-gauge-adjust="width"'
+ ' data-title="' + title + '"'
+ ' data-width="' + width + '"'
+ ' data-before="0"'
+ ' data-after="-CHART_DURATION"'
+ ' data-points="CHART_DURATION"'
+ ' data-colors="' + colors + '"'
+ ' role="application"></div>';
}
// ----------------------------------------------------------------------------
var menuData = {
'system': {
title: 'System Overview',
info: 'Overview of the key system metrics.'
},
'ap': {
title: 'Access Points',
info: undefined
},
'tc': {
title: 'Quality of Service',
info: 'Netdata collects and visualizes tc class utilization using its <a href="https://github.com/firehol/netdata/blob/master/plugins.d/tc-qos-helper.sh" target="_blank">tc-helper plugin</a>. If you also use <a href="http://firehol.org/#fireqos" target="_blank">FireQOS</a> for setting up QoS, netdata automatically collects interface and class names. If your QoS configuration includes overheads calculation, the values shown here will include these overheads (the total bandwidth for the same interface as reported in the Network Interfaces section, will be lower than the total bandwidth reported here). Also, data collection may have a slight time difference compared to the interface (QoS data collection is implemented with a BASH script, so a shift in data collection of a few milliseconds should be justified).'
},
'net': {
title: 'Network Interfaces',
info: 'Per network interface statistics collected from <code>/proc/net/dev</code>.'
},
'ipv4': {
title: 'IPv4 Networking',
info: undefined
},
'ipv6': {
title: 'IPv6 Networking',
info: undefined
},
'ipvs': {
title: 'IP Virtual Server',
info: undefined
},
'netfilter': {
title: 'Firewall (netfilter)',
info: undefined
},
'cpu': {
title: 'CPUs',
info: undefined
},
'mem': {
title: 'Memory',
info: undefined
},
'disk': {
title: 'Disks',
info: undefined
},
'sensors': {
title: 'Sensors',
info: undefined
},
'nfsd': {
title: 'File Server (nfsd)',
info: undefined
},
'apps': {
title: 'Applications',
info: 'Per application statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through the entire <code>/proc</code> filesystem and aggregates statistics for applications of interest, defined in <code>/etc/netdata/apps_groups.conf</code> (the default is <a href="https://github.com/firehol/netdata/blob/master/conf.d/apps_groups.conf" target="_blank">here</a>). The plugin internally builds a process tree (much like <code>ps fax</code> does), and groups processes together (evaluating both child and parent processes) so that the result is always a chart with a predefined set of dimensions (of course, only application groups found running are reported).<br/><b>IMPORTANT</b>: The values shown here are not 100% accurate. They only include values for the processes running. If an application is spawning children continuously, which are terminated in just a few milliseconds (like shell scripts do), the values reported will be inaccurate. Linux does report the values for the exited children of a process. However, these values are reported to the parent process <b>only when the child exits</b>. If these values, of the exited child processes, were also aggregated in the charts below, the charts would have been full of spikes, presenting unrealistic utilization for each process group. So, we decided to ignore these values and present only the utilization of <b>the currently running processes</b>.',
height: 1.5
},
'users': {
title: 'Users',
info: 'Per user statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through the entire <code>/proc</code> filesystem and aggregates statistics per user.<br/><b>IMPORTANT</b>: The values shown here are not 100% accurate. They only include values for the processes running. If an application is spawning children continuously, which are terminated in just a few milliseconds (like shell scripts do), the values reported will be inaccurate. Linux does report the values for the exited children of a process. However, these values are reported to the parent process <b>only when the child exits</b>. If these values, of the exited child processes, were also aggregated in the charts below, the charts would have been full of spikes, presenting unrealistic utilization for each process group. So, we decided to ignore these values and present only the utilization of <b>the currently running processes</b>.',
height: 1.5
},
'groups': {
title: 'User Groups',
info: 'Per user group statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through the entire <code>/proc</code> filesystem and aggregates statistics per user group.<br/><b>IMPORTANT</b>: The values shown here are not 100% accurate. They only include values for the processes running. If an application is spawning children continuously, which are terminated in just a few milliseconds (like shell scripts do), the values reported will be inaccurate. Linux does report the values for the exited children of a process. However, these values are reported to the parent process <b>only when the child exits</b>. If these values, of the exited child processes, were also aggregated in the charts below, the charts would have been full of spikes, presenting unrealistic utilization for each process group. So, we decided to ignore these values and present only the utilization of <b>the currently running processes</b>.',
height: 1.5
},
'netdata': {
title: 'Netdata Monitoring',
info: undefined
},
'example': {
title: 'Example Charts',
info: undefined
},
'cgroup': {
title: 'Container',
info: undefined
},
'mysql': {
title: 'MySQL',
info: undefined
},
'named': {
title: 'named',
info: undefined
},
};
var submenuData = {
'mem.ksm': {
title: 'Memory Deduper',
info: 'Kernel Same-page Merging (KSM) performance monitoring, read from several files in <code>/sys/kernel/mm/ksm/</code>. KSM is a memory-saving de-duplication feature in the Linux kernel (since version 2.6.32). The KSM daemon ksmd periodically scans those areas of user memory which have been registered with it, looking for pages of identical content which can be replaced by a single write-protected page (which is automatically copied if a process later wants to update its content). KSM was originally developed for use with KVM (where it was known as Kernel Shared Memory), to fit more virtual machines into physical memory, by sharing the data common between them. But it can be useful to any application which generates many instances of the same data.'
},
'netfilter.conntrack': {
title: 'Connection Tracker',
info: 'Netfilter Connection Tracker performance monitoring, read from <code>/proc/net/stat/nf_conntrack</code>. The connection tracker keeps track of all connections of the machine, inbound and outbound. It works by keeping a database with all open connections, tracking network and address translation and connection expectations.'
},
'netfilter.nfacct': {
title: 'Bandwidth Accounting',
info: 'The following information is read using the <code>nfacct.plugin</code>.'
},
'netfilter.synproxy': {
title: 'DDoS Protection',
info: 'DDoS Protection performance monitoring read from <code>/proc/net/stat/synproxy</code>. <a href="https://github.com/firehol/firehol/wiki/Working-with-SYNPROXY" target="_blank">SYNPROXY</a> is a TCP SYN packets proxy. It is used to protect any TCP server (like a web server) from SYN floods and similar DDoS attacks. It is a netfilter module, in the Linux kernel (since version 3.12). It is optimized to handle millions of packets per second utilizing all CPUs available without any concurrency locking between the connections. It can be used for any kind of TCP traffic (even encrypted), since it does not interfere with the content itself.'
}
};
var chartData = {
'system.cpu': {
info: 'Total CPU utilization (all cores). 100% here means there is no CPU idle time at all. You can get per core usage at the <a href="#cpu">CPUs</a> section and per application usage at the <a href="#apps">Applications Monitoring</a> section.<br/>Keep an eye on <b>iowait</b> ' + sparkline('system.cpu', 'iowait', '%') + '. If it is constantly high, your disks are a bottleneck and they slow your system down.<br/>Another important metric worth monitoring, is <b>softirq</b> ' + sparkline('system.cpu', 'softirq', '%') + '. A constantly high percentage of softirq may indicate network drivers issues.'
},
'system.load': {
info: 'Current system load read from <code>/proc/loadavg</code>.',
height: 0.7
},
'system.io': {
info: 'Total Disk I/O, for all disks, read from <code>/proc/vmstat</code>. You can get detailed information about each disk at the <a href="#disk">Disks</a> section and per application Disk usage at the <a href="#apps">Applications Monitoring</a> section.'
},
'system.swapio': {
info: 'Total Swap I/O, read from <code>/proc/vmstat</code>. (netdata measures both <code>in</code> and <code>out</code>. If either of them is not shown in the chart, it is because it is zero - you can change the page settings to always render all the available dimensions on all charts).'
},
'system.pgfaults': {
info: 'Total page faults, read from <code>/proc/vmstat</code>. <b>Major page faults</b> indicates that the system is using its swap. You can find which applications use the swap at the <a href="#apps">Applications Monitoring</a> section.'
},
'system.entropy': {
colors: '#CC22AA',
info: '<a href="https://en.wikipedia.org/wiki/Entropy_(computing)" target="_blank">Entropy</a>, read from <code>/proc/sys/kernel/random/entropy_avail</code>, is like a pool of random numbers that are mainly used in cryptography. It is advised that the pool remains always <a href="https://blog.cloudflare.com/ensuring-randomness-with-linuxs-random-number-generator/" target="_blank">above 200</a>. If the pool of entropy gets empty, you risk your security to be predictable and you should install a user-space random numbers generating daemon, like <a href="http://www.issihosts.com/haveged/" target="_blank">haveged</a>, to keep the pool in healthy levels.'
},
'system.forks': {
colors: '#5555DD',
info: 'The number of new processes created per second, read from <code>/proc/stat</code>.'
},
'system.intr': {
colors: '#DD5555',
info: 'Total number of CPU interrupts, read from <code>/proc/stat</code>. Check <code>system.interrupts</code> that gives more detail about each interrupt and also the <a href="#cpu">CPUs</a> section where interrupts are analyzed per CPU core.'
},
'system.interrupts': {
info: 'CPU interrupts in detail, read from <code>/proc/interrupts</code>. At the <a href="#cpu">CPUs</a> section, interrupts are analyzed per CPU core.'
},
'system.softirqs': {
info: 'CPU softirqs in detail, read from <code>/proc/softirqs</code>. At the <a href="#cpu">CPUs</a> section, softirqs are analyzed per CPU core.'
},
'system.processes': {
info: 'System processes, read from <code>/proc/stat</code>. <b>Blocked</b> are processes that are willing to execute but they cannot, e.g. because they wait for disk activity.'
},
'system.active_processes': {
info: 'All system active processes, read from <code>/proc/loadavg</code>.'
},
'system.ctxt': {
info: '<a href="https://en.wikipedia.org/wiki/Context_switch" target="_blank">Context Switches</a>, read from <code>/proc/stat</code>, is the switching of the CPU from one process, task or thread to another. If there are many processes or threads willing to execute and very few CPU cores available to handle them, the system is making more context switching to balance the CPU resources among them. The whole process is computationally intensive. The more the context switches, the slower the system gets.'
},
'system.idlejitter': {
colors: '#5555AA',
info: 'Idle jitter is calculated by netdata. A thread is spawned that requests to sleep for a few microseconds. When the system wakes it up, it measures how many microseconds have passed. The difference between the requested and the actual duration of the sleep, is the <b>idle jitter</b>. This number is useful in real-time environments, where CPU jitter can affect the quality of the service (like VoIP media gateways).'
},
'system.ipv4': {
info: 'Total IPv4 Traffic, read from <code>/proc/net/netstat</code>.'
},
'system.ipv6': {
info: 'Total IPv6 Traffic, read from <code>/proc/net/snmp6</code>.'
},
'system.ram': {
info: 'System memory, read from <code>/proc/meminfo</code>.'
},
'system.swap': {
info: 'System swap memory, read from <code>/proc/meminfo</code>.'
},
'mem.ksm_savings': {
heads: [
gaugeChart('Saved', '12%', 'savings', '#0099CC')
]
},
'mem.ksm_ratios': {
heads: [
function(id) {
return '<div data-netdata="' + id + '"'
+ ' data-gauge-max-value="100"'
+ ' data-chart-library="gauge"'
+ ' data-title="Savings"'
+ ' data-units="percentage %"'
+ ' data-gauge-adjust="width"'
+ ' data-width="12%"'
+ ' data-before="0"'
+ ' data-after="-CHART_DURATION"'
+ ' data-points="CHART_DURATION"'
+ ' role="application"></div>';
}
]
},
'mem.committed': {
colors: NETDATA.colors[3]
},
'apps.cpu': {
height: 2.0
},
'apps.preads': {
height: 2.0
},
'apps.pwrites': {
height: 2.0
},
'users.cpu': {
height: 2.0
},
'users.preads': {
height: 2.0
},
'users.pwrites': {
height: 2.0
},
'groups.cpu': {
height: 2.0
},
'groups.preads': {
height: 2.0
},
'groups.pwrites': {
height: 2.0
},
'tc.qos': {
heads: [
function(id) {
if(id.match(/.*-ifb$/))
return gaugeChart('Inbound', '12%', '', '#5555AA');
else
return gaugeChart('Outbound', '12%', '', '#AA9900');
}
]
},
'net.net': {
heads: [
gaugeChart('Received', '12%', 'received'),
gaugeChart('Sent', '12%', 'sent')
]
},
'disk.util': {
colors: '#FF5588',
heads: [
gaugeChart('Utilization', '12%', '', '#FF5588')
]
},
'disk.backlog': {
colors: '#0099CC'
},
'disk.io': {
heads: [
gaugeChart('Read', '12%', 'reads'),
gaugeChart('Write', '12%', 'writes')
]
},
'netfilter.sockets': {
colors: '#88AA00',
heads: [
gaugeChart('Active Connections', '12%', '', '#88AA00')
]
},
'netfilter.new': {
heads: [
gaugeChart('New Connections', '12%', 'new', '#5555AA')
]
},
'disk.iotime': {
height: 0.5
},
'disk.mops': {
height: 0.5
},
'disk.svctm': {
height: 0.5
},
'disk.avgsz': {
height: 0.5
},
'disk.await': {
height: 0.5
},
'apache.connections': {
colors: NETDATA.colors[4],
mainheads: [
gaugeChart('Connections', '12%', '', NETDATA.colors[4])
]
},
'apache.requests': {
colors: NETDATA.colors[0],
mainheads: [
gaugeChart('Connections', '12%', '', NETDATA.colors[0])
]
},
'apache.net': {
colors: NETDATA.colors[3],
mainheads: [
gaugeChart('Bandwidth', '12%', '', NETDATA.colors[3])
]
},
'apache.workers': {
mainheads: [
function(id) {
return '<div data-netdata="' + id + '"'
+ ' data-dimensions="busy"'
+ ' data-append-options="percentage"'
+ ' data-gauge-max-value="100"'
+ ' data-chart-library="gauge"'
+ ' data-title="Workers Utilization"'
+ ' data-units="percentage %"'
+ ' data-gauge-adjust="width"'
+ ' data-width="12%"'
+ ' data-before="0"'
+ ' data-after="-CHART_DURATION"'
+ ' data-points="CHART_DURATION"'
+ ' role="application"></div>';
}
]
},
'apache.bytesperreq': {
colors: NETDATA.colors[3],
height: 0.5
},
'apache.reqpersec': {
colors: NETDATA.colors[4],
height: 0.5
},
'apache.bytespersec': {
colors: NETDATA.colors[6],
height: 0.5
},
'nginx.connections': {
colors: NETDATA.colors[4],
mainheads: [
gaugeChart('Connections', '12%', '', NETDATA.colors[4])
]
},
'nginx.requests': {
colors: NETDATA.colors[0],
mainheads: [
gaugeChart('Requests', '12%', '', NETDATA.colors[0])
]
}
};
function anyAttribute(obj, attr, key, def) {
if(typeof obj[key] !== 'undefined') {
if(typeof obj[key][attr] !== 'undefined')
return obj[key][attr];
}
return def;
}
function menuTitle(chart) {
if(typeof chart.menu_pattern !== 'undefined') {
return anyAttribute(menuData, 'title', chart.menu_pattern, chart.menu_pattern).toString()
+ ': ' + chart.type.slice(-(chart.type.length - chart.menu_pattern.length - 1)).toString();
}
return anyAttribute(menuData, 'title', chart.menu, chart.menu);
}
function menuInfo(menu) {
return anyAttribute(menuData, 'info', menu, null);
}
function menuHeight(menu, relative) {
return anyAttribute(menuData, 'height', menu, 1.0) * relative;
}
function submenuTitle(menu, submenu) {
var key = menu + '.' + submenu;
return anyAttribute(submenuData, 'title', key, submenu);
}
function submenuInfo(menu, submenu) {
var key = menu + '.' + submenu;
return anyAttribute(submenuData, 'info', key, null);
}
function submenuHeight(menu, submenu, relative) {
var key = menu + '.' + submenu;
return anyAttribute(submenuData, 'height', key, 1.0) * relative;
}
function chartInfo(id) {
if(typeof chartData[id] !== 'undefined' && typeof chartData[id].info !== 'undefined')
return '<div class="chart-message netdata-chart-alignment" role="document">' + chartData[id].info + '</div>';
else
return '';
}
function chartHeight(id, def) {
if(typeof chartData[id] !== 'undefined' && typeof chartData[id].height !== 'undefined')
return def * chartData[id].height;
else
return def;
}
// ----------------------------------------------------------------------------
// enrich the data structure returned by netdata
// to reflect our menu system and content
function enrichChartData(chart) {
var tmp = chart.type.split('_')[0];
switch(tmp) {
case 'ap':
case 'net':
case 'disk':
chart.menu = tmp;
break;
case 'mysql':
case 'named':
case 'cgroup':
chart.menu = chart.type;
chart.menu_pattern = tmp;
break;
case 'tc':
chart.menu = tmp;
// find a name for this device from fireqos info
// we strip '_(in|out)' or '(in|out)_'
if(typeof options.submenu_names[chart.family] === 'undefined' || options.submenu_names[chart.family] === chart.family) {
var n = chart.name.split('.')[1];
if(n.endsWith('_in'))
options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_in'));
else if(n.endsWith('_out'))
options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_out'));
else if(n.startsWith('in_'))
options.submenu_names[chart.family] = n.slice(3, n.length);
else if(n.startsWith('out_'))
options.submenu_names[chart.family] = n.slice(4, n.length);
}
// increase the priority of IFB devices
// to have inbound appear before outbound
if(chart.id.match(/.*-ifb$/))
chart.priority--;
break;
default:
chart.menu = chart.type;
break;
}
chart.submenu = chart.family;
}
// ----------------------------------------------------------------------------
function name2id(s) {
return s
.replace(/ /g, '_')
.replace(/\(/g, '_')
.replace(/\)/g, '_')
.replace(/\./g, '_')
.replace(/\//g, '_');
}
function headMain(charts, duration) {
var head = '';
if(typeof charts['system.swap'] !== 'undefined')
head += '<div style="margin-right: 10px;" data-netdata="system.swap"'
+ ' data-dimensions="free"'
+ ' data-append-options="percentage"'
+ ' data-chart-library="easypiechart"'
+ ' data-title="Free Swap"'
+ ' data-units="%"'
+ ' data-easypiechart-max-value="100"'
+ ' data-width="8%"'
+ ' data-before="0"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' data-colors="#DD4400"'
+ ' role="application"></div>';
if(typeof charts['system.io'] !== 'undefined') {
head += '<div style="margin-right: 10px;" data-netdata="system.io"'
+ ' data-dimensions="in"'
+ ' data-chart-library="easypiechart"'
+ ' data-title="Disk Read"'
+ ' data-units="KB / s"'
+ ' data-width="10%"'
+ ' data-before="0"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' role="application"></div>';
head += '<div style="margin-right: 10px;" data-netdata="system.io"'
+ ' data-dimensions="out"'
+ ' data-chart-library="easypiechart"'
+ ' data-title="Disk Write"'
+ ' data-units="KB / s"'
+ ' data-width="10%"'
+ ' data-before="0"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' role="application"></div>';
}
if(typeof charts['system.cpu'] !== 'undefined')
head += '<div data-netdata="system.cpu"'
+ ' data-chart-library="gauge"'
+ ' data-title="CPU"'
+ ' data-units="%"'
+ ' data-gauge-max-value="100"'
+ ' data-width="18%"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' data-colors="' + NETDATA.colors[12] + '"'
+ ' role="application"></div>';
if(typeof charts['system.ipv4'] !== 'undefined') {
head += '<div style="margin-right: 10px;" data-netdata="system.ipv4"'
+ ' data-dimensions="received"'
+ ' data-chart-library="easypiechart"'
+ ' data-title="IPv4 Inbound"'
+ ' data-units="kbps"'
+ ' data-width="10%"'
+ ' data-before="0"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' role="application"></div>';
head += '<div style="margin-right: 10px;" data-netdata="system.ipv4"'
+ ' data-dimensions="sent"'
+ ' data-chart-library="easypiechart"'
+ ' data-title="IPv4 Outbound"'
+ ' data-units="kbps"'
+ ' data-width="10%"'
+ ' data-before="0"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' role="application"></div>';
}
else if(typeof charts['system.ipv6'] !== 'undefined') {
head += '<div style="margin-right: 10px;" data-netdata="system.ipv6"'
+ ' data-dimensions="received"'
+ ' data-chart-library="easypiechart"'
+ ' data-title="IPv6 Inbound"'
+ ' data-units="kbps"'
+ ' data-width="10%"'
+ ' data-before="0"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' role="application"></div>';
head += '<div style="margin-right: 10px;" data-netdata="system.ipv6"'
+ ' data-dimensions="sent"'
+ ' data-chart-library="easypiechart"'
+ ' data-title="IPv6 Outbound"'
+ ' data-units="kbps"'
+ ' data-width="10%"'
+ ' data-before="0"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' role="application"></div>';
}
if(typeof charts['system.ram'] !== 'undefined')
head += '<div style="margin-right: 10px;" data-netdata="system.ram"'
+ ' data-dimensions="cached|free"'
+ ' data-append-options="percentage"'
+ ' data-chart-library="easypiechart"'
+ ' data-title="Available RAM"'
+ ' data-units="%"'
+ ' data-easypiechart-max-value="100"'
+ ' data-width="8%"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-points="' + duration.toString() + '"'
+ ' data-colors="' + NETDATA.colors[7] + '"'
+ ' role="application"></div>';
return head;
}
function generateHeadCharts(type, chart, duration) {
var head = '';
var hcharts = anyAttribute(chartData, type, chart.context, []);
if(hcharts.length > 0) {
var hi = 0, hlen = hcharts.length;
while(hi < hlen) {
if(typeof hcharts[hi] === 'function')
head += hcharts[hi](chart.id).replace('CHART_DURATION', duration.toString()).replace('CHART_UNIQUE_ID', chart.id);
else
head += hcharts[hi].replace('CHART_DURATION', duration.toString()).replace('CHART_UNIQUE_ID', chart.id);
hi++;
}
}
return head;
}
function renderPage(menus, data) {
var div = document.getElementById('charts_div');
var pcent_width = Math.floor(100 / chartsPerRow($(div).width()));
// find the proper duration for per-second updates
var duration = Math.round(($(div).width() * pcent_width / 100 * data.update_every / 3) / 60) * 60;
var html = '';
var sidebar = '<ul class="nav dashboard-sidenav" data-spy="affix" id="sidebar_ul">';
var mainhead = headMain(data.charts, duration);
// sort the menus
var main = sortObjectByPriority(menus);
var i = 0, len = main.length;
while(i < len) {
var menu = main[i++];
// generate an entry at the main menu
var menuid = name2id(menu);
sidebar += '<li class=""><a href="#' + menuid + '">' + menus[menu].title + '</a><ul class="nav">';
html += '<div role="section"><div role="sectionhead"><h1 id="' + menuid + '" role="heading">' + menus[menu].title + '</h1></div><div id="menu_' + menuid + '" role="document">';
if(menus[menu].info !== null)
html += menus[menu].info;
// console.log(' >> ' + menu + ' (' + menus[menu].priority + '): ' + menus[menu].title);
var shtml = '';
var mhead = '<div class="netdata-chart-row">' + mainhead;
mainhead = '';
// sort the submenus of this menu
var sub = sortObjectByPriority(menus[menu].submenus);
var si = 0, slen = sub.length;
while(si < slen) {
var submenu = sub[si++];
// generate an entry at the submenu
var submenuid = name2id(menu + '_' + submenu);
sidebar += '<li class><a href="#' + submenuid + '">' + menus[menu].submenus[submenu].title + '</a></li>';
shtml += '<div class="netdata-group-container" id="submenu_' + submenuid + '" style="display: inline-block; width: ' + pcent_width.toString() + '%"><h2 id="' + submenuid + '" class="netdata-chart-alignment" role="heading">' + menus[menu].submenus[submenu].title + '</h2>';
if(menus[menu].submenus[submenu].info !== null)
shtml += '<div class="chart-message netdata-chart-alignment" role="document">' + menus[menu].submenus[submenu].info + '</div>';
var head = '<div class="netdata-chart-row">';
var chtml = '';
// console.log(' \------- ' + submenu + ' (' + menus[menu].submenus[submenu].priority + '): ' + menus[menu].submenus[submenu].title);
// sort the charts in this submenu of this menu
menus[menu].submenus[submenu].charts.sort(prioritySort);
var ci = 0, clen = menus[menu].submenus[submenu].charts.length;
while(ci < clen) {
var chart = menus[menu].submenus[submenu].charts[ci++];
// generate the submenu heading charts
mhead += generateHeadCharts('mainheads', chart, duration);
head += generateHeadCharts('heads', chart, duration);
// generate the chart
chtml += chartInfo(chart.context) + '<div data-netdata="' + chart.id + '"'
+ ' data-width="' + pcent_width.toString() + '%"'
+ ' data-height="' + chartHeight(chart.context, options.chartsHeight).toString() + 'px"'
+ ' data-before="0"'
+ ' data-after="-' + duration.toString() + '"'
+ ' data-id="' + name2id(options.hostname + '/' + chart.id) + '"'
+ ' data-colors="' + anyAttribute(chartData, 'colors', chart.context, '') + '"'
+ ' role="application"></div>';
// console.log(' \------- ' + chart.id + ' (' + chart.priority + '): ' + chart.context + ' height: ' + menus[menu].submenus[submenu].height);
}
head += '</div>';
shtml += head + chtml + '</div>';
}
mhead += '</div>';
sidebar += '</ul></li>';
html += mhead + shtml + '</div></div><hr role="separator"/>';
}
sidebar += '</ul>';
div.innerHTML = html;
document.getElementById('sidebar').innerHTML = sidebar;
finalizePage();
}
function renderChartsAndMenu(data) {
var menus = {};
var charts = data.charts;
for(var c in charts) {
enrichChartData(charts[c]);
// create the menu
if(typeof menus[charts[c].menu] === 'undefined') {
menus[charts[c].menu] = {
priority: charts[c].priority,
submenus: {},
title: menuTitle(charts[c]),
info: menuInfo(charts[c].menu),
height: menuHeight(charts[c].menu, options.chartsHeight)
};
}
if(charts[c].priority < menus[charts[c].menu].priority)
menus[charts[c].menu].priority = charts[c].priority;
// create the submenu
if(typeof menus[charts[c].menu].submenus[charts[c].submenu] === 'undefined') {
menus[charts[c].menu].submenus[charts[c].submenu] = {
priority: charts[c].priority,
charts: new Array(),
title: null,
info: submenuInfo(charts[c].menu, charts[c].submenu),
height: submenuHeight(charts[c].menu, charts[c].submenu, menus[charts[c].menu].height)
};
}
if(charts[c].priority < menus[charts[c].menu].submenus[charts[c].submenu].priority)
menus[charts[c].menu].submenus[charts[c].submenu].priority = charts[c].priority;
// index the chart in the menu/submenu
menus[charts[c].menu].submenus[charts[c].submenu].charts.push(charts[c]);
}
// propagate the descriptive subname given to QoS
// to all the other submenus with the same name
for(var m in menus) {
for(var s in menus[m].submenus) {
// set the family using a name
if(typeof options.submenu_names[s] !== 'undefined') {
menus[m].submenus[s].title = s + ' (' + options.submenu_names[s] + ')';
}
else {
menus[m].submenus[s].title = submenuTitle(m, s);
}
}
}
renderPage(menus, data);
}
function downloadAllCharts(netdata_url) {
if(typeof netdata_url === 'undefined' || netdata_url === null)
netdata_url = NETDATA.serverDefault;
NETDATA.pause(function() {
// download all the charts the server knows
NETDATA.chartRegistry.downloadAll(netdata_url, function(data) {
options.data = data;
options.hostname = data.hostname;
document.getElementById('hostname').innerHTML = options.hostname;
document.getElementById('hostname').href = NETDATA.serverDefault;
document.title = options.hostname + ' dashboard';
renderChartsAndMenu(data);
// prepare our DOM
// prepareScreen(data);
// due to affix issues, prepareScreen() will unpause
// netdata as needed
});
});
}
// ----------------------------------------------------------------------------
function versionLog(msg) {
document.getElementById('versionCheckLog').innerHTML = msg;
}
function getNetdataVersion(callback) {
versionLog('Downloading installed version info from netdata...');
$.ajax({
url: 'version.txt',
async: true,
cache: false
})
.done(function(data) {
data = data.replace(/(\r\n|\n|\r| |\t)/gm,"");
if(data.length !== 40) {
versionLog('Received version string is invalid.');
callback(null);
}
else {
versionLog('Installed version of netdata is ' + data);
document.getElementById('netdataVersion').innerHTML = data;
callback(data);
}
})
.fail(function() {
versionLog('Failed to download installed version info from netdata!');
callback(null);
});
}
function getGithubLatestCommit(callback) {
versionLog('Downloading latest version info from github...');
$.ajax({
url: 'https://api.github.com/repos/firehol/netdata/commits',
async: true,
cache: false
})
.done(function(data) {
versionLog('Latest version info from github is ' + data[0].sha);
callback(data[0].sha);
})
.fail(function() {
versionLog('Failed to download installed version info from github!');
callback(null);
});
}
function checkForUpdate(callback) {
getNetdataVersion(function(sha1) {
if(sha1 === null) callback(null, null);
getGithubLatestCommit(function(sha2) {
callback(sha1, sha2);
});
});
return null;
}
var updateBlinkCounter = 0;
function notifyForUpdate(force) {
versionLog('<p>checking for updates...</p>');
var now = new Date().getTime();
if(typeof force === 'undefined' || force !== true) {
var last = loadLocalStorage('last_update_check');
if(typeof last === 'string')
last = parseInt(last);
else
last = 0;
if(now - last < 3600000 * 8) {
// no need to check it - too soon
return;
}
}
checkForUpdate(function(sha1, sha2) {
var save = false;
if(sha1 === null) {
save = false;
versionLog('<p><big>Failed to get your netdata version!</big></p><p>You can always get the latest version of netdata from <a href="https://github.com/firehol/netdata" target="_blank">its github page</a>.</p>');
}
else if(sha2 === null) {
save = false;
versionLog('<p><big>Failed to get the latest version from github.</big></p><p>You can always get the latest version of netdata from <a href="https://github.com/firehol/netdata" target="_blank">its github page</a>.</p>');
}
else if(sha1 === sha2) {
save = true;
versionLog('<p><big>You already have the latest version of netdata!</big></p><p>No update yet?<br/>Probably, we need some motivation to keep going on!</p><p>If you haven\'t already, <a href="https://github.com/firehol/netdata" target="_blank">give netdata a <b>Star</b> at its github page</a>.</p>');
}
else {
save = true;
var compare = 'https://github.com/firehol/netdata/compare/' + sha1.toString() + '...' + sha2.toString();
versionLog('<p><big><strong>New version of netdata available!</strong></big></p><p>Latest version: ' + sha2.toString() + '</p><p><a href="' + compare + '" target="_blank">Click here for the changes log</a> since your installed version, and<br/><a href="https://github.com/firehol/netdata/wiki/Updating-Netdata" target="_blank">click here for directions on updating</a> your netdata installation.</p><p>We suggest to review the changes log for new features you may be interested, or important bug fixes you may need.<br/>Keeping your netdata updated, is generally a good idea.</p>');
function updateButtonBlink() {
updateBlinkCounter--;
if(updateBlinkCounter > 0)
$('#updateButton').fadeOut(500).fadeIn(500, updateButtonBlink);
}
if(updateBlinkCounter === 0) {
updateBlinkCounter = 300;
updateButtonBlink();
}
}
if(save)
saveLocalStorage('last_update_check', now.toString());
});
}
// ----------------------------------------------------------------------------
function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
}
function finalizePage() {
// resize all charts - without starting the background thread
// this has to be done while NETDATA is paused
// if we ommit this, the affix menu will be wrong, since all
// the Dom elements are initially zero-sized
NETDATA.parseDom();
var before = 0, after = 0, nowelcome = 0;
after = getUrlParameter('force_after_ms');
before = getUrlParameter('force_before_ms');
nowelcome = (getUrlParameter('nowelcome') === true)?true:false;
if(before > 0 && after > 0) {
nowelcome = true;
NETDATA.globalPanAndZoom.setMaster(NETDATA.options.targets[0], after, before);
}
// let it run (update the charts)
NETDATA.unpause();
// check if we have to jump to a specific section
var hash = location.hash.replace('#','');
if(hash != '') {
// Clear the hash in the URL
// location.hash = ''; // delete front "//" if you want to change the address bar
var offset = $(location.hash).offset();
if(typeof offset !== 'undefined')
$('html, body').animate({ scrollTop: offset.top }, 0);
}
/* activate bootstrap sidebar (affix) */
$('#sidebar').affix({
offset: {
top: (isdemo())?150:0,
bottom: 0
}
});
/* fix scrolling of very long affix lists
http://stackoverflow.com/questions/21691585/bootstrap-3-1-0-affix-too-long
*/
$('#sidebar').on('affixed.bs.affix', function() {
$(this).removeAttr('style');
});
/* activate bootstrap scrollspy (needed for sidebar) */
$(document.body).scrollspy({
target: '#sidebar',
offset: $(window).height() / 3 // controls the diff of the <hX> element to the top, to select it
});
document.getElementById('footer').style.display = 'block';
var update_options_modal = function() {
// console.log('update_options_modal');
var sync_option = function(option) {
var self = $('#' + option);
if(self.prop('checked') !== NETDATA.getOption(option)) {
// console.log('switching ' + option.toString());
self.bootstrapToggle(NETDATA.getOption(option)?'on':'off');
}
}
var theme_sync_option = function(option) {
var self = $('#' + option);
self.bootstrapToggle(netdataTheme === 'slate'?'on':'off');
}
sync_option('eliminate_zero_dimensions');
sync_option('destroy_on_hide');
sync_option('parallel_refresher');
sync_option('concurrent_refreshes');
sync_option('sync_selection');
sync_option('sync_pan_and_zoom');
sync_option('stop_updates_when_focus_is_lost');
sync_option('smooth_plot');
sync_option('pan_and_zoom_data_padding');
sync_option('show_help');
theme_sync_option('netdata_theme_control');
if(NETDATA.getOption('parallel_refresher') === false) {
$('#concurrent_refreshes_row').hide();
}
else {
$('#concurrent_refreshes_row').show();
}
};
NETDATA.setOption('setOptionCallback', update_options_modal);
// handle options changes
$('#eliminate_zero_dimensions').change(function() { NETDATA.setOption('eliminate_zero_dimensions', $(this).prop('checked')); });
$('#destroy_on_hide').change(function() { NETDATA.setOption('destroy_on_hide', $(this).prop('checked')); });
$('#parallel_refresher').change(function() { NETDATA.setOption('parallel_refresher', $(this).prop('checked')); });
$('#concurrent_refreshes').change(function() { NETDATA.setOption('concurrent_refreshes', $(this).prop('checked')); });
$('#sync_selection').change(function() { NETDATA.setOption('sync_selection', $(this).prop('checked')); });
$('#sync_pan_and_zoom').change(function() { NETDATA.setOption('sync_pan_and_zoom', $(this).prop('checked')); });
$('#stop_updates_when_focus_is_lost').change(function() { NETDATA.setOption('stop_updates_when_focus_is_lost', $(this).prop('checked')); });
$('#smooth_plot').change(function() { NETDATA.setOption('smooth_plot', $(this).prop('checked')); });
$('#pan_and_zoom_data_padding').change(function() { NETDATA.setOption('pan_and_zoom_data_padding', $(this).prop('checked')); });
$('#show_help').change(function() { NETDATA.setOption('show_help', $(this).prop('checked')); location.reload(); });
// this has to be the last
// it reloads the page
$('#netdata_theme_control').change(function() {
if(setTheme($(this).prop('checked')?'slate':'white'))
location.reload();
});
$('#updateModal').on('shown.bs.modal', function() {
notifyForUpdate(true);
});
$('#deleteRegistryModal').on('hidden.bs.modal', function() {
deleteRegistryGuid = null;
});
if(isdemo()) {
if(!nowelcome) {
setTimeout(function() {
$('#welcomeModal').modal();
}, 1000);
}
// google analytics when this is used for the home page of the demo sites
// this does not run on user's installations
setTimeout(function() {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-64295674-3', 'auto');
ga('send', 'pageview');
}, 2000);
}
else notifyForUpdate();
}
function resetDashboardOptions() {
var help = NETDATA.options.current.show_help;
NETDATA.resetOptions();
if(setTheme('slate'))
location.reload();
if(help !== NETDATA.options.current.show_help)
location.reload();
}
downloadAllCharts();
</script>
</body>
</html>
|