mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix installer
This commit is contained in:
14
public/v1/js/ff/install/index.js
vendored
14
public/v1/js/ff/install/index.js
vendored
@@ -23,10 +23,12 @@ $(function () {
|
||||
"use strict";
|
||||
//var status = $('#status-box');
|
||||
// set HTML to "migrating...":
|
||||
startRunningCommands();
|
||||
console.log('Starting...');
|
||||
startRunningCommands(0);
|
||||
});
|
||||
|
||||
function startRunningCommands() {
|
||||
function startRunningCommands(index) {
|
||||
console.log('Now in startRunningCommands with index' + index);
|
||||
if (0 === index) {
|
||||
$('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Running first command...');
|
||||
}
|
||||
@@ -34,7 +36,8 @@ function startRunningCommands() {
|
||||
}
|
||||
|
||||
function runCommand(index) {
|
||||
$.post(runCommandUrl, {_token: token, index: index}).done(function (data) {
|
||||
console.log('Now in runCommand(' + index + '): ' + runCommandUrl);
|
||||
$.post(runCommandUrl, {_token: token, index: parseInt(index)}).done(function (data) {
|
||||
if (data.error === false) {
|
||||
// increase index
|
||||
index++;
|
||||
@@ -59,7 +62,7 @@ function runCommand(index) {
|
||||
}
|
||||
|
||||
function startMigration() {
|
||||
|
||||
console.log('Now in startMigration');
|
||||
$.post(migrateUrl, {_token: token}).done(function (data) {
|
||||
if (data.error === false) {
|
||||
// move to decrypt routine.
|
||||
@@ -74,6 +77,7 @@ function startMigration() {
|
||||
}
|
||||
|
||||
function startDecryption() {
|
||||
console.log('Now in startDecryption');
|
||||
$('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Setting up DB #2...');
|
||||
$.post(decryptUrl, {_token: token}).done(function (data) {
|
||||
if (data.error === false) {
|
||||
@@ -151,4 +155,4 @@ function displaySoftFail(message) {
|
||||
$('#status-box').html('<span class="fa fa-warning"></span> ' + message + '<br /><br />Please read the ' +
|
||||
'<a href="https://docs.firefly-iii.org/">' +
|
||||
'documentation</a> about this, and upgrade by hand.');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user