File size: 2,333 Bytes
a6db6a6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
{% extends "base.html" %} {% block title %}Admin Dashboard - Grimvault{%
endblock %} {% block content %}
<div class="container">
<h1>Admin Dashboard</h1>
<table id="user-accounts">
<thead>
<tr>
<th>Username</th>
<th>Created At</th>
<th>Last Active</th>
<th>Storage Used</th>
<th>Storage Limit</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for account in accounts %}
<tr>
<td>{{ account.username }}</td>
<td>{{ account.created_at.strftime('%Y-%m-%d %H:%M:%S') }}</td>
<td>{{ account.last_active.strftime('%Y-%m-%d %H:%M:%S') }}</td>
<td>
{{ (account.storage_used / 1024 / 1024) | round(2) }} MB
</td>
<td>
{{ (account.storage_limit / 1024 / 1024 / 1024) | round(2)
}} GB
</td>
<td>{{ 'Banned' if account.is_banned else 'Active' }}</td>
<td>
<button
class="btn btn-secondary update-storage"
data-username="{{ account.username }}"
>
Update Storage
</button>
<button
class="btn btn-warning toggle-ban"
data-username="{{ account.username }}"
data-banned="{{ account.is_banned }}"
>
{{ 'Unban' if account.is_banned else 'Ban' }}
</button>
<button
class="btn btn-danger delete-account"
data-username="{{ account.username }}"
>
Delete
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a
href="{{ url_for('auth.logout') }}"
class="btn btn-secondary"
id="logout-btn"
>Logout</a
>
</div>
{% endblock %} {% block scripts %}
<script src="{{ url_for('static', filename='js/admindash.js') }}"></script>
{% endblock %}
|