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
1c3fbe32
Commit
1c3fbe32
authored
Nov 06, 2015
by
Efthymia Bika
Browse files
View changes in backup tab
Remove side bar from backup tab Remove restore tab
parent
333f2d32
Changes
1
Hide whitespace changes
Inline
Side-by-side
baas/backup-list.html
View file @
1c3fbe32
...
...
@@ -2,18 +2,21 @@
<html>
<head>
<title>
Backup List
</title>
<script
src=
"backup.js"
></script>
<script
src=
"dup_calls.js"
></script>
<script
src=
"timeview.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
"
.tabs
"
).
hide
();
if
(
typeof
clouds
===
'
undefined
'
)
{
load_data_from_file
(
CLOUDS_CONF_FILE
,
populate_clouds
);
}
else
{
populate_clouds
(
""
);
}
console
.
log
(
"
2. selected =
"
+
selected_backup
);
$
.
each
(
backups
,
function
(
i
,
backup
)
{
if
(
backup
.
name
==
selected_backup
)
{
load_backup
(
backup
);
return
;
}
});
});
var
errors
=
{
...
...
@@ -27,52 +30,6 @@
passphrase_empty
:
'
Provide a Passphrase
'
};
load_data_from_file
(
BACKUP_CONF_FILE
,
render_backup_sets
);
function
render_backup_sets
(
data
)
{
$
(
"
#backup_list
"
).
remove
();
// backups is undefined the first time, when
// reading data from file
if
(
typeof
backups
===
'
undefined
'
)
{
if
(
data
!=
""
)
{
backups
=
JSON
.
parse
(
data
).
backups
;
}
else
{
backups
=
[];
}
}
var
ul
=
$
(
"
<ul></ul>
"
)
.
attr
(
"
id
"
,
"
backup_list
"
)
.
attr
(
"
class
"
,
"
side-nav
"
);
$
.
each
(
backups
,
function
(
i
,
backup
)
{
var
li
=
$
(
"
<li></li>
"
)
.
attr
(
"
class
"
,
"
clearfix
"
)
.
attr
(
"
id
"
,
"
li_
"
+
backup
.
name
);
var
a
=
$
(
"
<a>
"
+
backup
.
name
+
"
</a>
"
)
.
attr
(
"
href
"
,
"
#
"
)
.
attr
(
"
id
"
,
backup
.
name
)
.
attr
(
"
class
"
,
"
left
"
)
.
click
(
function
()
{
load_backup
(
backup
);
activate_li
(
"
li_
"
+
backup
.
name
);
});
li
.
append
(
a
);
var
a_del
=
$
(
"
<a><i class='fa fa-times-circle delete_icon'></i></a>
"
)
.
attr
(
"
href
"
,
"
#
"
)
.
attr
(
"
class
"
,
"
right
"
)
.
click
(
function
()
{
if
(
confirm
(
"
Are you sure you want to delete
"
+
backup
.
name
+
'
?
'
+
"
\n
NOTE: To actually remove backup sets from remote container you have to manually purge it.
"
))
{
delete_backup
(
backup
);
}
});
li
.
append
(
a_del
);
ul
.
append
(
li
);
$
(
"
#sidebar
"
).
append
(
ul
);
});
}
function
activate_li
(
id
)
{
$
(
"
li
"
).
each
(
function
(
i
,
li
)
{
if
(
$
(
this
).
is
(
"
#
"
+
id
))
{
...
...
@@ -206,23 +163,16 @@
<body>
<div
class=
"row"
>
<div
class=
"small-12 columns"
>
<p>
</p>
</div>
</div>
<div
class=
"row"
>
<div
class=
"small-3 columns vertical-border"
id=
"sidebar"
>
<div
class=
"small-2 columns"
id=
"sidebar"
>
<a
href=
"#"
onclick=
"load_backup();"
class=
"button radius small"
>
<i
class=
"fa fa-plus-circle"
>
Add
Backup
</i>
<i
class=
"fa fa-plus-circle"
>
Add
</i>
</a>
</div>
<div
class=
"small-
9
columns"
>
<div
class=
"small-
10
columns"
>
<ul
class=
"tabs"
data-tab
>
<li
class=
"tab-title radius"
id=
"backup_details_tab"
>
<a
href=
"#backup_details"
id=
"backup_details_link"
>
Backup
</a>
</li>
<li
class=
"tab-title radius"
id=
"restore_details_tab"
>
<a
href=
"#restore_details"
id=
"restore_details_link"
>
Restore
</a>
<a
href=
"#backup_details"
onclick=
"$('#backup_details').show()"
id=
"backup_details_link"
>
Settings
</a>
</li>
<li
class=
"tab-title radius"
>
<a
href=
"#timeview"
id=
"timeview_link"
>
Timeview
</a>
...
...
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