Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mirrors
openwrt
luci
提交
880a3059
L
luci
项目概览
mirrors
/
openwrt
/
luci
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
880a3059
编写于
6月 25, 2011
作者:
J
Jo-Philipp Wich
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
luci-0.10: merge r7229 and r7230
上级
f3753fa7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
12 deletion
+31
-12
modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
+30
-11
themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
...nk-generic/luasrc/view/themes/freifunk-generic/header.htm
+1
-1
未找到文件。
modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
浏览文件 @
880a3059
...
...
@@ -2,7 +2,7 @@
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@subsignal.org>
Copyright 2008
-2011
Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
...
...
@@ -659,20 +659,16 @@ end
if
has_dnsmasq
and
net
:
proto
()
==
"static"
then
m2
=
Map
(
"dhcp"
,
""
,
""
)
function
m2
.
on_parse
()
local
has_section
=
false
local
section_id
=
"-"
function
m2
.
on_parse
()
m2
.
uci
:
foreach
(
"dhcp"
,
"dhcp"
,
function
(
s
)
if
s
.
interface
==
arg
[
1
]
then
has_section
=
true
section_id
=
s
[
'.name'
]
return
false
end
end
)
if
not
has_section
then
m2
.
uci
:
section
(
"dhcp"
,
"dhcp"
,
nil
,
{
interface
=
arg
[
1
],
ignore
=
"1"
})
m2
.
uci
:
save
(
"dhcp"
)
end
end
s
=
m2
:
section
(
TypedSection
,
"dhcp"
,
translate
(
"DHCP Server"
))
...
...
@@ -681,8 +677,8 @@ if has_dnsmasq and net:proto() == "static" then
s
:
tab
(
"general"
,
translate
(
"General Setup"
))
s
:
tab
(
"advanced"
,
translate
(
"Advanced Settings"
))
function
s
.
filter
(
self
,
section
)
return
m2
.
uci
:
get
(
"dhcp"
,
section
,
"interface"
)
==
arg
[
1
]
function
s
.
cfgsections
(
self
)
return
{
section_id
}
end
local
ignore
=
s
:
taboption
(
"general"
,
Flag
,
"ignore"
,
...
...
@@ -692,6 +688,18 @@ if has_dnsmasq and net:proto() == "static" then
ignore
.
rmempty
=
false
function
ignore
.
cfgvalue
(
self
,
section
)
return
(
section
==
"-"
)
and
self
.
enabled
or
Flag
.
cfgvalue
(
self
,
section
)
end
function
ignore
.
write
(
self
,
section
,
value
)
section_id
=
m2
.
uci
:
section
(
"dhcp"
,
"dhcp"
,
nil
,
{
ignore
=
value
,
interface
=
arg
[
1
]
})
end
local
start
=
s
:
taboption
(
"general"
,
Value
,
"start"
,
translate
(
"Start"
),
translate
(
"Lowest leased address as offset from the network address."
))
start
.
optional
=
true
...
...
@@ -734,9 +742,20 @@ if has_dnsmasq and net:proto() == "static" then
translate
(
"Define additional DHCP options, for example \"
<
code
>
6
,
192
.
168
.
2
.
1
,
" ..
"
192
.
168
.
2
.
2
</
code
>
\
" which advertises different DNS servers to clients."
))
local
function
write_opt
(
self
,
section
,
value
)
return
getmetatable
(
self
).
__index
.
write
(
self
,
section_id
,
value
)
end
local
function
remove_opt
(
self
,
section
,
value
)
return
getmetatable
(
self
).
__index
.
remove
(
self
,
section_id
,
value
)
end
for
i
,
n
in
ipairs
(
s
.
children
)
do
if
n
~=
ignore
then
n
:
depends
(
"ignore"
,
""
)
n
.
write
=
write_opt
n
.
remove
=
remove_opt
end
end
end
...
...
themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
浏览文件 @
880a3059
...
...
@@ -208,7 +208,7 @@ if tree.nodes[category] and tree.nodes[category].ucidata then
<div
id=
"savemenu"
>
<
%
if
ucic
>
0 then %>
<a
class=
"warning"
href=
"<%=controller%>/<%=category%>/uci/changes/?redir=<%=luci.http.urlencode(
tree.nodes[category].nodes["
uci
"].
query
)%
>
">
<
%
:Unsaved
Changes
%
>
:
<
%=
ucic
%
></a>
<a
class=
"warning"
href=
"<%=controller%>/<%=category%>/uci/changes/?redir=<%=luci.http.urlencode(
luci.http.formvalue("
redir
")
or
REQUEST_URI
)%
>
">
<
%
:Unsaved
Changes
%
>
:
<
%=
ucic
%
></a>
<
%
end
-
%
>
</div><
%
end
%
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录