luci-app-statistics: fix memory plugin config
Fix d064cbcf9
by actually enabling ValuesAbsolute in the
config file and also prevent removing that option by LuCI.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
parent
324f8daf31
commit
95ea1e67fe
2 changed files with 7 additions and 3 deletions
|
@ -11,17 +11,19 @@ enable = s:option( Flag, "enable", translate("Enable this plugin") )
|
|||
enable.default = 0
|
||||
|
||||
-- collectd_memory.valuesabsolute (ValuesAbsolute)
|
||||
valuespercentage = s:option( Flag, "ValuesAbsolute",
|
||||
valuesabsolute = s:option( Flag, "ValuesAbsolute",
|
||||
translate("Absolute values"),
|
||||
translate("When set to true, we request absolute values"))
|
||||
valuespercentage.default = 1
|
||||
valuespercentage:depends( "enable", 1 )
|
||||
valuesabsolute.default = 1
|
||||
valuesabsolute.optional = false
|
||||
valuesabsolute:depends( "enable", 1 )
|
||||
|
||||
-- collectd_memory.valuespercentage (ValuesPercentage)
|
||||
valuespercentage = s:option( Flag, "ValuesPercentage",
|
||||
translate("Percent values"),
|
||||
translate("When set to true, we request percentage values"))
|
||||
valuespercentage.default = 0
|
||||
valuespercentage.optional = false
|
||||
valuespercentage:depends( "enable", 1 )
|
||||
|
||||
return m
|
||||
|
|
|
@ -128,6 +128,8 @@ config statistics 'collectd_load'
|
|||
|
||||
config statistics 'collectd_memory'
|
||||
option enable '1'
|
||||
option ValuesAbsolute '1'
|
||||
option ValuesPercentage '0'
|
||||
|
||||
config statistics 'collectd_netlink'
|
||||
option enable '0'
|
||||
|
|
Loading…
Reference in a new issue