This commit is contained in:
2026-03-10 15:34:22 +00:00
parent 7635caa71d
commit d641e181ba
17 changed files with 347 additions and 7 deletions

41
templates/users.html Normal file
View File

@@ -0,0 +1,41 @@
{% extends "base.html" %}
{% block title %}Users - Status Monitor{% endblock %}
{% block content %}
<h2>Users</h2>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
<form method="post" action="{{ url_for('users') }}" class="add-form">
<input type="text" name="username" placeholder="Username" required>
<input type="password" name="password" placeholder="Password" required>
<button type="submit">Add User</button>
</form>
<table class="services-table">
<thead>
<tr>
<th>Username</th>
<th>Admin</th>
<th>Created</th>
</tr>
</thead>
<tbody>
{% for u in users %}
<tr>
<td>{{ u.username }}</td>
<td>{% if u.is_admin %}Yes{% else %}No{% endif %}</td>
<td>{{ u.created_at[:19] if u.created_at else '-' }}</td>
</tr>
{% else %}
<tr>
<td colspan="3">No users.</td>
</tr>
{% endfor %}
</tbody>
</table>
<p><a href="{{ url_for('dashboard') }}">&larr; Back to Dashboard</a></p>
{% endblock %}