Fixed responsiveness for flashing process
This commit is contained in:
parent
f61bd1a78c
commit
7514604860
3 changed files with 13 additions and 2 deletions
|
@ -36,6 +36,9 @@ $Id$
|
|||
<% elseif ret then %>
|
||||
<p><%:a_s_flash_received%></p>
|
||||
<p><%:a_s_flash_inprogress%></p>
|
||||
|
||||
<!-- <%=string.rep(" ", 2048)%> -->
|
||||
<% %>
|
||||
<% local ret = ret()
|
||||
if ret == 0 then %>
|
||||
<div class="ok"><%:a_s_flash_flashed%></div>
|
||||
|
|
|
@ -105,7 +105,9 @@ function action_upgrade()
|
|||
local keepcfg = keep_avail and luci.http.formvalue("keepcfg")
|
||||
|
||||
if plat and fname then
|
||||
ret = luci.sys.flash(tmpfile, keepcfg and _keep_pattern())
|
||||
ret = function()
|
||||
return luci.sys.flash(tmpfile, keepcfg and _keep_pattern())
|
||||
end
|
||||
end
|
||||
|
||||
luci.template.render("mini/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail})
|
||||
|
|
|
@ -34,7 +34,13 @@ $Id$
|
|||
</div>
|
||||
</form>
|
||||
<% elseif ret then %>
|
||||
<% if ret == 0 then %>
|
||||
<p><%:a_s_flash_received%></p>
|
||||
<p><%:a_s_flash_inprogress%></p>
|
||||
|
||||
<!-- <%=string.rep(" ", 2048)%> -->
|
||||
<% %>
|
||||
<% local ret = ret()
|
||||
if ret == 0 then %>
|
||||
<div class="ok"><%:a_s_flash_flashed%></div>
|
||||
<% else %>
|
||||
<div class="error"><%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)</div>
|
||||
|
|
Loading…
Reference in a new issue