mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 07:34:43 +00:00
Create a fake routine, check for its progress.
This commit is contained in:
17
public/js/ff/import/status_v2.js
vendored
17
public/js/ff/import/status_v2.js
vendored
@@ -52,8 +52,10 @@ function reportOnJobStatus(data) {
|
||||
case "ready_to_run":
|
||||
startJob();
|
||||
checkOnJob();
|
||||
|
||||
|
||||
break;
|
||||
case "running":
|
||||
showProgressBox();
|
||||
checkOnJob();
|
||||
break;
|
||||
default:
|
||||
console.error('Cannot handle status ' + data.status);
|
||||
@@ -108,6 +110,17 @@ function reportFailure(xhr, status, error) {
|
||||
// show error box.
|
||||
}
|
||||
|
||||
function showProgressBox() {
|
||||
// hide fatal error box:
|
||||
$('.fatal_error').hide();
|
||||
|
||||
// hide initial status box:
|
||||
$('.status_initial').hide();
|
||||
|
||||
// show running box:
|
||||
$('.status_running').show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function is called when the job could not be started.
|
||||
*
|
||||
|
Reference in New Issue
Block a user