summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-hd_idle/luasrc/model
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-10-02 13:52:28 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-10-02 13:52:28 +0000
commit3f372dd416348af57905e8f3ef72aefe0012a250 (patch)
tree2a597d2e8b1f10d55ec9de3a0d0efb5e29fbbcab /applications/luci-hd_idle/luasrc/model
parentb5de7f81384b38737fbdecfe6179fe5905fa73d8 (diff)
* luci/applications: add hd-idle application, thanks Yanira
Diffstat (limited to 'applications/luci-hd_idle/luasrc/model')
-rw-r--r--applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua b/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua
new file mode 100644
index 0000000000..32db2605ed
--- /dev/null
+++ b/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua
@@ -0,0 +1,36 @@
+--[[
+
+LuCI hd-idle
+(c) 2008 Yanira <forum-2008@email.de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+]]--
+
+m = Map("hd-idle", translate("hd_idle"), translate("hd_idle_desc"))
+
+s = m:section(TypedSection, "hd-idle", translate("settings"))
+s.addremove = true
+s.anonymous = true
+
+s:option(Flag, "enabled", translate("enabled", "Enable"))
+
+s:option(Value, "disk", translate("disk")).rmempty = true
+
+s:option(Value, "idle_time_interval", translate("idle_time_interval")).default = 10
+s.rmempty = true
+unit = s:option(ListValue, "idle_time_unit", translate("idle_time_unit"))
+unit.default = "minutes"
+unit:value("minutes", "min")
+unit:value("hours", "h")
+unit.rmempty = true
+
+s:option(Flag, "enable_debug", translate("enable_debug"))
+
+return m