From 6aaf5ba7ed0980c14bdc554fc8839a2126455ed5 Mon Sep 17 00:00:00 2001 From: Lennart Weller Date: Mon, 18 Sep 2017 00:17:33 +0200 Subject: New upstream version 1.8.0+dfsg --- web/dashboard.css | 1 + web/dashboard.html | 2 +- web/dashboard.js | 73 ++++++++++------ web/dashboard.slate.css | 1 + web/dashboard_info.js | 189 +++++++++++++++++++++++++++++++++++++++++- web/goto-host-from-alarm.html | 2 +- web/index.html | 12 ++- web/registry.html | 2 +- web/tv.html | 2 +- web/version.txt | 2 +- 10 files changed, 250 insertions(+), 36 deletions(-) (limited to 'web') diff --git a/web/dashboard.css b/web/dashboard.css index 2147c6038..42ffa3ddb 100644 --- a/web/dashboard.css +++ b/web/dashboard.css @@ -37,6 +37,7 @@ body { justify-content: center; -webkit-justify-content: center; -moz-justify-content: center; + padding-top: 10px; } .netdata-container { diff --git a/web/dashboard.html b/web/dashboard.html index 4453c996e..1e482daba 100644 --- a/web/dashboard.html +++ b/web/dashboard.html @@ -652,4 +652,4 @@ So, to avoid flashing the charts, we destroy and re-create the charts on each up - + diff --git a/web/dashboard.js b/web/dashboard.js index 1f240a4c8..f119a5370 100644 --- a/web/dashboard.js +++ b/web/dashboard.js @@ -51,7 +51,7 @@ var NETDATA = window.NETDATA || {}; -(function(window, document) { +(function(window, document, $, undefined) { // ------------------------------------------------------------------------ // compatibility fixes @@ -144,7 +144,7 @@ var NETDATA = window.NETDATA || {}; NETDATA.themes = { white: { bootstrap_css: NETDATA.serverDefault + 'css/bootstrap-3.3.7.css', - dashboard_css: NETDATA.serverDefault + 'dashboard.css?v20170605-2', + dashboard_css: NETDATA.serverDefault + 'dashboard.css?v20170725-1', background: '#FFFFFF', foreground: '#000000', grid: '#F0F0F0', @@ -161,7 +161,7 @@ var NETDATA = window.NETDATA || {}; }, slate: { bootstrap_css: NETDATA.serverDefault + 'css/bootstrap-slate-flat-3.3.7.css?v20161229-1', - dashboard_css: NETDATA.serverDefault + 'dashboard.slate.css?v20170605-2', + dashboard_css: NETDATA.serverDefault + 'dashboard.slate.css?v20170725-1', background: '#272b30', foreground: '#C8C8C8', grid: '#283236', @@ -2554,11 +2554,14 @@ var NETDATA = window.NETDATA || {}; else delta = Math.abs(max - min); - if (delta > 1000) __legendFormatValueChartDecimals = 0; - else if (delta > 10) __legendFormatValueChartDecimals = 1; - else if (delta > 1) __legendFormatValueChartDecimals = 2; - else if (delta > 0.1) __legendFormatValueChartDecimals = 2; - else __legendFormatValueChartDecimals = 4; + if (delta > 1000) __legendFormatValueChartDecimals = 0; + else if (delta > 10) __legendFormatValueChartDecimals = 1; + else if (delta > 1) __legendFormatValueChartDecimals = 2; + else if (delta > 0.1) __legendFormatValueChartDecimals = 2; + else if (delta > 0.01) __legendFormatValueChartDecimals = 4; + else if (delta > 0.001) __legendFormatValueChartDecimals = 5; + else if (delta > 0.0001) __legendFormatValueChartDecimals = 6; + else __legendFormatValueChartDecimals = 7; } if(__legendFormatValueChartDecimals !== old) { @@ -2585,11 +2588,14 @@ var NETDATA = window.NETDATA || {}; else { dmin = 0; var abs = (value < 0) ? -value : value; - if (abs > 1000) dmax = 0; - else if (abs > 10) dmax = 1; - else if (abs > 1) dmax = 2; - else if (abs > 0.1) dmax = 2; - else dmax = 4; + if (abs > 1000) dmax = 0; + else if (abs > 10) dmax = 1; + else if (abs > 1) dmax = 2; + else if (abs > 0.1) dmax = 2; + else if (abs > 0.01) dmax = 4; + else if (abs > 0.001) dmax = 5; + else if (abs > 0.0001) dmax = 6; + else dmax = 7; } return NETDATA.fastNumberFormat.get(dmin, dmax).format(value); @@ -3926,14 +3932,20 @@ var NETDATA = window.NETDATA || {}; // script.onabort = onError; script.onerror = function() { NETDATA.error(101, NETDATA.jQuery); }; - if(typeof callback === "function") - script.onload = callback; + if(typeof callback === "function") { + script.onload = function () { + $ = jQuery; + return callback(); + }; + } var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s); } - else if(typeof callback === "function") + else if(typeof callback === "function") { + $ = jQuery; return callback(); + } }; NETDATA._loadCSS = function(filename) { @@ -5557,23 +5569,34 @@ var NETDATA = window.NETDATA || {}; if(typeof min !== 'number') min = 0; if(typeof max !== 'number') max = 0; + if(min > max) { + var t = min; + min = max; + max = t; + } + if(min > value) min = value; if(max < value) max = value; - // make sure it is zero based - // but only they have not been set by the user if(state.tmp.easyPieChartMin === null && min > 0) min = 0; if(state.tmp.easyPieChartMax === null && max < 0) max = 0; - var pcent = 0; - if(value >= 0) { - if(max !== 0) - pcent = Math.round(value * 100 / max); + var pcent; + + if(min < 0 && max > 0) { + // it is both positive and negative + // zero at the top center of the chart + max = (-min > max)? -min : max; + pcent = Math.round(value * 100 / max); + } + else if(value >= 0 && min >= 0 && max >= 0) { + // clockwise + pcent = Math.round((value - min) * 100 / (max - min)); if(pcent === 0) pcent = 0.1; } else { - if(min !== 0) - pcent = Math.round(-value * 100 / min); + // counter clockwise + pcent = Math.round((value - max) * 100 / (max - min)); if(pcent === 0) pcent = -0.1; } @@ -7069,4 +7092,4 @@ var NETDATA = window.NETDATA || {}; } }); }); -})(window, document); +})(window, document, (typeof jQuery === 'function')?jQuery:undefined); diff --git a/web/dashboard.slate.css b/web/dashboard.slate.css index f12a6aab9..7445d532c 100644 --- a/web/dashboard.slate.css +++ b/web/dashboard.slate.css @@ -51,6 +51,7 @@ code { justify-content: center; -moz--webkit-justify-content: center; -moz-justify-content: center; + padding-top: 10px; } .netdata-container { diff --git a/web/dashboard_info.js b/web/dashboard_info.js index 91e007a1d..bb2f95991 100644 --- a/web/dashboard_info.js +++ b/web/dashboard_info.js @@ -291,6 +291,12 @@ netdataDashboard.menu = { info: undefined }, + 'stiebeleltron': { + title: 'Stiebel Eltron', + icon: '', + info: undefined + }, + 'snmp': { title: 'SNMP', icon: '', @@ -301,6 +307,11 @@ netdataDashboard.menu = { title: 'Go - expvars', icon: '', info: 'Statistics about running Go applications exposed by the expvar package.' + }, + + 'chrony': { + icon: '', + info: 'chronyd parameters about the system’s clock performance.' } }; @@ -470,7 +481,7 @@ netdataDashboard.context = { 'system.entropy': { colors: '#CC22AA', - info: 'Entropy, is like a pool of random numbers (/dev/random) that are mainly used in cryptography. It is advised that the pool remains always above 200. 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 haveged or rng-tools (i.e. rngd), to keep the pool in healthy levels.' + info: 'Entropy, is a pool of random numbers (/dev/random) that is mainly used in cryptography. If the pool of entropy gets empty, processes requiring random numbers may run a lot slower (it depends on the interface each program uses), waiting for the pool to be replenished. Ideally a system with high entropy demands should have a hardware device for that purpose (TPM is one such device). There are also several software-only options you may install, like haveged, although these are generally useful only in servers.' }, 'system.forks': { @@ -589,7 +600,7 @@ netdataDashboard.context = { }, 'mem.kernel': { - info: 'The total ammount of memory being used by the kernel. Slab is the amount of memory used by the kernel to cache data structures for its own use. KernelStack is the amount of memory allocated for each task done by the kernel. PageTables is the amount of memory decicated to the lowest level of page tables (A page table is used to turn a virtual address into a physical memory address). VmallocUsed is the amount of memory being used as virtual address space.' + info: 'The total amount of memory being used by the kernel. Slab is the amount of memory used by the kernel to cache data structures for its own use. KernelStack is the amount of memory allocated for each task done by the kernel. PageTables is the amount of memory decicated to the lowest level of page tables (A page table is used to turn a virtual address into a physical memory address). VmallocUsed is the amount of memory being used as virtual address space.' }, 'mem.slab': { @@ -703,9 +714,53 @@ netdataDashboard.context = { // NETWORK INTERFACES 'net.net': { + mainheads: [ + function(os, id) { + void(os); + if(id.match(/^cgroup_.*/)) { + var iface; + try { + iface = ' ' + id.substring(id.lastIndexOf('.net_') + 5, id.length); + } + catch (e) { + iface = ''; + } + return netdataDashboard.gaugeChart('Received' + iface, '12%', 'received'); + } + else + return ''; + }, + function(os, id) { + void(os); + if(id.match(/^cgroup_.*/)) { + var iface; + try { + iface = ' ' + id.substring(id.lastIndexOf('.net_') + 5, id.length); + } + catch (e) { + iface = ''; + } + return netdataDashboard.gaugeChart('Sent' + iface, '12%', 'sent'); + } + else + return ''; + } + ], heads: [ - netdataDashboard.gaugeChart('Received', '12%', 'received'), - netdataDashboard.gaugeChart('Sent', '12%', 'sent') + function(os, id) { + void(os); + if(!id.match(/^cgroup_.*/)) + return netdataDashboard.gaugeChart('Received', '12%', 'received'); + else + return ''; + }, + function(os, id) { + void(os); + if(!id.match(/^cgroup_.*/)) + return netdataDashboard.gaugeChart('Sent', '12%', 'sent'); + else + return ''; + } ] }, @@ -1020,6 +1075,83 @@ netdataDashboard.context = { height: 0.5 }, + + // ------------------------------------------------------------------------ + // containers + + 'cgroup.cpu': { + mainheads: [ + function(os, id) { + void(os); + return '
'; + } + ] + }, + + 'cgroup.mem_usage': { + mainheads: [ + function(os, id) { + void(os); + return '
'; + } + ] + }, + + 'cgroup.throttle_io': { + mainheads: [ + function(os, id) { + void(os); + return '
'; + }, + function(os, id) { + void(os); + return '
'; + } + ] + }, + // ------------------------------------------------------------------------ // web_log @@ -1353,5 +1485,54 @@ netdataDashboard.context = { commonMin: true, commonMax: true, valueRange: "[0, null]" + }, + + // ------------------------------------------------------------------------ + // Stiebel Eltron Heat pump installation + + 'stiebeleltron.system.roomtemp': { + commonMin: true, + commonMax: true, + valueRange: "[0, null]" + }, + + // ------------------------------------------------------------------------ + + 'chrony.system': { + info: 'In normal operation, chronyd never steps the system clock, because any jump in the timescale can have adverse consequences for certain application programs. Instead, any error in the system clock is corrected by slightly speeding up or slowing down the system clock until the error has been removed, and then returning to the system clock’s normal speed. A consequence of this is that there will be a period when the system clock (as read by other programs using the gettimeofday() system call, or by the date command in the shell) will be different from chronyd\'s estimate of the current true time (which it reports to NTP clients when it is operating in server mode). The value reported on this line is the difference due to this effect.', + colors: NETDATA.colors[3] + }, + + 'chrony.offsets': { + info: 'last offset is the estimated local offset on the last clock update. RMS offset is a long-term average of the offset value.', + height: 0.5 + }, + + 'chrony.stratum': { + info: 'The stratum indicates how many hops away from a computer with an attached reference clock we are. Such a computer is a stratum-1 computer.', + decimalDigits: 0, + height: 0.5 + }, + + 'chrony.root': { + info: 'Estimated delays against the root time server this system is synchronized with. delay is the total of the network path delays to the stratum-1 computer from which the computer is ultimately synchronised. dispersion is the total dispersion accumulated through all the computers back to the stratum-1 computer from which the computer is ultimately synchronised. Dispersion is due to system clock resolution, statistical measurement variations etc.' + }, + + 'chrony.frequency': { + info: 'The frequency is the rate by which the system\'s clock would be would be wrong if chronyd was not correcting it. It is expressed in ppm (parts per million). For example, a value of 1ppm would mean that when the system\'s clock thinks it has advanced 1 second, it has actually advanced by 1.000001 seconds relative to true time.', + colors: NETDATA.colors[0] + }, + + 'chrony.residualfreq': { + info: 'This shows the residual frequency for the currently selected reference source. It reflects any difference between what the measurements from the reference source indicate the frequency should be and the frequency currently being used.' + + 'The reason this is not always zero is that a smoothing procedure is applied to the frequency. Each time a measurement from the reference source is obtained and a new residual frequency computed, the estimated accuracy of this residual is compared with the estimated accuracy (see skew) of the existing frequency value. A weighted average is computed for the new frequency, with weights depending on these accuracies. If the measurements from the reference source follow a consistent trend, the residual will be driven to zero over time.', + height: 0.5, + colors: NETDATA.colors[3] + }, + + 'chrony.skew': { + info: 'The estimated error bound on the frequency.', + height: 0.5, + colors: NETDATA.colors[5] } }; diff --git a/web/goto-host-from-alarm.html b/web/goto-host-from-alarm.html index 16ed2b92a..40592134b 100644 --- a/web/goto-host-from-alarm.html +++ b/web/goto-host-from-alarm.html @@ -18,7 +18,7 @@ var netdataTheme = 'slate'; var netdataShowHelp = true; - + + diff --git a/web/registry.html b/web/registry.html index f40f5f2af..16a9db9e6 100644 --- a/web/registry.html +++ b/web/registry.html @@ -169,7 +169,7 @@ var netdataRegistryCallback = function(machines_array) { and that you have chown it to be owned by netdata:netdata --> - + +