X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fview%2Fadmin_system%2Fupgrade.htm;h=693022f3231e44f11cd5a4327c2bd3075539e40e;hp=16ba50cd989c562882c09439efb81961ce6610b1;hb=5067e2d185bbd1fdf029a8da2a84895bbccfad02;hpb=97ff4a156ff1aa6a4d2ab65ab13d12b4eb2651e2 diff --git a/modules/admin-full/luasrc/view/admin_system/upgrade.htm b/modules/admin-full/luasrc/view/admin_system/upgrade.htm index 16ba50cd9..693022f32 100644 --- a/modules/admin-full/luasrc/view/admin_system/upgrade.htm +++ b/modules/admin-full/luasrc/view/admin_system/upgrade.htm @@ -17,29 +17,38 @@ $Id$

<%:a_s_flash%>

<%:a_s_flash_upgrade1%>


-<% if sysupgrade and not ret then %> -
" enctype="multipart/form-data"> -
-
-
<%:a_s_flash_fwimage%>
-
-
+<% if next(blocks) and not next(flash) then %> + +
<%:a_s_flash_fwimage%>:
+
+ <% for name, v in pairs(blocks) do %> + <%=name%>:
+ <% end %>
-
- - <%:a_s_flash_keepcfg%> -
-
-
- -
+ <% if keep_avail then -%> + + <%:a_s_flash_keepcfg%> + <% end -%> +
+
+
-<% elseif ret then %> - <% if ret == 0 then %> -
<%:a_s_flash_flashed%>
- <% else %> -
<%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)
+<% elseif next(flash) then %> +

<%:a_s_flash_received%>

+ + <% reboot.exec = false + for name, func in pairs(flash) do %> + <%:a_s_flash_inprogress%> <%=name%>... + <%=string.rep(" ", 2048)%> + <% + local stat, code = func() + reboot.exec = reboot.exec or stat + if stat and code then %> + <%:a_s_flash_flashed%>
+ <% else %> + <%:a_s_flash_flasherr%>! (<%:code%> <%=code%>)
+ <% end %> <% end %> <% else %>
<%:a_s_flash_notimplemented%>