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
7a51dc91
Commit
7a51dc91
authored
Oct 21, 2015
by
Efthymia Bika
Browse files
Add file to restore field
parent
2bb18c5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
backup-list.html
View file @
7a51dc91
...
...
@@ -19,7 +19,8 @@
backup_name_empty
:
'
Provide a Backup Name
'
,
backup_name_illegal
:
'
Invalid Entry. Allowed characters [A-Za-z0-9-_]
'
,
cloud_empty
:
'
Select cloud configuration
'
,
dir_not_chosen
:
'
Provide a local directory
'
dir_not_chosen
:
'
Provide a local directory
'
,
res_file_illegal
:
'
Invalid Entry. Provide a valid file name
'
};
var
exec
=
require
(
'
child_process
'
).
exec
;
...
...
@@ -73,6 +74,7 @@
$
(
'
#directory-error small
'
).
hide
();
$
(
'
#res-directory-error small
'
).
hide
();
$
(
'
#cloud-error small
'
).
hide
();
$
(
'
#res-file-error small
'
).
hide
();
if
(
backup
)
{
$
(
"
#backup-name
"
).
val
(
backup
.
name
);
...
...
@@ -262,10 +264,15 @@
}
else
{
set_envs
();
var
dirs
=
directory
+
"
swift://
"
+
container
;
var
file_arg
=
""
;
if
(
restore
)
{
dirs
=
"
swift://
"
+
container
+
"
"
+
directory
;
var
file_to_restore
=
$
(
"
#res-file
"
).
val
();
if
(
file_to_restore
)
{
file_arg
=
"
--file-to-restore '
"
+
file_to_restore
+
"
'
"
;
}
}
exec
(
"
duplicity
"
+
allow_arg
+
dirs
,
function
(
error
,
stdout
,
stderr
)
{
exec
(
"
duplicity
"
+
allow_arg
+
file_arg
+
dirs
,
function
(
error
,
stdout
,
stderr
)
{
if
(
error
)
{
$
(
"
#msg
"
).
addClass
(
"
panel
"
);
var
src_mismatch_error
=
...
...
@@ -483,7 +490,10 @@
<div
class=
"clearfix"
>
<div
class=
"small-3 columns"
>
<label
id=
"res_directory_label"
for=
"res-directory"
class=
"right"
>
Local directory
<span
data-tooltip
aria-haspopup=
"true"
class=
"has-tip"
title=
"If File to Restore is provided, it will be restored in this file"
>
Local directory/File
</span>
</label>
</div>
<div
id=
"res-directory"
class=
"small-6 columns"
></div>
...
...
@@ -502,6 +512,21 @@
onchange=
"$('#res-directory').html($(this).val());
check_directory('res-directory');"
/>
</div>
<div
class=
"clearfix"
>
<div
class=
"small-3 columns"
>
<label
id=
"res-file-label"
for=
"res-file"
class=
"right inline"
>
<span
data-tooltip
aria-haspopup=
"true"
class=
"has-tip"
title=
"Use relative path as shown in Contents listing"
>
File to Restore
</span>
</label>
</div>
<div
class=
"small-9 columns error"
id=
"res-file-error"
>
<input
type=
"text"
id=
"res-file"
placeholder=
"Only restore this file"
>
<small
class=
"error"
></small>
</div>
</div>
<div
class=
"clearfix"
>
<div
class=
"small-6 columns"
>
</div>
<div
class=
"small-6 columns"
>
...
...
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