Show a page with current downloads

This commit is contained in:
Julien Duponchelle 2015-07-30 17:51:34 +02:00
parent 493bec9994
commit 196e51179d
3 changed files with 22 additions and 0 deletions

View File

@ -54,6 +54,7 @@ def render(template_file, out, **kwargs):
render('index.html', 'index.html')
render('chat.html', 'chat.html')
render('downloads.html', 'downloads.html')
devices = []

20
templates/downloads.html Normal file
View File

@ -0,0 +1,20 @@
{% extends "layout/default.html" %}
{% block script %}
$(function() {
var downloads_div = $("#downloads");
var downloads = gns3.downloads()
for (var i in downloads) {
download_info = downloads[i];
var div = $("<div>");
div.text(download_info.url + " " + download_info.received + "/" + download_info.total);
downloads_div.append(div);
}
});
{% endblock %}
{% block body %}
<div id="downloads">
</div>
{% endblock %}

View File

@ -44,6 +44,7 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="/devices">Devices</a></li>
<li><a href="/downloads.html">Downloads</a></li>
<li><a href="/chat.html">Chat</a></li>
<li><a href="https://community.gns3.com">Community</a></li>
</ul>