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=bbc5215c4579c1c1fd016ee21227d6df35e78032;hp=693022f3231e44f11cd5a4327c2bd3075539e40e;hb=dd267f9457476e0a2b29be0a98fcd05062f50f13;hpb=5067e2d185bbd1fdf029a8da2a84895bbccfad02 diff --git a/modules/admin-full/luasrc/view/admin_system/upgrade.htm b/modules/admin-full/luasrc/view/admin_system/upgrade.htm index 693022f32..bbc5215c4 100644 --- a/modules/admin-full/luasrc/view/admin_system/upgrade.htm +++ b/modules/admin-full/luasrc/view/admin_system/upgrade.htm @@ -13,17 +13,16 @@ $Id$ -%> <%+header%> -

<%:system%>

-

<%:a_s_flash%>

+

<%:system%>

+

<%:a_s_flash%>

<%:a_s_flash_upgrade1%>


-<% if next(blocks) and not next(flash) then %> +<% if sysupgrade and not ret then %>
<%:a_s_flash_fwimage%>:
- <% for name, v in pairs(blocks) do %> - <%=name%>:
- <% end %> + +

<% if keep_avail then -%> @@ -34,23 +33,20 @@ $Id$
-<% elseif next(flash) then %> +<% elseif ret then %>

<%:a_s_flash_received%>

+

<%:a_s_flash_inprogress%>

- <% 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 %> + + <% %> + <% local ret = ret() + if ret == 0 then %> +
<%:a_s_flash_flashed%>
+ <% else %> +
<%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)
<% end %> <% else %>
<%:a_s_flash_notimplemented%>
<% end %> -<%+footer%> \ No newline at end of file +<%+footer%> +<% if ret == 0 then luci.sys.reboot() end %>