summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/model
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2016-05-12 10:26:59 +0300
committerHannu Nyman <hannu.nyman@iki.fi>2016-05-12 10:26:59 +0300
commitb213573682460dd395878c7369aba173f00bbb99 (patch)
tree0f6f67342b8ead10e308a91f45f1595fef912bcc /applications/luci-app-statistics/luasrc/model
parent0c09e4e23f25d95bd3ab2d94a2c84f94f4bcc297 (diff)
luci-app-statistics: option for max/avg data when not rrasingle
Introduce option that enables the user to select max values instead of averages for graphs if the user has disabled RRAsingle. The option defaults to average values, which have been the default in Luci statistics. Remove 'optional' from RRASingle, as it is a key option for statistics. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'applications/luci-app-statistics/luasrc/model')
-rw-r--r--applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
index b3bdf874c..f31fb2093 100644
--- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
+++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
@@ -47,10 +47,16 @@ heartbeat:depends( "enable", 1 )
rrasingle = s:option( Flag, "RRASingle",
translate("Only create average RRAs"), translate("reduces rrd size") )
rrasingle.default = true
-rrasingle.rmempty = true
-rrasingle.optional = true
rrasingle:depends( "enable", 1 )
+-- collectd_rrdtool.rramax (RRAMax)
+rramax = s:option( Flag, "RRAMax",
+ translate("Show max values instead of averages"),
+ translate("Max values for a period can be used instead of averages when not using 'only average RRAs'") )
+rramax.default = false
+rramax.rmempty = true
+rramax:depends( "RRASingle", 0 )
+
-- collectd_rrdtool.rratimespans (RRATimespan)
rratimespans = s:option( Value, "RRATimespans",
translate("Stored timespans"), translate("seconds; multiple separated by space") )