2023-06-17 16:52:47 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
2023-09-27 19:55:43 +02:00
|
|
|
{% block left_pannel %}{% endblock %}
|
2023-06-17 16:52:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{%if not current_user.is_authenticated %}
|
|
|
|
<button class="unselected" onclick="location.href = '/login';">login</button>
|
|
|
|
{% else %}
|
2023-10-02 21:55:56 +02:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td width="20%" height="90%">
|
|
|
|
<div id="console"></div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2023-06-17 16:52:47 +02:00
|
|
|
|
2023-10-02 21:55:56 +02:00
|
|
|
<script>
|
|
|
|
const consoleElement = document.getElementById('console');
|
|
|
|
const eventSource = new EventSource('/stream');
|
2023-09-27 19:38:21 +02:00
|
|
|
|
2023-10-02 21:55:56 +02:00
|
|
|
eventSource.onmessage = (event) => {
|
2023-10-02 23:19:17 +02:00
|
|
|
console.log("etqhbbqetbqedrtqberzegr");
|
2023-10-02 21:55:56 +02:00
|
|
|
const newOutput = document.createElement('div');
|
|
|
|
newOutput.textContent = event.data;
|
|
|
|
consoleElement.appendChild(newOutput);
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|
2023-06-17 16:52:47 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|