projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bd8ac05
)
applications/luci-radvd: expose ignore option, assign column widths
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 13 Jan 2011 20:03:40 +0000
(20:03 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 13 Jan 2011 20:03:40 +0000
(20:03 +0000)
applications/luci-radvd/luasrc/model/cbi/radvd.lua
patch
|
blob
|
history
applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua
patch
|
blob
|
history
applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua
patch
|
blob
|
history
applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua
patch
|
blob
|
history
applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
patch
|
blob
|
history
diff --git
a/applications/luci-radvd/luasrc/model/cbi/radvd.lua
b/applications/luci-radvd/luasrc/model/cbi/radvd.lua
index
041decc
..
18df46b
100644
(file)
--- 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
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 = s:option(DummyValue, "interface", translate("Interface"))
o.template = "cbi/network_netinfo"
+o.width = "10%"
o = s:option(DummyValue, "UnicastOnly", translate("Multicast"))
function o.cfgvalue(...)
o = s:option(DummyValue, "UnicastOnly", translate("Multicast"))
function o.cfgvalue(...)
@@
-104,10
+115,23
@@
function s2.create(...)
end
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 = s2:option(DummyValue, "interface", translate("Interface"))
o.template = "cbi/network_netinfo"
+o.width = "10%"
o = s2:option(DummyValue, "prefix", translate("Prefix"))
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
function o.cfgvalue(self, section)
local v = Value.cfgvalue(self, section)
if not v then
@@
-168,10
+192,23
@@
function s3.create(...)
end
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 = s3:option(DummyValue, "interface", translate("Interface"))
o.template = "cbi/network_netinfo"
+o.width = "10%"
o = s3:option(DummyValue, "prefix", translate("Prefix"))
o = s3:option(DummyValue, "prefix", translate("Prefix"))
+o.width = "60%"
function o.cfgvalue(self, section)
local v = Value.cfgvalue(self, section)
if v then
function o.cfgvalue(self, section)
local v = Value.cfgvalue(self, section)
if v then
@@
-210,10
+247,23
@@
function s.create(...)
end
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 = s4:option(DummyValue, "interface", translate("Interface"))
o.template = "cbi/network_netinfo"
+o.width = "10%"
o = s4:option(DummyValue, "addr", translate("Address"))
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
function o.cfgvalue(self, section)
local v = Value.cfgvalue(self, section)
if not v then
diff --git
a/applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua
b/applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua
index
ca510cd
..
ae8e062
100644
(file)
--- a/
applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua
+++ b/
applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua
@@
-47,6
+47,19
@@
s:tab("mobile", translate("Mobile IPv6"))
-- General
--
-- General
--
+o = s:taboption("general", Flag, "ignore", translate("Enable"))
+o.rmempty = false
+
+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:taboption("general", Value, "interface", translate("Interface"),
translate("Specifies the logical interface name this section belongs to"))
o = s:taboption("general", Value, "interface", translate("Interface"),
translate("Specifies the logical interface name this section belongs to"))
diff --git
a/applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua
b/applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua
index
460a244
..
d3567cb
100644
(file)
--- a/
applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua
+++ b/
applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua
@@
-38,6
+38,19
@@
s:tab("advanced", translate("Advanced"))
-- General
--
-- General
--
+o = s:taboption("general", Flag, "ignore", translate("Enable"))
+o.rmempty = false
+
+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:taboption("general", Value, "interface", translate("Interface"),
translate("Specifies the logical interface name this section belongs to"))
o = s:taboption("general", Value, "interface", translate("Interface"),
translate("Specifies the logical interface name this section belongs to"))
diff --git
a/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua
b/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua
index
31450b8
..
91cf25c
100644
(file)
--- a/
applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua
+++ b/
applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua
@@
-35,6
+35,19
@@
s.addremove = false
-- General
--
-- General
--
+o = s:option(Flag, "ignore", translate("Enable"))
+o.rmempty = false
+
+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(Value, "interface", translate("Interface"),
translate("Specifies the logical interface name this section belongs to"))
o = s:option(Value, "interface", translate("Interface"),
translate("Specifies the logical interface name this section belongs to"))
diff --git
a/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
b/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
index
31b6900
..
6e84d0f
100644
(file)
--- a/
applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
+++ b/
applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
@@
-35,6
+35,19
@@
s.addremove = false
-- General
--
-- General
--
+o = s:option(Flag, "ignore", translate("Enable"))
+o.rmempty = false
+
+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(Value, "interface", translate("Interface"),
translate("Specifies the logical interface name this section belongs to"))
o = s:option(Value, "interface", translate("Interface"),
translate("Specifies the logical interface name this section belongs to"))