Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
baas
Commits
bc65a2f1
Commit
bc65a2f1
authored
Nov 09, 2015
by
Efthymia Bika
Browse files
Write first_backup only after successful run
Also enable form and disable actions on error
parent
98366427
Changes
1
Hide whitespace changes
Inline
Side-by-side
baas/dup_calls.js
View file @
bc65a2f1
...
...
@@ -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
();
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment