04872d90b443ac62b0aa7cc813ee38ea73e15969
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / disk.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
2 -- Licensed to the public under the Apache License 2.0.
3
4 m = Map("luci_statistics",
5         translate("Disk Plugin Configuration"),
6         translate(
7                 "The disk plugin collects detailled usage statistics " ..
8                 "for selected partitions or whole disks."
9         ))
10
11 -- collectd_disk config section
12 s = m:section( NamedSection, "collectd_disk", "luci_statistics" )
13
14 -- collectd_disk.enable
15 enable = s:option( Flag, "enable", translate("Enable this plugin") )
16 enable.default = 0
17
18 -- collectd_disk.disks (Disk)
19 devices = s:option( Value, "Disks", translate("Monitor disks and partitions") )
20 devices.default = "hda1 hdb"
21 devices.rmempty = true
22 devices:depends( "enable", 1 )
23
24 -- collectd_disk.ignoreselected (IgnoreSelected)
25 ignoreselected = s:option( Flag, "IgnoreSelected", translate("Monitor all except specified") )
26 ignoreselected.default = 0
27 ignoreselected:depends( "enable", 1 )
28
29 return m