From 99a8b2826e15c08972dc34170f70b40abba5922e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 14 Dec 2012 21:53:03 +0000 Subject: luci_statistics: Add y_min, y_max, units_exponent options and clean up some graphs Signed-off-by: David Woodhouse --- .../luci-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua | 1 + .../luci-statistics/luasrc/statistics/rrdtool/definitions/load.lua | 2 ++ .../luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua | 2 ++ 3 files changed, 5 insertions(+) (limited to 'applications/luci-statistics/luasrc/statistics/rrdtool') diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua index adc3f284b2..c0e86245c0 100644 --- a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua +++ b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua @@ -19,6 +19,7 @@ function rrdargs( graph, plugin, plugin_instance, dtype ) return { title = "%H: Processor usage on core #%pi", + y_min = "0", vlabel = "Percent", number_format = "%5.1lf%%", data = { diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/load.lua b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/load.lua index 8052696fb5..4cb4795ef6 100644 --- a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/load.lua +++ b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/load.lua @@ -19,6 +19,8 @@ function rrdargs( graph, plugin, plugin_instance, dtype ) return { title = "%H: Load", vlabel = "Load", + y_min = "0", + units_exponent = "0", number_format = "%5.2lf", data = { sources = { load = { "shortterm", "midterm", "longterm" } diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua index 4072d4db14..69f1ae305c 100644 --- a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua +++ b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua @@ -53,6 +53,8 @@ function rrdargs( graph, plugin, plugin_instance, dtype ) local percentage = { title = "%H: Battery charge on UPS \"%pi\"", vlabel = "Percent", + y_min = "0", + y_max = "100", number_format = "%5.1lf%%", data = { sources = { -- cgit v1.2.3