42 lines
1.1 KiB
HTML
42 lines
1.1 KiB
HTML
{% 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') }}">← Back to Dashboard</a></p>
|
|
{% endblock %}
|