luci2: implement initial backup / restore / flash view. Actual firmware flashing...
[project/luci2/ui.git] / luci2 / htdocs / luci2 / template / system.upgrade.htm
diff --git a/luci2/htdocs/luci2/template/system.upgrade.htm b/luci2/htdocs/luci2/template/system.upgrade.htm
new file mode 100644 (file)
index 0000000..6541c22
--- /dev/null
@@ -0,0 +1,39 @@
+<div class="cbi-form" id="tabs" style="display:none">
+       <ul class="cbi-tabmenu">
+               <li><a href="#actions"><%:Actions%></a></li>
+               <li><a href="#config"><%:Configuration%></a></li>
+       </ul>
+
+       <div id="actions">
+               <h3><%:Backup / Restore%></h3>
+               <p><%: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).%></p>
+               <p>
+                       <form action="/cgi-bin/luci-backup" method="post" style="display:inline">
+                               <input type="hidden" name="sessionid" />
+                               <input class="cbi-button cbi-button-apply" type="button" id="btn_backup" value="<%:Generate archive%>" />
+                       </form>
+                       <input class="cbi-button cbi-button-reset" type="button" id="btn_reset" value="<%:Perform reset%>" />
+               </p>
+               <br />
+
+               <p><%:To restore configuration files, you can upload a previously generated backup archive here.%></p>
+               <p>
+                       <input class="cbi-button cbi-input-apply" type="button" id="btn_restore" value="<%:Upload archive...%>" />
+               </p>
+               <br />
+
+               <h3><%:Flash new firmware image%></h3>
+               <p><%:Upload a sysupgrade-compatible image here to replace the running firmware. Check "Keep settings" to retain the current configuration (requires an OpenWrt compatible firmware image).%></p>
+               <p>
+                       <input class="cbi-button cbi-input-apply" type="button" id="btn_flash" value="<%:Flash image...%>" />
+               </p>
+       </div>
+
+       <div id="config">
+               <textarea style="width:100%"></textarea>
+               <div class="cbi-page-actions">
+                       <input class="cbi-button cbi-button-save" type="button" id="btn_save" value="<%:Save%>" />
+                       <input class="cbi-button cbi-button-apply" type="button" id="btn_list" value="<%:Show current backup file list …%>" />
+               </div>
+       </div>
+</div>