Websockets were unnecessary, as we only need 1-way communication. Instead, we switched to server-sent events. But there are a couple of problems: 1. We still can't stop the server while a websocket connection is open 2. SSE make it difficult to format messages So this is not a big win for now...
79 lines
2.7 KiB
HTML
79 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="Tutor Dash">
|
|
|
|
<title>Tutor Dash</title>
|
|
|
|
<!-- Favicon -->
|
|
<!-- TODO -->
|
|
<!-- <link rel="icon" type="image/x-icon" href="/favicon.ico"> -->
|
|
<!-- CSS -->
|
|
<!-- <link rel="stylesheet" href="css/normalize.css"> -->
|
|
<!-- <link rel="stylesheet" href="css/styles.css"> -->
|
|
<link href="{{ url_for('static', filename='/css/dash.css') }}" rel="stylesheet">
|
|
<!-- TODO self-host -->
|
|
<script src="https://unpkg.com/htmx.org@2.0.3/dist/htmx.min.js"></script>
|
|
<!-- SSE extension https://htmx.org/extensions/sse/ TODO self host and move to dedicated page-->
|
|
<script src="https://unpkg.com/htmx-ext-sse@2.2.2/sse.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="main-container">
|
|
<div class="sidebar">
|
|
<div class="section">
|
|
<div class="header">
|
|
Administration
|
|
</div>
|
|
<div class="content">
|
|
<ul>
|
|
<li>Configuration</li>
|
|
<li><a href="{{ url_for('tutor_cli_logs') }}">Command logs</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<div class="header">
|
|
Plugins
|
|
</div>
|
|
<div class="content">
|
|
<ul>
|
|
{% for plugin in installed_plugins %}
|
|
<li><a href="{{ url_for('plugin', name=plugin) }}">{{ plugin }}</a></li>
|
|
{% endfor %}
|
|
<form action="{{ url_for('tutor_cli') }}" method="POST">
|
|
<input type="hidden" name="args[]" value="local">
|
|
<input type="hidden" name="args[]" value="launch">
|
|
<button type="submit">Apply changes</button>
|
|
</form>
|
|
<form action="{{ url_for('tutor_cli_stop') }}" method="POST">
|
|
<button type="submit">Stop</button>
|
|
</form>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="workspace">
|
|
<div class="header">
|
|
{% block workspace_header %}{% endblock %}
|
|
</div>
|
|
<div class="content">
|
|
{% block workspace_content %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="status-bar">
|
|
<span>Modified: Just now</span>
|
|
</div>
|
|
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
|
|
</html>
|