summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-radvd/luasrc/model/cbi/radvd.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-01-13 20:03:40 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-01-13 20:03:40 +0000
commit1db135a32f73ce9445f8f498123dbb632f4b5bca (patch)
tree282ecd13634b50782e07ce6370cb09374803e227 /applications/luci-radvd/luasrc/model/cbi/radvd.lua
parentbd8ac05d56d89f0db6a1e06fefa9a8ce8776547d (diff)
applications/luci-radvd: expose ignore option, assign column widths
Diffstat (limited to 'applications/luci-radvd/luasrc/model/cbi/radvd.lua')
-rw-r--r--applications/luci-radvd/luasrc/model/cbi/radvd.lua50
1 files changed, 50 insertions, 0 deletions
diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd.lua b/applications/luci-radvd/luasrc/model/cbi/radvd.lua
index 041decce5f..18df46b191 100644
--- a/applications/luci-radvd/luasrc/model/cbi/radvd.lua
+++ b/applications/luci-radvd/luasrc/model/cbi/radvd.lua
@@ -53,9 +53,20 @@ function s.remove(self, section)
return TypedSection.remove(self, section)
end
+o = s:option(Flag, "ignore", translate("Enable"))
+o.rmempty = false
+o.width = "30px"
+function o.cfgvalue(...)
+ local v = Flag.cfgvalue(...)
+ return v == "1" and "0" or "1"
+end
+function o.write(self, section, value)
+ Flag.write(self, section, value == "1" and "0" or "1")
+end
o = s:option(DummyValue, "interface", translate("Interface"))
o.template = "cbi/network_netinfo"
+o.width = "10%"
o = s:option(DummyValue, "UnicastOnly", translate("Multicast"))
function o.cfgvalue(...)
@@ -104,10 +115,23 @@ function s2.create(...)
end
+o = s2:option(Flag, "ignore", translate("Enable"))
+o.rmempty = false
+o.width = "30px"
+function o.cfgvalue(...)
+ local v = Flag.cfgvalue(...)
+ return v == "1" and "0" or "1"
+end
+function o.write(self, section, value)
+ Flag.write(self, section, value == "1" and "0" or "1")
+end
+
o = s2:option(DummyValue, "interface", translate("Interface"))
o.template = "cbi/network_netinfo"
+o.width = "10%"
o = s2:option(DummyValue, "prefix", translate("Prefix"))
+o.width = "60%"
function o.cfgvalue(self, section)
local v = Value.cfgvalue(self, section)
if not v then
@@ -168,10 +192,23 @@ function s3.create(...)
end
+o = s3:option(Flag, "ignore", translate("Enable"))
+o.rmempty = false
+o.width = "30px"
+function o.cfgvalue(...)
+ local v = Flag.cfgvalue(...)
+ return v == "1" and "0" or "1"
+end
+function o.write(self, section, value)
+ Flag.write(self, section, value == "1" and "0" or "1")
+end
+
o = s3:option(DummyValue, "interface", translate("Interface"))
o.template = "cbi/network_netinfo"
+o.width = "10%"
o = s3:option(DummyValue, "prefix", translate("Prefix"))
+o.width = "60%"
function o.cfgvalue(self, section)
local v = Value.cfgvalue(self, section)
if v then
@@ -210,10 +247,23 @@ function s.create(...)
end
+o = s4:option(Flag, "ignore", translate("Enable"))
+o.rmempty = false
+o.width = "30px"
+function o.cfgvalue(...)
+ local v = Flag.cfgvalue(...)
+ return v == "1" and "0" or "1"
+end
+function o.write(self, section, value)
+ Flag.write(self, section, value == "1" and "0" or "1")
+end
+
o = s4:option(DummyValue, "interface", translate("Interface"))
o.template = "cbi/network_netinfo"
+o.width = "10%"
o = s4:option(DummyValue, "addr", translate("Address"))
+o.width = "60%"
function o.cfgvalue(self, section)
local v = Value.cfgvalue(self, section)
if not v then