Expand install routine.

This commit is contained in:
James Cole
2018-03-11 18:46:18 +01:00
parent 93aa5b7753
commit f45d0bb317
3 changed files with 16 additions and 2 deletions

View File

@@ -53,17 +53,29 @@ function startPassport() {
function startUpgrade() {
$('#status-box').html('<i class="fa fa-spin fa-spinner"></i> Upgrading database...');
$.post(upgradeUri, {_token: token}).done(function () {
completeDone();
startVerify();
}).fail(function () {
$('#status-box').html('<i class="fa fa-warning"></i> Upgrade failed! See log files :(');
});
}
/**
*
*/
function startVerify() {
$('#status-box').html('<i class="fa fa-spin fa-spinner"></i> Verify database integrity...');
$.post(verifyUri, {_token: token}).done(function () {
completeDone();
}).fail(function () {
$('#status-box').html('<i class="fa fa-warning"></i> Verification failed! See log files :(');
});
}
/**
*
*/
function completeDone() {
$('#status-box').html('<i class="fa fa-thumbs-up"></i> Installation complete! Wait to be redirected...');
$('#status-box').html('<i class="fa fa-thumbs-up"></i> Installation + upgrade complete! Wait to be redirected...');
setTimeout(function () {
window.location = homeUri;
}, 3000);