Notification feed for the hypervisor

This commit is contained in:
Julien Duponchelle committed 2016-03-17 15:15:30 +01:00
1 parent d81fc25b27
commit b55969d381
15 files changed
+425 -144

No files matched your search

+21 -1
View File
@@ -1,7 +1,22 @@
{% extends "layout.html" %}
{% block head %}
<script>
var socket = new WebSocket("ws://" + location.host + "/v2/hypervisor/notifications/ws");
socket.onopen = function (event) {
document.getElementById("notifications").innerText = "Connected";
};
socket.onmessage = function (event) {
document.getElementById("notifications").innerText = event.data + "\n" + document.getElementById("notifications").innerText;
};
</script>
{% endblock %}
{% block body %}
<h1>
Server status
Hypervisor status
</h1>
The purpose of this page is to help for GNS3 debug. This can be dropped
in futur GNS3 versions.
@@ -39,4 +54,9 @@ in futur GNS3 versions.
<li>{{port}}</li>
{% endfor %}
</ul>
<h2>Notifications</h2>
<div id="notifications">
</div>
{% endblock %}
+1 -3
View File
@@ -1,9 +1,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script>
{% block script %}{% endblock %}
</script>
{% block head %}{% endblock %}
<title>GNS3 Server</title>
</head>
<body>
+5 -1
View File
@@ -1,5 +1,7 @@
{% extends "layout.html" %}
{% block script %}
{% block head %}
<script>
function onSubmit() {
if (document.getElementById("uploadInput").files == undefined) {
//OLD browser
@@ -15,7 +17,9 @@ function onSubmit() {
}
return true;
}
</script>
{% endblock %}
{% block body %}
<h1>Select & Upload an image for GNS3</h1>
<form enctype="multipart/form-data" action="/upload" method="post" onSubmit="return onSubmit()">