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
72a5b0b0
Commit
72a5b0b0
authored
Nov 10, 2015
by
Efthymia Bika
Browse files
Restore single file
parent
05e8f720
Changes
2
Hide whitespace changes
Inline
Side-by-side
baas/restore.html
View file @
72a5b0b0
...
...
@@ -11,7 +11,20 @@
}
});
hide_error_divs
();
function
load_field_values
()
{
if
(
typeof
selected_backup
!=
'
undefined
'
)
{
$
(
"
#res-backup-name
"
).
val
(
selected_backup
);
$
(
"
#res-cloud
"
).
val
(
backups
[
selected_backup
].
cloud
);
$
(
"
#res-passphrase
"
).
val
(
backups
[
selected_backup
].
passphrase
);
$
(
"
#res-directory
"
).
html
(
g_res_directory
);
$
(
"
#res-file
"
).
val
(
g_res_file
);
$
(
"
#timestamp
"
).
val
(
g_timestamp
);
}
}
load_field_values
();
function
check_res_backup_name
()
{
var
backup_name
=
$
(
'
#res-backup-name
'
).
val
().
replace
(
/^
\s
+|
\s
+$/gm
,
''
);
if
(
!
backup_name
)
{
...
...
baas/timeview.js
View file @
72a5b0b0
function
go_to_restore
(
name
)
{
g_res_directory
=
path
.
join
(
get_user_home
(),
"
Backups
"
);
var
time_path
=
$
(
"
#time-path
"
).
val
();
if
(
time_path
!=
"
/
"
)
time_path
+=
"
/
"
;
if
(
time_path
.
startsWith
(
"
/
"
))
time_path
=
time_path
.
replace
(
"
/
"
,
""
);
g_res_file
=
time_path
+
name
;
g_timestamp
=
selected_date
;
$
(
"
#restore-tab-link
"
).
trigger
(
"
click
"
);
}
function
show_contents_by_date
(
error
,
stdout
,
stderr
)
{
$
(
"
#time-contents
"
).
empty
();
...
...
@@ -40,20 +52,9 @@ function show_contents_by_date(error, stdout, stderr) {
$
(
"
#loader
"
).
hide
();
}
function
go_to_restore
(
name
)
{
$
(
"
#res-directory
"
).
html
(
path
.
join
(
get_user_home
(),
"
Backups
"
));
var
time_path
=
$
(
"
#time-path
"
).
val
();
if
(
time_path
!=
"
/
"
)
time_path
+=
"
/
"
;
if
(
time_path
.
startsWith
(
"
/
"
))
time_path
=
time_path
.
replace
(
"
/
"
,
""
);
$
(
"
#res-file
"
).
val
(
time_path
+
name
);
$
(
"
#timestamp
"
).
val
(
selected_date
);
$
(
"
#restore_details_link
"
).
trigger
(
"
click
"
);
}
function
show_rest_icon
(
name
)
{
$
(
"
#rest_icon_
"
+
name
).
removeClass
(
"
hide
"
);
$
(
"
#rest_icon_
"
+
name
).
addClass
(
"
fa fa-
cloud-
download
"
);
$
(
"
#rest_icon_
"
+
name
).
addClass
(
"
fa fa-download
"
);
}
var
init_path
=
""
;
...
...
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