summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-03-02 11:22:24 +0100
committerGitHub <noreply@github.com>2020-03-02 11:22:24 +0100
commit65f33449c48952586afc3a97417bbf29c42c605b (patch)
treeb1434f2b80ca2bba92ca813f5e4a027ae3558144
parent663134cd2d6b9603d69f59665715586f77f4610a (diff)
parent7b52ff85a725077bf1c3cecdc342e1a04041a18d (diff)
Merge pull request #3711 from ldir-EDB0/master
luci-app-statistics: conntrack: add percent usage graph
-rw-r--r--applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/conntrack.js23
1 files changed, 22 insertions, 1 deletions
diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/conntrack.js b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/conntrack.js
index d62c3cd0c..c61d4f291 100644
--- a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/conntrack.js
+++ b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/conntrack.js
@@ -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 ];
}
});