From 57b1029aace3c670b8096ef7b6247f242531fc13 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 9 Sep 2015 09:17:59 +0200 Subject: [PATCH] Hide / show buttons --- templates/appliance.html | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/templates/appliance.html b/templates/appliance.html index 967a0a0..25fccc9 100644 --- a/templates/appliance.html +++ b/templates/appliance.html @@ -14,6 +14,12 @@ function download(appliance, md5sum) { var installable_versions = gns3.installableVersions("{{appliance|jsonify|b64encode}}"); +var images_md5sum = []; +var images = gns3.images(); +for (var i in images) { + images_md5sum.push(images[i].md5sum); +} + {% endblock %} {% block body %} @@ -59,9 +65,13 @@ var installable_versions = gns3.installableVersions("{{appliance|jsonify|b64enco {% for version in appliance["versions"] | reverse %}

{{ appliance["name"] }} {{version["name"]}}

- - + +

Require files

+ + {% set version_id = loop.index %} {% for image in version.images.values() %}

{{image["filename"]}}

Slot: {{image["type"]}}
@@ -69,11 +79,19 @@ var installable_versions = gns3.installableVersions("{{appliance|jsonify|b64enco Size: {{ image["filesize"] | human_filesize}}
Checksum: {{image["md5sum"]}}
Download url: {{image["download_url"]}}
+ {% if "direct_download_url" in image %} Direct download url: {{image["direct_download_url"]}}
- + {% endif %} - + + + + +
{% endfor %} {% endfor %}