updated colors and labels of cgroup mainheads
Costa Tsaousis (ktsaou) committed
Aug 1, 2017 at 00:03 UTC
4522cc4855e16d4f82dabb03d90c280f121e948e
3 files changed
+9
-7
src/proc_net_dev.c
+3
-1
@@ -292,7 +292,9 @@ static inline void netdev_rename_cgroup(struct netdev *d, struct netdev_rename *
292
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_packets_%s", r->container_device);
293
d->chart_id_net_packets = strdupz(buffer);
294
295
- d->chart_family = strdupz("net");
295
+ snprintfz(buffer, RRD_ID_LENGTH_MAX, "net %s", r->container_device);
296
+ d->chart_family = strdupz(buffer);
297
+
298
d->priority = 43000;
299
d->flipped = 1;
300
}
web/dashboard_info.js
+5
-5
@@ -715,12 +715,12 @@ netdataDashboard.context = {
715
if(id.match(/^cgroup_.*/)) {
716
var iface;
717
try {
718
- iface = id.substring(id.lastIndexOf('.net_') + 5, id.length) + ' ';
718
+ iface = ' ' + id.substring(id.lastIndexOf('.net_') + 5, id.length);
719
}
720
catch (e) {
721
iface = '';
722
}
723
- return netdataDashboard.gaugeChart(iface + 'Received', '12%', 'received');
723
+ return netdataDashboard.gaugeChart('Received' + iface, '12%', 'received');
724
}
725
else
726
return '';
@@ -730,12 +730,12 @@ netdataDashboard.context = {
730
if(id.match(/^cgroup_.*/)) {
731
var iface;
732
try {
733
- iface = id.substring(id.lastIndexOf('.net_') + 5, id.length) + ' ';
733
+ iface = ' ' + id.substring(id.lastIndexOf('.net_') + 5, id.length);
734
}
735
catch (e) {
736
iface = '';
737
}
738
- return netdataDashboard.gaugeChart(iface + 'Sent', '12%', 'sent');
738
+ return netdataDashboard.gaugeChart('Sent' + iface, '12%', 'sent');
739
}
740
else
741
return '';
@@ -1087,7 +1087,7 @@ netdataDashboard.context = {
1087
+ ' data-before="0"'
1088
+ ' data-after="-CHART_DURATION"'
1089
+ ' data-points="CHART_DURATION"'
1090
- + ' data-colors="' + NETDATA.colors[0] + '"'
1090
+ + ' data-colors="' + NETDATA.colors[4] + '"'
1091
+ ' role="application"></div>';
1092
}
1093
]
web/index.html
+1
-1
@@ -2961,7 +2961,7 @@
2961
});
2962
2963
NETDATA.requiredJs.push({
2964
- url: NETDATA.serverDefault + 'dashboard_info.js?v20170731-4',
2964
+ url: NETDATA.serverDefault + 'dashboard_info.js?v20170731-8',
2965
async: false,
2966
isAlreadyLoaded: function() { return false; }
2967
});