luci-app-statistics: fix memory plugin config
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / memory.lua
1 -- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
2 -- Licensed to the public under the Apache License 2.0.
3
4 m = Map("luci_statistics",
5 translate("Memory Plugin Configuration"),
6 translate("The memory plugin collects statistics about the memory usage."))
7
8 s = m:section( NamedSection, "collectd_memory", "luci_statistics" )
9
10 enable = s:option( Flag, "enable", translate("Enable this plugin") )
11 enable.default = 0
12
13 -- collectd_memory.valuesabsolute (ValuesAbsolute)
14 valuesabsolute = s:option( Flag, "ValuesAbsolute",
15 translate("Absolute values"),
16 translate("When set to true, we request absolute values"))
17 valuesabsolute.default = 1
18 valuesabsolute.optional = false
19 valuesabsolute:depends( "enable", 1 )
20
21 -- collectd_memory.valuespercentage (ValuesPercentage)
22 valuespercentage = s:option( Flag, "ValuesPercentage",
23 translate("Percent values"),
24 translate("When set to true, we request percentage values"))
25 valuespercentage.default = 0
26 valuespercentage.optional = false
27 valuespercentage:depends( "enable", 1 )
28
29 return m