luci-mod-admin-full: don't replace DHCPv6 hostname
[project/luci.git] / modules / luci-mod-admin-full / luasrc / view / admin_system / flashops.htm
1 <%#
2  Copyright 2008 Steven Barth <steven@midlink.org>
3  Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org>
4  Licensed to the public under the Apache License 2.0.
5 -%>
6
7 <%+header%>
8
9 <h2 name="content"><%:Flash operations%></h2>
10
11 <ul class="cbi-tabmenu">
12         <li class="cbi-tab"><a href="#"><%:Actions%></a></li>
13         <li class="cbi-tab-disabled"><a href="<%=REQUEST_URI%>/backupfiles"><%:Configuration%></a></li>
14 </ul>
15
16 <fieldset class="cbi-section">
17
18         <fieldset class="cbi-section">
19                 <legend><%:Backup / Restore%></legend>
20                 <div class="cbi-section-descr"><%:Click "Generate archive" to download a tar archive of the current configuration files. To reset the firmware to its initial state, click "Perform reset" (only possible with squashfs images).%></div>
21                 <div class="cbi-section-node">
22                         <form class="inline" method="post" action="<%=url('admin/system/flashops/backup')%>">
23                                 <input type="hidden" name="token" value="<%=token%>" />
24                                 <div class="cbi-value<% if not reset_avail then %> cbi-value-last<% end %>">
25                                         <label class="cbi-value-title" for="image"><%:Download backup%>:</label>
26                                         <div class="cbi-value-field">
27                                                 <input class="cbi-button cbi-button-apply" type="submit" name="backup" value="<%:Generate archive%>" />
28                                         </div>
29                                 </div>
30                         </form>
31                         <% if reset_avail then %>
32                         <form class="inline" method="post" action="<%=url('admin/system/flashops/reset')%>">
33                                 <input type="hidden" name="token" value="<%=token%>" />
34                                 <div class="cbi-value cbi-value-last">
35                                         <label class="cbi-value-title"><%:Reset to defaults%>:</label>
36                                         <div class="cbi-value-field">
37                                                 <input onclick="return confirm('<%:Really reset all changes?%>')" class="cbi-button cbi-button-reset" type="submit" name="reset" value="<%:Perform reset%>" />
38                                         </div>
39                                 </div>
40                         </form>
41                         <% end %>
42                 </div>
43                 <br />
44                 <div class="cbi-section-descr"><%:To restore configuration files, you can upload a previously generated backup archive here.%></div>
45                 <div class="cbi-section-node">
46                         <form class="inline" method="post" action="<%=url('admin/system/flashops/restore')%>" enctype="multipart/form-data">
47                                 <div class="cbi-value cbi-value-last">
48                                         <label class="cbi-value-title" for="archive"><%:Restore backup%>:</label>
49                                         <div class="cbi-value-field">
50                                                 <input type="hidden" name="token" value="<%=token%>" />
51                                                 <input type="file" name="archive" id="archive" />
52                                                 <input type="submit" class="cbi-button cbi-input-apply" name="restore" value="<%:Upload archive...%>" />
53                                         </div>
54                                 </div>
55                         </form>
56                 </div>
57         </fieldset>
58
59         <br />
60
61         <fieldset class="cbi-section">
62                 <legend><%:Flash new firmware image%></legend>
63                 <% if upgrade_avail then %>
64                         <form method="post" action="<%=url('admin/system/flashops/sysupgrade')%>" enctype="multipart/form-data">
65                                 <input type="hidden" name="token" value="<%=token%>" />
66                                 <div class="cbi-section-descr"><%:Upload a sysupgrade-compatible image here to replace the running firmware. Check "Keep settings" to retain the current configuration (requires a compatible firmware image).%></div>
67                                 <div class="cbi-section-node">
68                                         <div class="cbi-value">
69                                                 <label class="cbi-value-title" for="keep"><%:Keep settings%>:</label>
70                                                 <div class="cbi-value-field">
71                                                         <input type="checkbox" name="keep" id="keep" checked="checked" />
72                                                 </div>
73                                         </div>
74                                         <div class="cbi-value cbi-value-last<% if image_invalid then %> cbi-value-error<% end %>">
75                                                 <label class="cbi-value-title" for="image"><%:Image%>:</label>
76                                                 <div class="cbi-value-field">
77                                                         <input type="file" name="image" id="image" />
78                                                         <input type="submit" class="cbi-button cbi-input-apply" value="<%:Flash image...%>" />
79                                                 </div>
80                                         </div>
81                                 </div>
82                                 <% if image_invalid then %>
83                                         <div class="cbi-section-error"><%:The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform. %></div>
84                                 <% end %>
85                         </form>
86                 <% else %>
87                         <div class="cbi-section-descr"><%:Sorry, there is no sysupgrade support present; a new firmware image must be flashed manually. Please refer to the wiki for device specific install instructions.%></div>
88                 <% end %>
89         </fieldset>
90
91 </fieldset>
92
93 <%+footer%>