thermal.lua 1019 B

1234567891011121314151617181920212223242526272829
  1. -- Licensed to the public under the Apache License 2.0.
  2. m = Map("luci_statistics",
  3. translate("Thermal Plugin Configuration"),
  4. translate("The thermal plugin will monitor temperature of the system. " ..
  5. "Data is typically read from /sys/class/thermal/*/temp " ..
  6. "( '*' denotes the thermal device to be read, e.g. thermal_zone1 )")
  7. )
  8. -- collectd_thermal config section
  9. s = m:section( NamedSection, "collectd_thermal", "luci_statistics" )
  10. -- collectd_thermal.enable
  11. enable = s:option( Flag, "enable", translate("Enable this plugin") )
  12. enable.default = 0
  13. -- collectd_thermal.tz (Device)
  14. tz = s:option( Value, "Device", translate("Monitor device(s) / thermal zone(s)"),
  15. translate("Empty value = monitor all") )
  16. tz.optional = true
  17. tz:depends( "enable", 1 )
  18. -- collectd_thermal.ignoreselected (IgnoreSelected)
  19. ignoreselected = s:option( Flag, "IgnoreSelected", translate("Monitor all except specified") )
  20. ignoreselected.default = 0
  21. ignoreselected.optional = true
  22. ignoreselected:depends( "enable", 1 )
  23. return m