Skip to content

Commit

Permalink
firmware: always schedule next poll
Browse files Browse the repository at this point in the history
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 2aaa719
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
Expand Up @@ -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
Expand All @@ -169,7 +166,9 @@ POSSIBILITY OF SUCH DAMAGE.
}
}]
});

} else {
// schedule next poll
setTimeout(trackStatus, 500);
}
});
}
Expand Down

0 comments on commit 2aaa719

Please sign in to comment.