gns3-registry/templates/myimages.html
Julien Duponchelle 728f092a13 Add filesize for images
Fix #8
2015-09-02 12:10:31 +02:00

34 lines
890 B
HTML

{% extends "layout/default.html" %}
{% block script %}
$(function() {
var table = $("#images");
var images = gns3.images();
for (var i in images) {
image_info = images[i];
var tr = $("<tr>");
tr.append($("<td>").text(image_info.filename));
tr.append($("<td>").text(image_info.md5sum));
tr.append($("<td>").text(humanFileSize(image_info.filesize)));
var a = $("<a>");
a.attr("href", "/images/" + image_info.md5sum + ".html");
a.append($("<button>").attr("class", "btn btn-primary btn-lg").text("Search appliance"));
tr.append($("<td>").append(a))
table.append(tr);
}
});
{% endblock %}
{% block body %}
<table id="images" class="table table-striped">
<tr>
<th>Filename</th>
<th>MD5 sum</th>
<th>Size</th>
<th>Action</th>
</tr>
</table>
{% endblock %}