Files
2026-08-30 11:30:09 +02:00

35 lines
1.0 KiB
HTML

{% extends "base.html" %}
{% block title %}Groups — MQTT Ingester{% endblock %}
{% block content %}
<h1>Groups</h1>
<h2>Create group</h2>
<form method="post" action="/groups" class="stack">
<input type="hidden" name="csrf_token" value="{{ identity.csrf_token }}">
<label>Name <input type="text" name="name" required></label>
<button type="submit">Create</button>
</form>
<h2>Existing groups</h2>
{% if groups %}
<table>
<thead><tr><th>Name</th><th>Members</th><th>Rules</th><th></th></tr></thead>
<tbody>
{% for g in groups %}
<tr>
<td><a href="/groups/{{ g.id }}">{{ g.name }}</a></td>
<td>{{ g.member_count }}</td>
<td>{{ g.rule_count }}</td>
<td>
<form method="post" action="/groups/{{ g.id }}/delete">
<input type="hidden" name="csrf_token" value="{{ identity.csrf_token }}">
<button type="submit" class="link danger">delete</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No groups yet.</p>
{% endif %}
{% endblock %}