flashops.htm 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <%#
  2. Copyright 2008 Steven Barth <steven@midlink.org>
  3. Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
  4. Licensed to the public under the Apache License 2.0.
  5. -%>
  6. <%+header%>
  7. <h2><a id="content" name="content"><%:Flash operations%></a></h2>
  8. <ul class="cbi-tabmenu">
  9. <li class="cbi-tab"><a href="#"><%:Actions%></a></li>
  10. <li class="cbi-tab-disabled"><a href="<%=REQUEST_URI%>/backupfiles"><%:Configuration%></a></li>
  11. </ul>
  12. <fieldset class="cbi-section">
  13. <fieldset class="cbi-section">
  14. <legend><%:Backup / Restore%></legend>
  15. <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
  16. <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>
  17. <div class="cbi-section-node">
  18. <div class="cbi-value<% if not reset_avail then %> cbi-value-last<% end %>">
  19. <label class="cbi-value-title" for="image"><%:Download backup%>:</label>
  20. <div class="cbi-value-field">
  21. <input class="cbi-button cbi-button-apply" type="submit" name="backup" value="<%:Generate archive%>" />
  22. </div>
  23. </div>
  24. <% if reset_avail then %>
  25. <div class="cbi-value cbi-value-last">
  26. <label class="cbi-value-title"><%:Reset to defaults%>:</label>
  27. <div class="cbi-value-field">
  28. <input onclick="return confirm('<%:Really reset all changes?%>')" class="cbi-button cbi-button-reset" type="submit" name="reset" value="<%:Perform reset%>" />
  29. </div>
  30. </div>
  31. <% end %>
  32. </div>
  33. <br />
  34. <div class="cbi-section-descr"><%:To restore configuration files, you can upload a previously generated backup archive here.%></div>
  35. <div class="cbi-section-node">
  36. <div class="cbi-value cbi-value-last">
  37. <label class="cbi-value-title" for="archive"><%:Restore backup%>:</label>
  38. <div class="cbi-value-field">
  39. <input type="file" name="archive" id="archive" />
  40. <input type="submit" class="cbi-button cbi-input-apply" name="restore" value="<%:Upload archive...%>" />
  41. </div>
  42. </div>
  43. </div>
  44. </form>
  45. </fieldset>
  46. <br />
  47. <fieldset class="cbi-section">
  48. <legend><%:Flash new firmware image%></legend>
  49. <% if upgrade_avail then %>
  50. <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
  51. <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 an OpenWrt compatible firmware image).%></div>
  52. <div class="cbi-section-node">
  53. <div class="cbi-value">
  54. <label class="cbi-value-title" for="keep"><%:Keep settings%>:</label>
  55. <div class="cbi-value-field">
  56. <input type="checkbox" name="keep" id="keep" checked="checked" />
  57. </div>
  58. </div>
  59. <div class="cbi-value cbi-value-last<% if image_invalid then %> cbi-value-error<% end %>">
  60. <label class="cbi-value-title" for="image"><%:Image%>:</label>
  61. <div class="cbi-value-field">
  62. <input type="file" name="image" id="image" />
  63. <input type="submit" class="cbi-button cbi-input-apply" value="<%:Flash image...%>" />
  64. </div>
  65. </div>
  66. </div>
  67. <% if image_invalid then %>
  68. <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>
  69. <% end %>
  70. </form>
  71. <% else %>
  72. <div class="cbi-section-descr"><%:Sorry, there is no sysupgrade support present; a new firmware image must be flashed manually. Please refer to the OpenWrt wiki for device specific install instructions.%></div>
  73. <% end %>
  74. </fieldset>
  75. </fieldset>
  76. <%+footer%>