clearly shows files not ready
This commit is contained in:
parent
f8cb5a9bce
commit
775d618315
2 changed files with 11 additions and 4 deletions
|
@ -44,6 +44,7 @@ class Rec(Base):
|
|||
"starttime": self.starttime,
|
||||
"endtime": self.endtime,
|
||||
"filename": self.filename,
|
||||
"ready": self.ready,
|
||||
}
|
||||
|
||||
def __repr__(self):
|
||||
|
|
|
@ -37,11 +37,17 @@ $(function() {
|
|||
);
|
||||
var duration = $('<td/>').text(delta(rec.endtime, rec.starttime));
|
||||
var dl_text = $('<span/>').text(" Scarica").addClass('pure-hidden-phone');
|
||||
var fn = $("<td/>").append($("<a/>").prop("href", "/output/" +
|
||||
rec.filename).addClass("pure-button pure-button-small")
|
||||
var fn = $("<td/>")
|
||||
if(rec.ready) {
|
||||
fn.append($("<a/>").prop("href", "/output/" + rec.filename)
|
||||
.addClass("pure-button pure-button-small")
|
||||
.html( $("<i/>").addClass("fa fa-download").css("color", "green"))
|
||||
.append(dl_text));
|
||||
} else {
|
||||
fn.html("<small>File not found</small>")
|
||||
}
|
||||
var row = $('<tr/>').append(name).append(start).append(duration).append(fn);
|
||||
row.data('id', rec.id)
|
||||
$('#ongoing-recs-table tbody').append(row);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue