Commit d773b3d5 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Write/show last backup timestamp

parent 778730b9
......@@ -70,6 +70,16 @@
});
li.append(a_del);
if(typeof backup.first_backup != 'undefined') {
li.append("<br>");
var first = new Date(backup.first_backup).toLocaleString();
var first_p = $("<span>First : " + first + " </span>");
li.append(first_p);
li.append("<br>");
var last = new Date(backup.last_backup).toLocaleString();
var last_p = $("<span>Last : " + last + " </span>");
li.append(last_p);
}
ul.append(li);
$("#backup-table").append(ul);
});
......
......@@ -104,9 +104,13 @@ function save_backup_set() {
container = backup_set.container;
backup_set.exclude = exclude;
backup_set.include = include;
if(typeof backups[cloud + "/" + backup_name] != 'undefined' &&
typeof backups[cloud + "/" + backup_name].first_backup != 'undefined') {
backup_set.first_backup = backups[cloud + "/" + backup_name].first_backup;
if(typeof backups[cloud + "/" + backup_name] != 'undefined') {
if(typeof backups[cloud + "/" + backup_name].first_backup != 'undefined') {
backup_set.first_backup = backups[cloud + "/" + backup_name].first_backup;
}
if(typeof backups[cloud + "/" + backup_name].last_backup != 'undefined') {
backup_set.last_backup = backups[cloud + "/" + backup_name].last_backup;
}
}
backups[cloud + "/" + backup_name] = backup_set;
render_backup_sets("");
......@@ -123,13 +127,3 @@ function delete_backup(backup) {
$(".tabs").hide();
$(".tabs-content").hide();
}
function write_first_backup() {
var backup_name = $("#backup-name").val().replace(/^\s+|\s+$/gm,'');
var cloud = $("#cloud").val();
var first_backup = null;
backups[cloud + "/" + backup_name].first_backup = new Date();
write_conf_file(BACKUP_CONF_FILE, backups);
}
......@@ -59,3 +59,7 @@
padding-top: 0;
color: white;
}
.backup-box span {
color: gray;
font-size: smaller;
}
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