luci-0.11: merge r9571 - r9622
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / nut.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright © 2011 Manuel Munz <freifunk at somakoma dot de>
5 Copyright © 2012 David Woodhouse <dwmw2@infradead.org>
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12 ]]--
13
14 m = Map("luci_statistics",
15 translate("UPS Plugin Configuration"),
16 translate("The NUT plugin reads information about Uninterruptible Power Supplies."))
17
18 s = m:section(NamedSection, "collectd_nut", "luci_statistics" )
19
20 enable = s:option(Flag, "enable", translate("Enable this plugin"))
21 enable.default = 0
22
23 host = s:option(Value, "UPS", translate("UPS"), translate("UPS name in NUT ups@host format"))
24 host.placeholder = "myupsname"
25 host.datatype = "string"
26 host.rmempty = true
27
28 return m