Permalink
Browse files

firmware: always schedule next poll

This avoids akward scenarios when the webserver is reloading,
spitting out temporary messages.  In that case, simply keep
polling until the request is back.  The backend keeps running
anyway.
  • Loading branch information...
fichtner committed Jun 15, 2015
1 parent 313a8f2 commit 2aaa719214076f1a52cebf93352b2f0b042d614d
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
@@ -140,10 +140,7 @@ POSSIBILITY OF SUCH DAMAGE.
$('#update_status').html(data['log']);
$('#update_status').scrollTop($('#update_status')[0].scrollHeight);
}
if (data['status'] == 'running' || data['status'] == 'error') {
// schedule next poll
setTimeout(trackStatus, 500);
} else if (data['status'] == 'done') {
if (data['status'] == 'done') {
$('#updatestatus').html("{{ lang._('Upgrade done!') }}");
} else if (data['status'] == 'reboot') {
// reboot required, tell the user to wait until this is finished and redirect after 5 minutes
@@ -169,7 +166,9 @@ POSSIBILITY OF SUCH DAMAGE.
}
}]
});
} else {
// schedule next poll
setTimeout(trackStatus, 500);
}
});
}

0 comments on commit 2aaa719

Please sign in to comment.