Download templates/admin.html from devansh1a/AISPY: direct link, hf CLI and curl.
- Browser
- Download file 2.4 kB
-
https://huggingface.co/spaces/devansh1a/AISPY/resolve/main/templates/admin.html
- Command line
-
hf download hf://spaces/devansh1a/AISPY/templates/admin.html
-
curl -L -o admin.html https://huggingface.co/spaces/devansh1a/AISPY/resolve/main/templates/admin.html
2.4 kB
| {% extends 'base.html' %} | |
| {% block title %}Admin | AISPY{% endblock %} | |
| {% block content %} | |
| <div class="panel mb-4"> | |
| <div class="panel-header"> | |
| <div> | |
| <div class="eyebrow">Administration</div> | |
| <h1>Platform overview</h1> | |
| </div> | |
| <div class="d-flex gap-2 flex-wrap"> | |
| <div class="chip">Users: {{ admin_stats.users }}</div> | |
| <div class="chip">Analyses: {{ admin_stats.analyses }}</div> | |
| <div class="chip">Admins: {{ admin_stats.admins }}</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="dashboard-grid"> | |
| <section class="panel"> | |
| <h2 class="mb-3">Users</h2> | |
| <div class="table-responsive"> | |
| <table class="table table-dark table-hover align-middle"> | |
| <thead><tr><th>ID</th><th>Name</th><th>Email</th><th>Role</th><th></th></tr></thead> | |
| <tbody> | |
| {% for user in users %} | |
| <tr> | |
| <td>#{{ user.id }}</td> | |
| <td>{{ user.name }}</td> | |
| <td>{{ user.email }}</td> | |
| <td>{% if user.is_admin %}Admin{% else %}User{% endif %}</td> | |
| <td> | |
| <form method="post" action="{{ url_for('admin_toggle', user_id=user.id) }}"> | |
| <button class="btn btn-sm btn-outline-light" {% if user.id == current_user.id %}disabled{% endif %}> | |
| Toggle admin | |
| </button> | |
| </form> | |
| </td> | |
| </tr> | |
| {% endfor %} | |
| </tbody> | |
| </table> | |
| </div> | |
| </section> | |
| <aside class="panel"> | |
| <h2 class="mb-3">Recent analyses</h2> | |
| <div class="analysis-list"> | |
| {% for analysis in analyses %} | |
| <div class="analysis-item"> | |
| <div> | |
| <div class="analysis-title">#{{ analysis.id }} · {{ analysis.verdict or 'Unknown' }}</div> | |
| <div class="analysis-meta">User {{ analysis.user_id }} · {{ analysis.created_at }}</div> | |
| </div> | |
| <span class="analysis-score">{{ analysis.confidence or 0 }}%</span> | |
| </div> | |
| {% endfor %} | |
| </div> | |
| </aside> | |
| </div> | |
| {% endblock %} | |