Commit 00bbeef1 authored by Efthymia Bika's avatar Efthymia Bika

Disable actions when backing up for first time

parent 857b13be
...@@ -135,14 +135,12 @@ function load_status() { ...@@ -135,14 +135,12 @@ function load_status() {
$('#backup_details').hide(); $('#backup_details').hide();
$("#loader").show(); $("#loader").show();
$("#status_contents").html(""); $("#status_contents").html("");
call_duplicity("status", get_backup_set(), false); call_duplicity("status", get_backup_set(), false);
} }
function remove_all(force) { function remove_all(force) {
$("#loader").show(); $("#loader").show();
call_duplicity("remove", get_backup_set(), force); call_duplicity("remove", get_backup_set(), force);
} }
function load_timeview() { function load_timeview() {
...@@ -265,6 +263,7 @@ function call_duplicity(mode, backup_set, force) { ...@@ -265,6 +263,7 @@ function call_duplicity(mode, backup_set, force) {
console.log("exit code === " + code); console.log("exit code === " + code);
$("#loader").hide(); $("#loader").hide();
if(mode == "backup") { if(mode == "backup") {
disable_actions(false);
if(code == 0) { if(code == 0) {
show_alert_box("Successfully completed", "success", true); show_alert_box("Successfully completed", "success", true);
backup_set.last_status = "Completed"; backup_set.last_status = "Completed";
...@@ -274,12 +273,11 @@ function call_duplicity(mode, backup_set, force) { ...@@ -274,12 +273,11 @@ function call_duplicity(mode, backup_set, force) {
} }
$("#inc").prop("disabled", false); $("#inc").prop("disabled", false);
$("#inc").prop("checked", true); $("#inc").prop("checked", true);
disable_actions(false);
} else { } else {
if(typeof backup_set.first_backup == 'undefined') { if(typeof backup_set.first_backup == 'undefined') {
disable_form(false); disable_form(false);
disable_actions(true);
} }
disable_actions(true);
backup_set.last_status = "Failed"; backup_set.last_status = "Failed";
if(code == DUP_ERR_CODES.CONNECTION_FAILED) { if(code == DUP_ERR_CODES.CONNECTION_FAILED) {
show_cloud_error(); show_cloud_error();
......
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