mirror of
https://github.com/GNS3/gns3-registry.git
synced 2025-01-31 00:24:52 +00:00
Show a page with current downloads
This commit is contained in:
parent
493bec9994
commit
196e51179d
1
build.py
1
build.py
@ -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
20
templates/downloads.html
Normal 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 %}
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user