gns3-registry/templates/myimages.html

34 lines
890 B
HTML
Raw Normal View History

2015-08-28 19:46:13 +00:00
{% 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));
2015-09-02 10:10:31 +00:00
tr.append($("<td>").text(humanFileSize(image_info.filesize)));
2015-08-28 19:46:13 +00:00
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>
2015-09-02 10:10:31 +00:00
<th>Size</th>
2015-08-28 19:46:13 +00:00
<th>Action</th>
</tr>
</table>
{% endblock %}