Merge pull request #817 from ascob/luci-app-dynapoint
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / thermal.lua
1 -- Licensed to the public under the Apache License 2.0.
2
3 m = Map("luci_statistics",
4         translate("Thermal Plugin Configuration"),
5         translate("The thermal plugin will monitor temperature of the system. " ..
6                 "Data is typically read from /sys/class/thermal/*/temp " ..
7                 "( '*' denotes the thermal device to be read, e.g. thermal_zone1 )")
8         )
9
10 -- collectd_thermal config section
11 s = m:section( NamedSection, "collectd_thermal", "luci_statistics" )
12
13 -- collectd_thermal.enable
14 enable = s:option( Flag, "enable", translate("Enable this plugin") )
15 enable.default = 0
16
17 -- collectd_thermal.tz (Device)
18 tz = s:option( Value, "Device", translate("Monitor device(s) / thermal zone(s)"),
19                 translate("Empty value = monitor all") )
20 tz.optional = true
21 tz:depends( "enable", 1 )
22
23 -- collectd_thermal.ignoreselected (IgnoreSelected)
24 ignoreselected = s:option( Flag, "IgnoreSelected", translate("Monitor all except specified") )
25 ignoreselected.default  = 0
26 ignoreselected.optional = true
27 ignoreselected:depends( "enable", 1 )
28
29 return m