disk.lua 942 B

1234567891011121314151617181920212223242526272829
  1. -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
  2. -- Licensed to the public under the Apache License 2.0.
  3. m = Map("luci_statistics",
  4. translate("Disk Plugin Configuration"),
  5. translate(
  6. "The disk plugin collects detailled usage statistics " ..
  7. "for selected partitions or whole disks."
  8. ))
  9. -- collectd_disk config section
  10. s = m:section( NamedSection, "collectd_disk", "luci_statistics" )
  11. -- collectd_disk.enable
  12. enable = s:option( Flag, "enable", translate("Enable this plugin") )
  13. enable.default = 0
  14. -- collectd_disk.disks (Disk)
  15. devices = s:option( Value, "Disks", translate("Monitor disks and partitions") )
  16. devices.default = "hda1 hdb"
  17. devices.rmempty = true
  18. devices:depends( "enable", 1 )
  19. -- collectd_disk.ignoreselected (IgnoreSelected)
  20. ignoreselected = s:option( Flag, "IgnoreSelected", translate("Monitor all except specified") )
  21. ignoreselected.default = 0
  22. ignoreselected:depends( "enable", 1 )
  23. return m