2023-09-20 11:46:35 +02:00
|
|
|
|
|
|
|
{% extends "base.html" %}
|
2023-09-20 13:13:41 +02:00
|
|
|
{% block left_pannel %}override{% endblock %}
|
2023-09-20 11:46:35 +02:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
{%if not current_user.is_authenticated %}
|
|
|
|
<button class="unselected" onclick="location.href = '/login';">login</button>
|
|
|
|
{% else %}
|
2023-09-27 20:12:29 +02:00
|
|
|
<table>
|
|
|
|
<tr>
|
2023-10-02 21:55:56 +02:00
|
|
|
<td width="20%" height="90%">
|
|
|
|
<div id="console"></div>
|
|
|
|
</td>
|
|
|
|
<td width="80%">
|
|
|
|
<iframe src="/novnc/vnc.html?resize=scale&path=novnc/websockify&autoconnect=true&view_only" width="100%" height="100%" frameborder="0"></iframe>
|
|
|
|
</td>
|
2023-09-27 20:12:29 +02:00
|
|
|
</tr>
|
|
|
|
</table>
|
2023-09-27 20:05:39 +02:00
|
|
|
|
2023-10-02 21:55:56 +02:00
|
|
|
|
|
|
|
|
2023-09-27 20:05:39 +02:00
|
|
|
<script>
|
2023-10-02 21:55:56 +02:00
|
|
|
const consoleElement = document.getElementById('console');
|
|
|
|
const eventSource = new EventSource('/stream');
|
2023-09-27 20:05:39 +02:00
|
|
|
|
2023-10-02 21:55:56 +02:00
|
|
|
eventSource.onmessage = (event) => {
|
2023-10-05 22:06:52 +02:00
|
|
|
document.getElementById("console").innerHTML = event.data + document.getElementById("console").innerHTML
|
2023-10-02 21:55:56 +02:00
|
|
|
};
|
2023-09-27 20:05:39 +02:00
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2023-09-20 11:46:35 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{%endblock %}
|