summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/model/cbi
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2019-10-05 18:59:08 +0300
committerHannu Nyman <hannu.nyman@iki.fi>2019-10-05 18:59:08 +0300
commit95ea1e67fe29a1778d161dce15ea57205b07c85d (patch)
tree38f0d4e79df829b52c8fd47c5413d570668bcb4e /applications/luci-app-statistics/luasrc/model/cbi
parent324f8daf313e33c4384d3ba546767ff66313f239 (diff)
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>
Diffstat (limited to 'applications/luci-app-statistics/luasrc/model/cbi')
-rw-r--r--applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/memory.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/memory.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/memory.lua
index e5f3360c05..2e09ea9a74 100644
--- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/memory.lua
+++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/memory.lua
@@ -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