Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mirrors
openwrt
luci
提交
97ce1ad8
L
luci
项目概览
mirrors
/
openwrt
/
luci
11 个月 前同步成功
通知
43
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
luci
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
97ce1ad8
编写于
8月 17, 2008
作者:
S
Steven Barth
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Preparing rewrite of WiFi configuration
上级
1d08361b
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
173 addition
and
79 deletion
+173
-79
contrib/package/luci-addons/dist/etc/crontabs/root
contrib/package/luci-addons/dist/etc/crontabs/root
+3
-3
i18n/english/luasrc/i18n/admin-core.en.lua
i18n/english/luasrc/i18n/admin-core.en.lua
+10
-1
i18n/german/luasrc/i18n/admin-core.de.lua
i18n/german/luasrc/i18n/admin-core.de.lua
+8
-1
libs/cbi/htdocs/luci-static/resources/cbi.js
libs/cbi/htdocs/luci-static/resources/cbi.js
+48
-38
libs/cbi/luasrc/cbi.lua
libs/cbi/luasrc/cbi.lua
+14
-2
libs/cbi/luasrc/view/cbi/cell_valuefooter.htm
libs/cbi/luasrc/view/cbi/cell_valuefooter.htm
+9
-1
libs/cbi/luasrc/view/cbi/footer.htm
libs/cbi/luasrc/view/cbi/footer.htm
+1
-1
libs/cbi/luasrc/view/cbi/full_valuefooter.htm
libs/cbi/luasrc/view/cbi/full_valuefooter.htm
+9
-1
libs/cbi/luasrc/view/cbi/lvalue.htm
libs/cbi/luasrc/view/cbi/lvalue.htm
+1
-1
libs/cbi/luasrc/view/cbi/ucisection.htm
libs/cbi/luasrc/view/cbi/ucisection.htm
+11
-2
modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
+1
-12
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
+58
-16
未找到文件。
contrib/package/luci-addons/dist/etc/crontabs/root
浏览文件 @
97ce1ad8
0-59/1
* * * * /usr/bin/run-parts /etc/cron.minutely
0
* * * * /usr/bin/run-parts /etc/cron.hourly
0 0
* * * /usr/bin/run-parts /etc/cron.daily
*
* * * * /usr/bin/run-parts /etc/cron.minutely
17
* * * * /usr/bin/run-parts /etc/cron.hourly
25 6
* * * /usr/bin/run-parts /etc/cron.daily
i18n/english/luasrc/i18n/admin-core.en.lua
浏览文件 @
97ce1ad8
...
...
@@ -278,4 +278,13 @@ mem_buffered = "buffered"
mem_free
=
"free"
a_s_crontab
=
"Scheduled Tasks"
a_s_crontab1
=
"This is the system crontab in which scheduled tasks can be defined."
\ No newline at end of file
a_s_crontab1
=
"This is the system crontab in which scheduled tasks can be defined."
a_w_nasid
=
"NAS ID"
a_w_cacert
=
"Path to CA-Certificate"
a_w_eaptype
=
"EAP-Method"
a_w_tlsprivkey
=
"Path to Private Key"
a_w_tlsprivkeypwd
=
"Password of Private Key"
a_w_peapauth
=
"PEAP-Authentication"
a_w_peapidentity
=
"PEAP-Identity"
a_w_peappassword
=
"PEAP-Password"
\ No newline at end of file
i18n/german/luasrc/i18n/admin-core.de.lua
浏览文件 @
97ce1ad8
...
...
@@ -355,4 +355,11 @@ mem_free = "frei"
a_s_crontab
=
"Geplante Aufgaben"
a_s_crontab1
=
"Dies ist die System-Crontab in der geplante Aufgaben definiert werden können."
a_w_nasid
=
"NAS ID"
\ No newline at end of file
a_w_nasid
=
"NAS ID"
a_w_cacert
=
"Pfad zum CA-Zertifikat"
a_w_eaptype
=
"EAP-Methode"
a_w_tlsprivkey
=
"Pfad zum Privaten Schlüssel"
a_w_tlsprivkeypwd
=
"Passwort des Privaten Schlüssels"
a_w_peapauth
=
"PEAP-Authentifizierung"
a_w_peapidentity
=
"PEAP-Identitäz"
a_w_peappassword
=
"PEAP-Passwort"
\ No newline at end of file
libs/cbi/htdocs/luci-static/resources/cbi.js
浏览文件 @
97ce1ad8
var
cbi_d
=
{}
;
var
cbi_d
=
[]
;
function
cbi_d_add
(
field
,
target
,
value
)
{
if
(
!
cbi_d
[
target
])
{
cbi_d
[
target
]
=
{};
}
if
(
!
cbi_d
[
target
][
value
])
{
cbi_d
[
target
][
value
]
=
[];
}
function
cbi_d_add
(
field
,
dep
)
{
var
obj
=
document
.
getElementById
(
field
);
if
(
obj
)
{
var
entry
=
{
"
node
"
:
obj
,
"
parent
"
:
obj
.
parentNode
,
"
next
"
:
obj
.
nextSibling
}
cbi_d
[
target
][
value
].
unshift
(
entry
);
}
}
function
cbi_d_update
(
target
)
{
if
(
!
cbi_d
[
target
])
{
return
;
}
for
(
var
x
in
cbi_d
[
target
])
{
for
(
var
i
=
0
;
i
<
cbi_d
[
target
][
x
].
length
;
i
++
)
{
var
entry
=
cbi_d
[
target
][
x
][
i
];
if
(
entry
.
node
.
parentNode
)
{
entry
.
parent
.
removeChild
(
entry
.
node
)
var
entry
for
(
var
i
=
0
;
i
<
cbi_d
.
length
;
i
++
)
{
if
(
cbi_d
[
i
].
id
==
field
)
{
entry
=
cbi_d
[
i
];
break
;
}
}
if
(
!
entry
)
{
entry
=
{
"
id
"
:
field
,
"
node
"
:
obj
,
"
parent
"
:
obj
.
parentNode
,
"
next
"
:
obj
.
nextSibling
,
"
deps
"
:
[]
};
cbi_d
.
unshift
(
entry
);
}
entry
.
deps
.
push
(
dep
)
}
}
function
cbi_d_value
(
target
)
{
var
t
=
document
.
getElementById
(
target
);
var
value
...
...
@@ -46,21 +38,39 @@ function cbi_d_update(target) {
}
}
if
(
cbi_d
[
target
][
value
])
{
for
(
var
i
=
0
;
i
<
cbi_d
[
target
][
value
].
length
;
i
++
)
{
var
entry
=
cbi_d
[
target
][
value
][
i
];
return
value
}
function
cbi_d_check
(
deps
)
{
for
(
var
i
=
0
;
i
<
deps
.
length
;
i
++
)
{
var
istat
=
true
for
(
var
j
in
deps
[
i
])
{
istat
=
(
istat
&&
cbi_d_value
(
j
)
==
deps
[
i
][
j
])
}
if
(
istat
)
{
return
true
}
}
}
function
cbi_d_update
()
{
var
state
=
false
;
for
(
var
i
=
0
;
i
<
cbi_d
.
length
;
i
++
)
{
var
entry
=
cbi_d
[
i
];
if
(
entry
.
node
.
parentNode
&&
!
cbi_d_check
(
entry
.
deps
))
{
entry
.
parent
.
removeChild
(
entry
.
node
);
state
=
(
state
||
!
entry
.
node
.
parentNode
)
}
else
if
(
!
entry
.
node
.
parentNode
&&
cbi_d_check
(
entry
.
deps
))
{
if
(
!
entry
.
next
)
{
entry
.
parent
.
appendChild
(
entry
.
node
);
}
else
{
entry
.
parent
.
insertBefore
(
entry
.
node
,
entry
.
next
);
}
}
state
=
(
state
||
entry
.
node
.
parentNode
)
}
}
}
function
cbi_d_init
()
{
for
(
var
x
in
cbi_d
)
{
cbi_d_update
(
x
);
if
(
state
)
{
cbi_d_update
();
}
}
...
...
libs/cbi/luasrc/cbi.lua
浏览文件 @
97ce1ad8
...
...
@@ -710,7 +710,15 @@ end
-- Add a dependencie to another section field
function
AbstractValue
.
depends
(
self
,
field
,
value
)
table.insert
(
self
.
deps
,
{
field
=
field
,
value
=
value
})
local
deps
if
type
(
field
)
==
"string"
then
deps
=
{}
deps
[
field
]
=
value
else
deps
=
field
end
table.insert
(
self
.
deps
,
{
deps
=
deps
,
add
=
""
})
end
-- Generates the unique CBID
...
...
@@ -897,10 +905,14 @@ function ListValue.__init__(self, ...)
self
.
widget
=
"select"
end
function
ListValue
.
value
(
self
,
key
,
val
)
function
ListValue
.
value
(
self
,
key
,
val
,
...
)
val
=
val
or
key
table.insert
(
self
.
keylist
,
tostring
(
key
))
table.insert
(
self
.
vallist
,
tostring
(
val
))
for
i
,
deps
in
ipairs
({
...
})
do
table.insert
(
self
.
deps
,
{
add
=
"-"
..
key
,
deps
=
deps
})
end
end
function
ListValue
.
validate
(
self
,
val
)
...
...
libs/cbi/luasrc/view/cbi/cell_valuefooter.htm
浏览文件 @
97ce1ad8
...
...
@@ -25,7 +25,15 @@ $Id$
<
%
if
#self.deps
>
0 then -%>
<script
type=
"text/javascript"
>
<%
for
j
,
d
in
ipairs
(
self
.
deps
)
do
-%>
cbi_d_add
(
"
cbi-<%=self.config..
"
-
"
..section..
"
-
"
..self.option%>
"
,
"
cbid.<%=self.config..
"
.
"
..section..
"
.
"
..d.field%>
"
,
"
<%=d.value%>
"
);
cbi_d_add
(
"
cbi-<%=self.config..
"
-
"
..section..
"
-
"
..self.option..d.add%>
"
,
{
<%-
for
k
,
v
in
pairs
(
d
.
deps
)
do
-%>
<%-=
string
.
format
(
'
"cbid.%s.%s.%s"
'
,
self
.
config
,
section
,
k
)
..
"
:
"
..
string
.
format
(
"
%q
"
,
v
)
-%>
,
<%-
end
-%>
});
<%-
end
%>
</script>
<
%
-
end
%
>
libs/cbi/luasrc/view/cbi/footer.htm
浏览文件 @
97ce1ad8
...
...
@@ -17,7 +17,7 @@ $Id$
<input
class=
"cbi-button cbi-button-apply"
type=
"submit"
name=
"cbi.apply"
value=
"<%:saveapply%>"
/>
<input
class=
"cbi-button cbi-button-save"
type=
"submit"
value=
"<%:save%>"
/>
<input
class=
"cbi-button cbi-button-reset"
type=
"reset"
value=
"<%:reset%>"
/>
<script
type=
"text/javascript"
>
cbi_d_
init
();
</script>
<script
type=
"text/javascript"
>
cbi_d_
update
();
</script>
</div>
</form>
<
%+
footer
%
>
libs/cbi/luasrc/view/cbi/full_valuefooter.htm
浏览文件 @
97ce1ad8
...
...
@@ -34,7 +34,15 @@ $Id$
<
%
if
#self.deps
>
0 then -%>
<script
type=
"text/javascript"
>
<%
for
j
,
d
in
ipairs
(
self
.
deps
)
do
-%>
cbi_d_add
(
"
cbi-<%=self.config..
"
-
"
..section..
"
-
"
..self.option%>
"
,
"
cbid.<%=self.config..
"
.
"
..section..
"
.
"
..d.field%>
"
,
"
<%=d.value%>
"
);
cbi_d_add
(
"
cbi-<%=self.config..
"
-
"
..section..
"
-
"
..self.option..d.add%>
"
,
{
<%-
for
k
,
v
in
pairs
(
d
.
deps
)
do
-%>
<%-=
string
.
format
(
'
"cbid.%s.%s.%s"
'
,
self
.
config
,
section
,
k
)
..
"
:
"
..
string
.
format
(
"
%q
"
,
v
)
-%>
,
<%-
end
-%>
});
<%-
end
%>
</script>
<
%
-
end
%
>
libs/cbi/luasrc/view/cbi/lvalue.htm
浏览文件 @
97ce1ad8
...
...
@@ -16,7 +16,7 @@ $Id$
<
%
if
self.widget =
=
"
select
"
then
%
>
<select
onchange=
"cbi_d_update(this.id)"
<%=
attr
("
id
",
cbid
)
..
attr
("
name
",
cbid
)
..
ifattr
(
self.size
,
"
size
")
%
>
>
<
%
for
i
,
key
in
pairs
(
self.keylist
)
do
-
%
>
<option
<%=
attr
("
value
",
key
)
..
ifattr(self:cfgvalue(section) =
=
key
,
"
selected
",
"
selected
")
%
>
>
<
%=
luci.util.pcdata
(
self.vallist
[
i
])%
></option>
<option
id=
"cbi-<%=self.config.."
-
"..
section..
"
-
"..
self.option..
"
-
"..
key
%
>
"
<
%=
attr
("
value
",
key
)
..
ifattr(self:cfgvalue(section) =
=
key
,
"
selected
",
"
selected
")
%
>
>
<
%=
luci.util.pcdata
(
self.vallist
[
i
])%
></option>
<
%
-
end
%
>
</select>
<
%
elseif
self.widget =
=
"
radio
"
then
...
...
libs/cbi/luasrc/view/cbi/ucisection.htm
浏览文件 @
97ce1ad8
...
...
@@ -27,8 +27,17 @@ $Id$
<
%
-
end
%
>
</select>
<script
type=
"text/javascript"
>
<%
for
key
,
val
in
pairs
(
self
.
optionals
[
section
])
do
%>
<%
if
#
val
.
deps
>
0
then
%><%
for
j
,
d
in
ipairs
(
val
.
deps
)
do
%>
cbi_d_add
(
"
cbi-<%=self.config..
"
-
"
..section..
"
-
"
..val.option%>
"
,
"
cbid.<%=self.config..
"
.
"
..section..
"
.
"
..d.field%>
"
,
"
<%=d.value%>
"
);
<%
end
%><%
end
%>
<%
if
#
val
.
deps
>
0
then
%><%
for
j
,
d
in
ipairs
(
val
.
deps
)
do
-%>
cbi_d_add
(
"
cbi-<%=self.config..
"
-
"
..section..
"
-
"
..val.option..d.add%>
"
,
{
<%-
for
k
,
v
in
pairs
(
d
.
deps
)
do
-%>
<%-=
string
.
format
(
'
"cbid.%s.%s.%s"
'
,
self
.
config
,
section
,
k
)
..
"
:
"
..
string
.
format
(
"
%q
"
,
v
)
-%>
,
<%-
end
-%>
});
<%-
end
%><%
end
%>
<%
end
%>
</script>
<
%
end
%
>
<input
type=
"submit"
class=
"cbi-button cbi-button-fieldadd"
value=
"<%:add%>"
/>
...
...
modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
浏览文件 @
97ce1ad8
...
...
@@ -25,18 +25,7 @@ function en.cfgvalue(self, section)
return
Flag
.
cfgvalue
(
self
,
section
)
or
"0"
end
t
=
s
:
option
(
ListValue
,
"type"
,
translate
(
"type"
))
t
:
value
(
"broadcom"
)
t
:
value
(
"atheros"
)
t
:
value
(
"mac80211"
)
t
:
value
(
"prism2"
)
--[[
require("luci.sys")
local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
for driver in luci.util.execl(c)[1]:gmatch("[^ ]+") do
t:value(driver)
end
]]
--
t
=
s
:
option
(
DummyValue
,
"type"
,
translate
(
"type"
))
mode
=
s
:
option
(
ListValue
,
"mode"
,
translate
(
"mode"
))
mode
:
value
(
""
,
"standard"
)
...
...
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
浏览文件 @
97ce1ad8
...
...
@@ -49,29 +49,71 @@ s:option(Flag, "bursting", translate("a_w_athburst")).optional = true
encr
=
s
:
option
(
ListValue
,
"encryption"
,
translate
(
"encryption"
))
encr
:
value
(
"none"
,
"keine"
)
encr
:
value
(
"wep"
,
"WEP"
)
encr
:
value
(
"psk"
,
"WPA-PSK"
)
encr
:
value
(
"wpa"
,
"WPA-Radius"
)
encr
:
value
(
"psk2"
,
"WPA2-PSK"
)
encr
:
value
(
"wpa2"
,
"WPA2-Radius"
)
key
=
s
:
option
(
Value
,
"key"
,
translate
(
"key"
))
key
:
depends
(
"encryption"
,
"wep"
)
key
:
depends
(
"encryption"
,
"psk"
)
key
:
depends
(
"encryption"
,
"wpa"
)
key
:
depends
(
"encryption"
,
"psk2"
)
key
:
depends
(
"encryption"
,
"wpa2"
)
key
.
rmempty
=
true
encr
:
value
(
"PSK"
,
"WPA-PSK"
)
encr
:
value
(
"WPA"
,
"WPA-EAP"
,
{
mode
=
"ap"
},
{
mode
=
"sta"
})
encr
:
value
(
"PSK2"
,
"WPA2-PSK"
)
encr
:
value
(
"WPA2"
,
"WPA2-EAP"
,
{
mode
=
"ap"
},
{
mode
=
"sta"
})
encr
:
depends
(
"mode"
,
"ap"
)
encr
:
depends
(
"mode"
,
"sta"
)
encr
:
depends
(
"mode"
,
"wds"
)
server
=
s
:
option
(
Value
,
"server"
,
translate
(
"a_w_radiussrv"
))
server
:
depends
(
"encryption"
,
"wpa"
)
server
:
depends
(
"encryption"
,
"wpa2"
)
server
:
depends
(
{
mode
=
"ap"
,
encryption
=
"WPA"
}
)
server
:
depends
(
{
mode
=
"ap"
,
encryption
=
"WPA2"
}
)
server
.
rmempty
=
true
port
=
s
:
option
(
Value
,
"port"
,
translate
(
"a_w_radiusport"
))
port
:
depends
(
"encryption"
,
"wpa"
)
port
:
depends
(
"encryption"
,
"wpa2"
)
port
:
depends
(
{
mode
=
"ap"
,
encryption
=
"WPA"
}
)
port
:
depends
(
{
mode
=
"ap"
,
encryption
=
"WPA2"
}
)
port
.
rmempty
=
true
key
=
s
:
option
(
Value
,
"key"
,
translate
(
"key"
))
key
:
depends
(
"encryption"
,
"wep"
)
key
:
depends
(
"encryption"
,
"PSK"
)
key
:
depends
({
mode
=
"ap"
,
encryption
=
"WPA"
})
key
:
depends
(
"encryption"
,
"PSK2"
)
key
:
depends
({
mode
=
"ap"
,
encryption
=
"WPA2"
})
key
.
rmempty
=
true
nasid
=
s
:
option
(
Value
,
"nasid"
,
translate
(
"a_w_nasid"
))
nasid
:
depends
({
mode
=
"ap"
,
encryption
=
"WPA"
})
nasid
:
depends
({
mode
=
"ap"
,
encryption
=
"WPA2"
})
nasid
.
rmempty
=
true
eaptype
=
s
:
option
(
ListValue
,
"eap_type"
,
translate
(
"a_w_eaptype"
))
eaptype
:
value
(
"TLS"
)
eaptype
:
value
(
"PEAP"
)
eaptype
:
depends
({
mode
=
"sta"
,
encryption
=
"WPA"
})
eaptype
:
depends
({
mode
=
"sta"
,
encryption
=
"WPA2"
})
cacert
=
s
:
option
(
Value
,
"ca_cert"
,
translate
(
"a_w_cacert"
))
cacert
:
depends
({
mode
=
"sta"
,
encryption
=
"WPA"
})
cacert
:
depends
({
mode
=
"sta"
,
encryption
=
"WPA2"
})
privkey
=
s
:
option
(
Value
,
"priv_key"
,
translate
(
"a_w_tlsprivkey"
))
privkey
:
depends
({
mode
=
"sta"
,
eap_type
=
"TLS"
,
encryption
=
"WPA2"
})
privkey
:
depends
({
mode
=
"sta"
,
eap_type
=
"TLS"
,
encryption
=
"WPA"
})
privkeypwd
=
s
:
option
(
Value
,
"priv_key_pwd"
,
translate
(
"a_w_tlsprivkeypwd"
))
privkeypwd
:
depends
({
mode
=
"sta"
,
eap_type
=
"TLS"
,
encryption
=
"WPA2"
})
privkeypwd
:
depends
({
mode
=
"sta"
,
eap_type
=
"TLS"
,
encryption
=
"WPA"
})
auth
=
s
:
option
(
Value
,
"auth"
,
translate
(
"a_w_peapauth"
))
auth
:
depends
({
mode
=
"sta"
,
eap_type
=
"PEAP"
,
encryption
=
"WPA2"
})
auth
:
depends
({
mode
=
"sta"
,
eap_type
=
"PEAP"
,
encryption
=
"WPA"
})
identity
=
s
:
option
(
Value
,
"identity"
,
translate
(
"a_w_peapidentity"
))
identity
:
depends
({
mode
=
"sta"
,
eap_type
=
"PEAP"
,
encryption
=
"WPA2"
})
identity
:
depends
({
mode
=
"sta"
,
eap_type
=
"PEAP"
,
encryption
=
"WPA"
})
password
=
s
:
option
(
Value
,
"password"
,
translate
(
"a_w_peappassword"
))
password
:
depends
({
mode
=
"sta"
,
eap_type
=
"PEAP"
,
encryption
=
"WPA2"
})
password
:
depends
({
mode
=
"sta"
,
eap_type
=
"PEAP"
,
encryption
=
"WPA"
})
s
:
option
(
Flag
,
"isolate"
,
translate
(
"a_w_apisolation"
),
translate
(
"a_w_apisolation1"
)).
optional
=
true
s
:
option
(
Flag
,
"hidden"
,
translate
(
"a_w_hideessid"
)).
optional
=
true
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录