Merge pull request #3711 from ldir-EDB0/master

luci-app-statistics: conntrack: add percent usage graph
This commit is contained in:
Jo-Philipp Wich 2020-03-02 11:22:24 +01:00 committed by GitHub
commit 65f33449c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ return L.Class.extend({
title: _('Conntrack'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
return {
var entries = {
title: "%H: Conntrack entries",
vlabel: "Count",
number_format: "%5.0lf",
@ -26,5 +26,26 @@ return L.Class.extend({
}
}
};
var percent = {
title: "%H: Conntrack usage",
vlabel: "Percent",
number_format: "%5.1lf%%",
y_min: "0",
alt_autoscale_max: true,
data: {
instances: {
percent: [ "used" ]
},
options: {
percent_used: {
color: "00ff00",
title: "Used"
}
}
}
};
return [ entries, percent ];
}
});