summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-04-27 01:53:03 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-04-27 01:53:03 +0300
commit4849b1d3f714445b1b1fd84029a400fa71026811 (patch)
tree33092496a7a067c8d38bdad73176fcb1c99a6996 /web
parent93d93d3d9cb697fd600e995490293988d05bb951 (diff)
enable commonMin/Max only for specific charts
Diffstat (limited to 'web')
-rw-r--r--web/dashboard_info.js17
-rw-r--r--web/index.html22
2 files changed, 36 insertions, 3 deletions
diff --git a/web/dashboard_info.js b/web/dashboard_info.js
index fa46550a68..6a7ab77ab5 100644
--- a/web/dashboard_info.js
+++ b/web/dashboard_info.js
@@ -449,9 +449,26 @@ netdataDashboard.context = {
// CPU charts
'cpu.cpu': {
+ commonMin: true,
+ commonMax: true,
valueRange: "[0, 100]"
},
+ 'cpu.interrupts': {
+ commonMin: true,
+ commonMax: true
+ },
+
+ 'cpu.softirqs': {
+ commonMin: true,
+ commonMax: true
+ },
+
+ 'cpu.softnet_stat': {
+ commonMin: true,
+ commonMax: true
+ },
+
// ------------------------------------------------------------------------
// MEMORY
diff --git a/web/index.html b/web/index.html
index f94c5686f0..9c7517fa4d 100644
--- a/web/index.html
+++ b/web/index.html
@@ -1447,6 +1447,22 @@
mhead += generateHeadCharts('mainheads', chart, duration);
head += generateHeadCharts('heads', chart, duration);
+ function chartCommonMin(family, context, units) {
+ var x = netdataDashboard.anyAttribute(netdataDashboard.context, 'commonMin', context, undefined);
+ if(typeof x !== 'undefined')
+ return ' data-common-min="' + family + '/' + context + '/' + units + '"';
+ else
+ return '';
+ }
+
+ function chartCommonMax(family, context, units) {
+ var x = netdataDashboard.anyAttribute(netdataDashboard.context, 'commonMax', context, undefined);
+ if(typeof x !== 'undefined')
+ return ' data-common-max="' + family + '/' + context + '/' + units + '"';
+ else
+ return '';
+ }
+
// generate the chart
chtml += netdataDashboard.contextInfo(chart.context) + '<div id="chart_' + NETDATA.name2id(chart.id) + '" data-netdata="' + chart.id + '"'
+ ' data-width="' + pcent_width.toString() + '%"'
@@ -1456,8 +1472,8 @@
+ ' data-after="-' + duration.toString() + '"'
+ ' data-id="' + NETDATA.name2id(options.hostname + '/' + chart.id) + '"'
+ ' data-colors="' + netdataDashboard.anyAttribute(netdataDashboard.context, 'colors', chart.context, '') + '"'
- + ' data-common-min="' + chart.family + '/' + chart.context + '/' + chart.units + '"'
- + ' data-common-max="' + chart.family + '/' + chart.context + '/' + chart.units + '"'
+ + chartCommonMin(chart.family, chart.context, chart.units)
+ + chartCommonMax(chart.family, chart.context, chart.units)
+ ' role="application"></div>';
// console.log(' \------- ' + chart.id + ' (' + chart.priority + '): ' + chart.context + ' height: ' + menus[menu].submenus[submenu].height);
@@ -2899,7 +2915,7 @@
});
NETDATA.requiredJs.push({
- url: NETDATA.serverDefault + 'dashboard_info.js?v20170426-1',
+ url: NETDATA.serverDefault + 'dashboard_info.js?v20170427-1',
async: false,
isAlreadyLoaded: function() { return false; }
});