diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2019-10-05 18:59:08 +0300 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2019-10-05 18:59:08 +0300 |
commit | 95ea1e67fe29a1778d161dce15ea57205b07c85d (patch) | |
tree | 38f0d4e79df829b52c8fd47c5413d570668bcb4e /applications | |
parent | 324f8daf313e33c4384d3ba546767ff66313f239 (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')
-rw-r--r-- | applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/memory.lua | 8 | ||||
-rw-r--r-- | applications/luci-app-statistics/root/etc/config/luci_statistics | 2 |
2 files changed, 7 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 e5f3360c0..2e09ea9a7 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 diff --git a/applications/luci-app-statistics/root/etc/config/luci_statistics b/applications/luci-app-statistics/root/etc/config/luci_statistics index f84f67d1f..d97087d19 100644 --- a/applications/luci-app-statistics/root/etc/config/luci_statistics +++ b/applications/luci-app-statistics/root/etc/config/luci_statistics @@ -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' |