Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mirrors
openwrt
luci
提交
0bc7760c
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,发现更多精彩内容 >>
提交
0bc7760c
编写于
10月 26, 2011
作者:
J
Jo-Philipp Wich
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modules/admin-full: unify style of headings accross system menus, remove orphaned template
上级
da527d2c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
52 addition
and
85 deletion
+52
-85
modules/admin-full/luasrc/model/cbi/admin_system/backupfiles.lua
.../admin-full/luasrc/model/cbi/admin_system/backupfiles.lua
+1
-1
modules/admin-full/luasrc/model/cbi/admin_system/system.lua
modules/admin-full/luasrc/model/cbi/admin_system/system.lua
+43
-38
modules/admin-full/luasrc/view/admin_system/backup.htm
modules/admin-full/luasrc/view/admin_system/backup.htm
+0
-40
modules/admin-full/luasrc/view/admin_system/flashops.htm
modules/admin-full/luasrc/view/admin_system/flashops.htm
+1
-1
modules/admin-full/luasrc/view/admin_system/packages.htm
modules/admin-full/luasrc/view/admin_system/packages.htm
+3
-1
modules/admin-full/luasrc/view/admin_system/upgrade.htm
modules/admin-full/luasrc/view/admin_system/upgrade.htm
+4
-4
未找到文件。
modules/admin-full/luasrc/model/cbi/admin_system/backupfiles.lua
浏览文件 @
0bc7760c
...
...
@@ -21,7 +21,7 @@ elseif luci.http.formvalue("cbid.luci.1._edit") then
return
end
m
=
SimpleForm
(
"luci"
,
"%s - %s - %s"
%
{
translate
(
"System"
),
translate
(
"Flash operations"
),
translate
(
"Backup file list"
)
}
)
m
=
SimpleForm
(
"luci"
,
translate
(
"Backup file list"
)
)
m
:
append
(
Template
(
"admin_system/backupfiles"
))
if
luci
.
http
.
formvalue
(
"display"
)
~=
"list"
then
...
...
modules/admin-full/luasrc/model/cbi/admin_system/system.lua
浏览文件 @
0bc7760c
...
...
@@ -19,16 +19,12 @@ require("luci.tools.webadmin")
require
(
"luci.fs"
)
require
(
"luci.config"
)
m
=
Map
(
"system"
,
translate
(
"System"
),
translate
(
"Here you can configure the basic aspects of your device like its hostname or the timezone."
))
m
:
chain
(
"luci
"
)
local
m
,
s
,
o
local
has_ntpd
=
luci
.
fs
.
access
(
"/usr/sbin/ntpd
"
)
local
has_rdate
=
false
m
.
uci
:
foreach
(
"system"
,
"rdate"
,
function
()
has_rdate
=
true
return
false
end
)
m
=
Map
(
"system"
,
translate
(
"System"
),
translate
(
"Here you can configure the basic aspects of your device like its hostname or the timezone."
))
m
:
chain
(
"luci"
)
s
=
m
:
section
(
TypedSection
,
"system"
,
translate
(
"System Properties"
))
...
...
@@ -44,27 +40,27 @@ s:tab("language", translate("Language and Style"))
-- System Properties
--
clock
=
s
:
taboption
(
"general"
,
DummyValue
,
"_systime"
,
translate
(
"Local Time"
))
clock
.
template
=
"admin_system/clock_status"
o
=
s
:
taboption
(
"general"
,
DummyValue
,
"_systime"
,
translate
(
"Local Time"
))
o
.
template
=
"admin_system/clock_status"
hn
=
s
:
taboption
(
"general"
,
Value
,
"hostname"
,
translate
(
"Hostname"
))
hn
.
datatype
=
"hostname"
o
=
s
:
taboption
(
"general"
,
Value
,
"hostname"
,
translate
(
"Hostname"
))
o
.
datatype
=
"hostname"
function
hn
.
write
(
self
,
section
,
value
)
function
o
.
write
(
self
,
section
,
value
)
Value
.
write
(
self
,
section
,
value
)
luci
.
sys
.
hostname
(
value
)
end
tz
=
s
:
taboption
(
"general"
,
ListValue
,
"zonename"
,
translate
(
"Timezone"
))
tz
:
value
(
"UTC"
)
o
=
s
:
taboption
(
"general"
,
ListValue
,
"zonename"
,
translate
(
"Timezone"
))
o
:
value
(
"UTC"
)
for
i
,
zone
in
ipairs
(
luci
.
sys
.
zoneinfo
.
TZ
)
do
tz
:
value
(
zone
[
1
])
o
:
value
(
zone
[
1
])
end
function
tz
.
write
(
self
,
section
,
value
)
function
o
.
write
(
self
,
section
,
value
)
local
function
lookup_zone
(
title
)
for
_
,
zone
in
ipairs
(
luci
.
sys
.
zoneinfo
.
TZ
)
do
if
zone
[
1
]
==
title
then
return
zone
[
2
]
end
...
...
@@ -155,31 +151,40 @@ end
--
--
Rdate
--
NTP
--
if
has_rdate
then
m2
=
Map
(
"timeserver"
,
translate
(
"Time Server (rdate)"
))
s
=
m2
:
section
(
TypedSection
,
"timeserver"
)
if
has_ntpd
then
s
=
m
:
section
(
TypedSection
,
"timeserver"
,
translate
(
"Time Synchronization"
))
s
.
anonymous
=
true
s
.
addremove
=
true
s
.
template
=
"cbi/tblsection"
h
=
s
:
option
(
Value
,
"hostname"
,
translate
(
"Name"
))
h
.
rmempty
=
true
h
.
datatype
=
host
i
=
s
:
option
(
ListValue
,
"interface"
,
translate
(
"Interface"
))
i
.
rmempty
=
true
i
:
value
(
""
,
translate
(
"Default"
))
m2
.
uci
:
foreach
(
"network"
,
"interface"
,
function
(
section
)
local
ifc
=
section
[
".name"
]
if
ifc
~=
"loopback"
then
i
:
value
(
ifc
)
end
s
.
addremove
=
false
o
=
s
:
option
(
Flag
,
"enable"
,
translate
(
"Enable builtin NTP server"
))
o
.
rmempty
=
false
function
o
.
cfgvalue
(
self
)
return
luci
.
sys
.
init
.
enabled
(
"sysntpd"
)
and
self
.
enabled
or
self
.
disabled
end
function
o
.
write
(
self
,
section
,
value
)
if
value
==
self
.
enabled
then
luci
.
sys
.
init
.
enable
(
"sysntpd"
)
luci
.
sys
.
call
(
"env -i /etc/init.d/sysntpd start >/dev/null"
)
else
luci
.
sys
.
call
(
"env -i /etc/init.d/sysntpd stop >/dev/null"
)
luci
.
sys
.
init
.
disable
(
"sysntpd"
)
end
)
end
o
=
s
:
option
(
DynamicList
,
"server"
,
translate
(
"NTP server candidates"
))
o
.
datatype
=
"host"
o
:
depends
(
"enable"
,
"1"
)
-- retain server list even if disabled
function
o
.
remove
()
end
end
return
m
,
m2
return
m
modules/admin-full/luasrc/view/admin_system/backup.htm
已删除
100644 → 0
浏览文件 @
da527d2c
<
%
#
LuCI
-
Lua
Configuration
Interface
Copyright
2008
Steven
Barth
<
steven
@
midlink.org
>
Copyright 2008 Jo-Philipp Wich
<xm
@
leipzig.freifunk.net
>
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$
-%>
<
%+
header
%
>
<h2><a
id=
"content"
name=
"content"
><
%
:System
%
></a></h2>
<h3><
%
:Backup
/
Restore
%
></h3>
<p><
%
:Here
you
can
backup
and
restore
your
router
configuration
and
-
if
possible
-
reset
the
router
to
the
default
settings.
%
></p>
<br
/>
<div>
<ul>
<li><a
href=
"<%=REQUEST_URI%>?backup=kthxbye"
><
%
:Create
backup
%
></a></li>
<
%
if
reset_avail
then
-
%
>
<li><a
href=
"<%=REQUEST_URI%>?reset=yarly"
onclick=
"return confirm('<%:Proceed reverting all settings and resetting to firmware defaults?%>')"
><
%
:Reset
router
to
defaults
%
></a></li>
<
%
end
-
%
>
</ul>
</div>
<br
/>
<form
method=
"post"
action=
"<%=REQUEST_URI%>"
enctype=
"multipart/form-data"
>
<div
class=
"left"
><
%
:Backup
Archive
%
>
:
</div>
<div>
<input
type=
"file"
size=
"30"
name=
"archive"
/>
</div>
<div>
<input
type=
"submit"
class=
"cbi-button cbi-input-apply"
value=
"<%:Restore backup%>"
/>
</div>
</form>
<
%+
footer
%
>
modules/admin-full/luasrc/view/admin_system/flashops.htm
浏览文件 @
0bc7760c
...
...
@@ -15,7 +15,7 @@ $Id$
<
%+
header
%
>
<h2><a
id=
"content"
name=
"content"
><
%
:
System
%
>
-
<
%
:
Flash
operations
%
></a></h2>
<h2><a
id=
"content"
name=
"content"
><
%
:Flash
operations
%
></a></h2>
<ul
class=
"cbi-tabmenu"
>
<li
class=
"cbi-tab"
><a
href=
"#"
><
%
:Actions
%
></a></li>
...
...
modules/admin-full/luasrc/view/admin_system/packages.htm
浏览文件 @
0bc7760c
...
...
@@ -48,8 +48,10 @@ else
end
-%>
<
%+
header
%
>
<h2><a
id=
"content"
name=
"content"
><
%
:System
%
>
-
<
%
:Software
%
></a></h2>
<h2><a
id=
"content"
name=
"content"
><
%
:Software
%
></a></h2>
<form
method=
"post"
action=
"<%=REQUEST_URI%>"
>
<div
class=
"cbi-map"
>
...
...
modules/admin-full/luasrc/view/admin_system/upgrade.htm
浏览文件 @
0bc7760c
...
...
@@ -15,7 +15,7 @@ $Id$
<
%+
header
%
>
<h2><a
id=
"content"
name=
"content"
><
%
:
System
%
>
-
<
%
:
Flash
Firmware
%
>
-
<
%
:Verify
%
></a></h2>
<h2><a
id=
"content"
name=
"content"
><
%
:Flash
Firmware
%
>
-
<
%
:Verify
%
></a></h2>
<p>
<
%
_
The
flash
image
was
uploaded.
Below
is
the
checksum
and
file
size
listed
,
...
...
@@ -54,14 +54,14 @@ $Id$
</fieldset>
<div
class=
"cbi-page-actions right"
>
<form
style=
"display:inline"
action=
"<%=REQUEST_URI%>"
method=
"post"
>
<input
class=
"cbi-button cbi-button-reset"
type=
"submit"
value=
"<%:Cancel%>"
/>
</form>
<form
style=
"display:inline"
action=
"<%=REQUEST_URI%>"
method=
"post"
>
<input
type=
"hidden"
name=
"step"
value=
"2"
/>
<input
type=
"hidden"
name=
"keep"
value=
"<%=keep and "
1"
or
""%
>
" />
<input
class=
"cbi-button cbi-button-apply"
type=
"submit"
value=
"<%:Proceed%>"
/>
</form>
<form
style=
"display:inline"
action=
"<%=REQUEST_URI%>"
method=
"post"
>
<input
class=
"cbi-button cbi-button-reset"
type=
"submit"
value=
"<%:Cancel%>"
/>
</form>
</div>
<
%+
footer
%
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录