mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 15:21:13 +02:00
Notification feed for the hypervisor
This commit is contained in:
15 files changed
+425
-144
No files matched your search
@@ -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,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>
|
||||
|
||||
@@ -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()">
|
||||
|
||||
Reference in new issue
Block a user