From 5067e2d185bbd1fdf029a8da2a84895bbccfad02 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 18 Sep 2008 19:23:08 +0000 Subject: Revised sysupgrade part 1 --- .../luasrc/view/admin_system/upgrade.htm | 32 ++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'modules/admin-full/luasrc/view') diff --git a/modules/admin-full/luasrc/view/admin_system/upgrade.htm b/modules/admin-full/luasrc/view/admin_system/upgrade.htm index a3d97d6497..693022f323 100644 --- a/modules/admin-full/luasrc/view/admin_system/upgrade.htm +++ b/modules/admin-full/luasrc/view/admin_system/upgrade.htm @@ -17,12 +17,13 @@ $Id$

<%:a_s_flash%>

<%:a_s_flash_upgrade1%>


-<% if sysupgrade and not ret then %> +<% if next(blocks) and not next(flash) then %>
<%:a_s_flash_fwimage%>:
- -
+ <% for name, v in pairs(blocks) do %> + <%=name%>:
+ <% end %>
<% if keep_avail then -%> @@ -33,20 +34,23 @@ $Id$
-<% elseif ret then %> +<% elseif next(flash) then %>

<%:a_s_flash_received%>

-

<%:a_s_flash_inprogress%>

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