mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 15:21:13 +02:00
The controller has a streaming API
Now we need to link the hypervisor to the controller.
This commit is contained in:
9 files changed
+255
-53
No files matched your search
@@ -1,4 +1,5 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block body %}
|
||||
<h1>
|
||||
Controller status
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block head %}
|
||||
<script>
|
||||
var socket = new WebSocket("ws://" + location.host + "/v2/projects/{{project.id}}/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>
|
||||
{{project.name}}
|
||||
@@ -34,6 +50,8 @@ in futur GNS3 versions.
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
<h2>Notifications</h2>
|
||||
<div id="notifications">
|
||||
</div>
|
||||
{%endblock%}
|
||||
|
||||
Reference in new issue
Block a user