Support the import feature

This commit is contained in:
Julien Duponchelle 2015-08-05 17:50:17 +02:00
parent 930d35f4cd
commit d6baee2fe1

View File

@ -3,7 +3,10 @@
function importDevice() { function importDevice() {
md5 = gns3.importDevice(); md5 = gns3.importDevice();
if (md5 != null) {
window.location = "/images/" + md5 + ".html" window.location = "/images/" + md5 + ".html"
}
return false;
} }
{% endblock %} {% endblock %}
@ -14,6 +17,6 @@ function importDevice() {
</div </div
<p> <p>
<a class="btn btn-primary btn-lg" href="/devices" role="button">Show devices</a> <a class="btn btn-primary btn-lg" href="/devices" role="button">Show devices</a>
<a class="btn btn-primary btn-lg" href="#" role="button" onclick="importDevice()">Import device</a> <a class="btn btn-primary btn-lg" href="#" role="button" onclick="return importDevice()">Import device</a>
</p> </p>
{% endblock %} {% endblock %}