User can control their own nodes: delete/expire

This commit is contained in:
2024-07-26 12:03:15 +02:00
parent facaaed9eb
commit 426c01ba6b
7 changed files with 90 additions and 16 deletions

View File

@ -47,6 +47,7 @@
<div class="col col-2"><strong>registered</strong></div>
<div class="col col-2"><strong>last event</strong></div>
<div class="col col-2"><strong>online</strong></div>
<div class="col col-2"><strong>&nbsp;</strong></div>
</div>
{% for node in userNodeList %}
<div class="row data">
@ -66,6 +67,13 @@
<div class="col col-2">
{{node.online | fancyBool | safe }}
</div>
<div class="col col-2">
<span data-toggle="tooltip" data-placement="right" title="delete">
<a class="nodeco" href="{{ url_for('rest.deleteOwnNode', nodeId=node.id) }}">
<i class="fas fa-trash"></i>
</a>
</span>
</div>
</div>
{% endfor %}
{% endblock %}

View File

@ -24,6 +24,9 @@
{% else %}
<span class="badge badge-pill badge-danger">offline</span>
{% endif %}
(<span data-toggle="tooltip" data-placement="right" title="{{ node.lastSeen | fmt_datetime }}">
{{ node.lastSeen | htime_dt }}
</span>)
</div>
</div>
<div class="row">

View File

@ -10,7 +10,7 @@
<th>name</th>
<th>user</th>
<th>expire</th>
<th>last event</th>
<th>last activity</th>
<th>addresses</th>
<th>online</th>
<th>&nbsp;</th>

View File

@ -23,8 +23,9 @@
<thead>
<tr>
<th>&nbsp;</th>
<th>last connect</th>
<th>last activity</th>
<th>online</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
@ -45,6 +46,22 @@
<td>
{{node.online | fancyBool | safe}}
</td>
<td class="no-sort">
{% if node.expireDate and not node.expired %}
<span data-toggle="tooltip" data-placement="right" title="expire/disconnect">
<a class="nodeco" href="{{ url_for('rest.expireNodeUser', nodeId=node.id) }}">
<i class="fas fa-plug"></i>
</a>
</span>
{% else %}
<i class="fas fa-plug disabled"></i>
{% endif %}
<span data-toggle="tooltip" data-placement="right" title="delete">
<a class="nodeco" href="{{ url_for('rest.deleteNodeUser', nodeId=node.id) }}">
<i class="fas fa-trash"></i>
</a>
</span>
</td>
</tr>
{% endfor %}
</tbody>