Commit bc65a2f1 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Write first_backup only after successful run

Also enable form and disable actions on error
parent 98366427
......@@ -3,13 +3,12 @@ var dup_verbosity = " -v8 ";
function backup(restore) {
$("#loader").show();
if(!restore) save_backup_set();
run_duplicity(restore);
if(!restore) {
save_backup_set();
disable_form(true);
write_first_backup();
disable_actions(false);
}
run_duplicity(restore);
}
function set_envs() {
......@@ -148,9 +147,14 @@ function run_duplicity(restore) {
if(error) {
$("#msg").html(error);
$("#msg").addClass("panel");
disable_form(false);
disable_actions(true);
} else {
$("#msg").html("");
$("#msg").removeClass("panel");
if(!restore) {
write_first_backup();
}
}
$("#loader").hide();
});
......@@ -167,9 +171,14 @@ function run_duplicity(restore) {
if(error) {
$("#msg").addClass("panel");
$("#msg").html(stderr);
disable_form(false);
disable_actions(true);
} else {
$("#msg").html("");
$("#msg").removeClass("panel");
if(!restore) {
write_first_backup();
}
}
$("#loader").hide();
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment