Rework LuCI build system
[project/luci.git] / modules / luci-mod-admin-full / luasrc / view / admin_system / reboot.htm
1 <%#
2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 -%>
15 <%+header%>
16 <h2><a id="content" name="content"><%:System%></a></h2>
17 <h3><%:Reboot%></h3>
18 <p><%:Reboots the operating system of your device%></p>
19 <%-
20 local c = require("luci.model.uci").cursor():changes()
21 if c and next(c) then
22 -%>
23         <p class="warning"><%:Warning: There are unsaved changes that will be lost while rebooting!%></p> 
24 <%-
25 end
26 if not reboot then 
27 -%>
28 <p><a href="<%=controller%>/admin/system/reboot?reboot=1"><%:Perform reboot%></a></p>
29 <%- else -%>
30 <p><%:Please wait: Device rebooting...%></p>
31 <script type="text/javascript">setTimeout("location='<%=controller%>/admin'", 60000)</script>
32 <%- end -%>
33 <%+footer%>