diff options
author | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2020-02-17 20:15:15 +0000 |
---|---|---|
committer | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2020-03-02 10:04:01 +0000 |
commit | 7b52ff85a725077bf1c3cecdc342e1a04041a18d (patch) | |
tree | b1434f2b80ca2bba92ca813f5e4a027ae3558144 /applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool | |
parent | 663134cd2d6b9603d69f59665715586f77f4610a (diff) |
luci-app-statistics: conntrack: add percent usage graph
The existing graph shows a conntrack entry usage value but doesn't show
a conntrack table size figure so you don't know if you're close to
filling the table. Add a percent usage graph to show conntrack table
percent used.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool')
-rw-r--r-- | applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/conntrack.js | 23 |
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 d62c3cd0c9..c61d4f2912 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 ]; } }); |