Commit 9ebcb427 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Add cleanup tab

Also cleanup code
parent 59cf294e
......@@ -189,16 +189,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
$("#backup_details_link").prop("disabled", disable);
$("#status_link").prop("disabled", disable);
$("#timeview_link").prop("disabled", disable);
$("#cleanup_link").prop("disabled", disable);
if(disable) {
$("#backup_details_link").attr("click", "");
$("#status_link").click(function(e) { e.preventDefault(); });
$("#status_link").unbind("click");
$("#timeview_link").click(function(e) { e.preventDefault(); });
$("#timeview_link").unbind("click");
$("#cleanup_link").click(function(e) { e.preventDefault(); });
$("#cleanup_link").unbind("click");
} else {
$("#backup_detais_link").click(function(e) { load_backup(); });
$("#status_link").click(function(e) { load_status(); });
$("#timeview_link").click(function(e) { load_timeview(); });
$("#cleanup_link").click(function(e) { $("#backup_details").hide() });
}
}
......@@ -218,7 +222,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
</script>
<div class="row">
<div class="row">
<div class="small-2 columns" id="sidebar">
<a href="#" onclick="$('#template_list').show();load_backup();" class="button radius small">
<i class="fa fa-plus-circle">&nbsp;Add</i>
......@@ -226,9 +230,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
<div class="small-9 columns selected-bar text-center" id="selected-bar"></div>
<div class="small-1 columns"></div>
</div>
<div class="row">
<div class="small-2 columns hide" id="template_list">
</div>
<div class="row">
<div class="small-2 columns">&nbsp;
<div class="hide" id="template_list"></div>
</div>
<div class="small-10 columns">
<ul class="tabs" data-tab>
......@@ -242,6 +247,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li class="tab-title radius">
<a href="#status" id="status_link">Status</a>
</li>
<li class="tab-title radius">
<a href="#cleanup" id="cleanup_link">Cleanup</a>
</li>
</ul>
<div class="tabs-content">
<div class="content" id="backup_details">
......@@ -424,16 +432,54 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="small-8 columns scroll-list" id="time-contents"></div>
</div>
</div>
<div class="content" id="cleanup">
<div class="clearfix">
<div class="small-3 columns">
<label id="remove-all-label" for="remove-all" class="right inline">
Remove older than&nbsp;<i class="fa fa-info-circle green-info"
onclick="$('#remove-all-help').slideDown();"></i>
</label>
</div>
<div id="loader" class="hide text-center">
<i class="fa fa-spinner fa-pulse fa-2x gray-spin"></i>
<div class="small-9 columns error" id="remove-all-error">
<input type="text" id="remove-all">
<small class="error"></small>
</div>
<div class="small-3 columns">&nbsp;</div>
<div class="small-9 columns hide info-text panel" id="remove-all-help">
<i class="fa fa-times right" onclick="$('#remove-all-help').slideUp();"></i>
Delete all backup sets older than the given time.
Accepts following formats<br>
1. String "now" refers to current time<br>
2. A sequences of digits, like "123456890" (indicating the time in seconds after the epoch)<br>
3. A string like "2002-01-25T07:00:00+02:00" in datetime format<br>
4. A number followed by one of the characters s, m, h, D, W, M, or Y
(indicating seconds, minutes, hours, days, weeks, months, or years respectively),
or a series of such pairs. In this case the string refers to the time that preceded
the current time by the length of the interval.
For instance, "1h78m" indicates the time that was one hour and 78 minutes ago.<br>
5. A date format of the form YYYY/MM/DD, YYYY-MM-DD, MM/DD/YYYY, or MM-DD-YYYY,
which indicates midnight on the day in question, relative to the current time zone settings.
</div>
</div>
<div class="row">
<div class="clearfix">
<div class="small-8 columns">&nbsp;</div>
<div class="small-4 columns">
<a id="remove-all-button" class="button radius right small"
onclick="remove_all()">
<i class="fa fa-cloud-download"></i>&nbsp;Remove All</a>
</div>
</div>
</div>
</div>
</div>
<div id="loader" class="hide text-center">
<i class="fa fa-spinner fa-pulse fa-2x gray-spin"></i>
</div>
</div>
<div class="row">
<div class="small-1 columns"></div>
<pre id="msg" class="small-11 columns"></pre>
</div>
<script type="text/javascript">
</div>
<script type="text/javascript">
$(document).foundation();
</script>
</script>
......@@ -52,6 +52,7 @@ function hide_error_divs() {
$('#res-file-error small').hide();
$('#timestamp-error small').hide();
$('#time-head-error small').hide();
$('#remove-all-error small').hide();
}
function load_backup(backup) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment