Merge pull request #1735 from sumpfralle/olsr-jsoninfo-parser-handle-empty-result
[oweals/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / memory.lua
index 5510a5a8e8891d6d07354093f5e44083526f4968..e5f3360c05045bc6aae2b4f128b24c2cffce80d8 100644 (file)
@@ -1,13 +1,5 @@
---[[
-
-Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-]]--
+-- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
+-- Licensed to the public under the Apache License 2.0.
 
 m = Map("luci_statistics",
        translate("Memory Plugin Configuration"),
@@ -18,4 +10,18 @@ s = m:section( NamedSection, "collectd_memory", "luci_statistics" )
 enable = s:option( Flag, "enable", translate("Enable this plugin") )
 enable.default = 0
 
+-- collectd_memory.valuesabsolute (ValuesAbsolute)
+valuespercentage = s:option( Flag, "ValuesAbsolute",
+       translate("Absolute values"),
+       translate("When set to true, we request absolute values"))
+valuespercentage.default = 1
+valuespercentage: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:depends( "enable", 1 )
+
 return m