From f8552afb1c32aece90bba337708f650440850605 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sat, 12 Dec 2020 18:29:54 +0200 Subject: luci-app-statistics: add dhcpleases Add the dhcpleases plugin: https://github.com/openwrt/packages/pull/14204 Added-Frontend-by: Hannu Nyman Signed-off-by: Nick Hainke [Minor changes to graph: alt_autoscale, precision, label] Signed-off-by: Hannu Nyman --- .../statistics/rrdtool/definitions/dhcpleases.js | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/dhcpleases.js (limited to 'applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions') diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/dhcpleases.js b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/dhcpleases.js new file mode 100644 index 0000000000..b54a0af27e --- /dev/null +++ b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/dhcpleases.js @@ -0,0 +1,25 @@ +/* Licensed to the public under the Apache License 2.0. */ + +'use strict'; +'require baseclass'; + +return baseclass.extend({ + title: _('DHCP Leases'), + + rrdargs: function(graph, host, plugin, plugin_instance, dtype) { + return { + title: "%H: DHCP leases", + alt_autoscale_max: true, + vlabel: "Leases given", + number_format: "%3.0lf", + data: { + types: [ "count" ], + options: { + count: { + title: "Leases" + } + } + } + }; + } +}); -- cgit v1.2.3