Rework LuCI build system
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / df.lua
1 --[[
2
3 Luci configuration model for statistics - collectd df plugin configuration
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 ]]--
15
16 m = Map("luci_statistics",
17         translate("DF Plugin Configuration"),
18         translate(
19                 "The df plugin collects statistics about the disk space " ..
20                 "usage on different devices, mount points or filesystem types."
21         ))
22
23 -- collectd_df config section
24 s = m:section( NamedSection, "collectd_df", "luci_statistics" )
25
26 -- collectd_df.enable
27 enable = s:option( Flag, "enable", translate("Enable this plugin") )
28 enable.default = 0
29
30 -- collectd_df.devices (Device)
31 devices = s:option( Value, "Devices", translate("Monitor devices") )
32 devices.default  = "/dev/mtdblock/4"
33 devices.optional = true
34 devices:depends( "enable", 1 )
35
36 -- collectd_df.mountpoints (MountPoint)
37 mountpoints = s:option( Value, "MountPoints", translate("Monitor mount points") )
38 mountpoints.default  = "/overlay"
39 mountpoints.optional = true
40 mountpoints:depends( "enable", 1 )
41
42 -- collectd_df.fstypes (FSType)
43 fstypes = s:option( Value, "FSTypes", translate("Monitor filesystem types") )
44 fstypes.default  = "tmpfs"
45 fstypes.optional = true
46 fstypes:depends( "enable", 1 )
47
48 -- collectd_df.ignoreselected (IgnoreSelected)
49 ignoreselected = s:option( Flag, "IgnoreSelected", translate("Monitor all except specified") )
50 ignoreselected.default = 0
51 ignoreselected:depends( "enable", 1 )
52
53 return m