gns3-registry/templates/appliance.html

76 lines
3.2 KiB
HTML
Raw Normal View History

2015-07-16 15:24:20 +02:00
{% extends "layout/default.html" %}
2015-08-05 23:58:53 +02:00
{% block script %}
2015-08-06 15:05:14 +02:00
function download(appliance, md5sum) {
2015-08-05 23:58:53 +02:00
if (gns3_button(function() {
2015-08-06 15:05:14 +02:00
return gns3.download(appliance, md5sum)
2015-08-05 23:58:53 +02:00
})) {
gns3_notif("success", "You can see the download progress in the <a href=\"/downloads.html\">Downloads</a> section");
return true;
}
return false;
}
{% endblock %}
2015-07-16 15:24:20 +02:00
{% block body %}
<div class="jumbotron">
2015-08-06 15:25:24 +02:00
{% if appliance["status"] == "broken" %}
<div class="alert alert-danger" role="alert">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
<span class="sr-only">Error:</span>
This appliance is actually not working
</div>
{% endif %}
2015-09-02 12:10:31 +02:00
{% if appliance["status"] == "experimental" %}
<div class="alert alert-warning" role="alert">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
<span class="sr-only">Error:</span>
This appliance is actually experimental
</div>
{% endif %}
2015-08-06 15:05:14 +02:00
<h1>{{ appliance["name"] }}</h1>
Category {{ appliance["category"] }}<br />
Product: <a href="{{ appliance["product_url"] }}">{{ appliance["product_name"] }}</a><br />
Vendor: <a href="{{ appliance["vendor_url"] }}">{{ appliance["vendor_name"] }}</a><br />
Documentation: <a href="{{ appliance["documentation_url"] }}">{{ appliance["documentation_url"] }}</a><br />
Status: {{ appliance["status"] }}<br />
Maintainer: <a href="mailto:{{ appliance["maintainer_email"] }}">{{ appliance["maintainer"] }}</a>
2015-08-06 15:25:24 +02:00
<p>{{ appliance["description"] | nl2br }}</p>
2015-08-06 14:56:56 +02:00
2015-08-06 15:25:24 +02:00
2015-08-27 19:12:16 +02:00
</div>
{% if appliance["usage"] %}
<h2>Usage</h2>
<p>{{ appliance["usage"] | nl2br }}</p>
{% endif %}
2015-08-06 14:56:56 +02:00
2015-08-06 15:05:14 +02:00
{% if "qemu" in appliance %}
<h2>Qemu settings</h2>
2015-08-06 15:05:14 +02:00
{% for key in appliance["qemu"] %}
{{ key }}: {{ appliance["qemu"][key] }}<br />
{% endfor %}
{% endif %}
2015-08-06 15:05:14 +02:00
{% for version in appliance["versions"] | reverse %}
<h2>{{ appliance["name"] }} {{version["name"]}}</h2>
<button class="btn btn-primary btn-lg" type="button" onclick='gns3_button(function() { return gns3.install("{{appliance|jsonify|b64encode}}", "{{version["name"]}}") })'>Install</button>
<h3>Require files</h3>
{% for image in version.images.values() %}
<h4>{{image["filename"]}}</h4>
Slot: {{image["type"]}}<br />
File Version: {{image["version"]}}<br />
2015-09-02 12:10:31 +02:00
Size: {{ image["filesize"] | human_filesize}}<br />
Checksum: {{image["md5sum"]}}<br />
Download url: <a href="{{image["download_url"]}}">{{image["download_url"]}}</a><br />
{% if "direct_download_url" in image %}
Direct download url: <a href="{{image["direct_download_url"]}}">{{image["direct_download_url"]}}</a><br />
2015-08-06 15:05:14 +02:00
<button class="btn btn-primary btn-lg" type="button" onclick='return download("{{appliance|jsonify|b64encode}}", "{{image["md5sum"]}}")'>Download</button>
{% endif %}
<hr />
{% endfor %}
2015-07-16 15:24:20 +02:00
{% endfor %}
{% endblock %}