2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
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
10 http://www.apache.org/licenses/LICENSE-2.0
14 m = Map("system", translate("leds"), translate("leds_desc"))
16 s = m:section(TypedSection, "led", "")
21 s:option(Value, "name")
23 sysfs = s:option(ListValue, "sysfs")
24 for k, v in pairs(luci.fs.dir("/sys/class/leds/")) do
25 if v ~= "." and v ~= ".." then
30 s:option(Flag, "default").rmempty = true
32 trigger = s:option(Value, "trigger")
33 trigger.rmempty = true
34 trigger:value("netdev")
37 dev = s:option(ListValue, "dev")
40 dev:depends("trigger", "netdev")
41 for k, v in pairs(luci.sys.net.devices()) do
47 mode = s:option(Value, "mode")
50 mode:depends("trigger", "netdev")