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
61f20867
Commit
61f20867
authored
Oct 15, 2015
by
Efthymia Bika
Browse files
Move exec var to a global var
parent
88deb6bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
backup-list.html
View file @
61f20867
...
...
@@ -20,6 +20,7 @@
backup_name_illegal
:
'
Invalid Entry. Allowed characters [A-Za-z0-9-_]
'
,
cloud_empty
:
'
Select cloud configuration
'
};
var
exec
=
require
(
'
child_process
'
).
exec
;
load_data_from_file
(
BACKUP_CONF_FILE
,
render_backup_sets
);
...
...
@@ -200,7 +201,14 @@
function
run_duplicity
(
allow_source_mismatch
)
{
var
exec
=
require
(
'
child_process
'
).
exec
;
var
container
=
null
;
var
backup_name
=
$
(
"
#backup-name
"
).
val
().
replace
(
/^
\s
+|
\s
+$/gm
,
''
);
$
.
each
(
backups
,
function
(
i
,
backup_set
)
{
if
(
backup_set
.
name
==
backup_name
)
{
container
=
backup_set
.
container
;
}
});
var
directory
=
$
(
"
#directory
"
).
html
();
var
allow_arg
=
""
;
if
(
allow_source_mismatch
)
...
...
@@ -268,7 +276,15 @@
function
load_contents
()
{
$
(
"
#loader
"
).
show
();
$
(
"
#contents
"
).
html
(
""
);
var
exec
=
require
(
'
child_process
'
).
exec
;
var
container
=
null
;
var
backup_name
=
$
(
"
#backup-name
"
).
val
().
replace
(
/^
\s
+|
\s
+$/gm
,
''
);
$
.
each
(
backups
,
function
(
i
,
backup_set
)
{
if
(
backup_set
.
name
==
backup_name
)
{
container
=
backup_set
.
container
;
}
});
function
puts
(
error
,
stdout
,
stderr
)
{
console
.
log
(
"
error ====
"
+
error
);
console
.
log
(
"
stdout ===
"
+
stdout
);
...
...
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