Files
nitter-status/server/templates/admin.html.j2
T
2025-05-16 19:52:36 +02:00

60 lines
2.3 KiB
Django/Jinja

{# SPDX-License-Identifier: AGPL-3.0-only #}
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="utf-8">
<link href="/static/bootstrap.min.css" rel="stylesheet">
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="" />
<title>Admin Interface</title>
</head>
<body>
<div class="container">
<h1>Admin Interface</h1>
<p><a href="/admin/logout">Logout</a> <a href="/admin/login">Add more instances</a></p>
{% if is_admin %}<p><a href="/admin/logs">Settings Logs</a></p>{% endif %}
<h4>Instances</h4>
{% if is_admin %}<p class="text-danger-emphasis">root mode</p>{% endif %}
<div><canvas id="graph-health" width="600" height="200"></canvas><noscript>History feature works only with javascript enabled.</noscript></div>
<div class="container mt-5">
<form>
<div class="row">
<div class="col">
<label for="startDate">Start Date:</label>
<input type="date" class="form-control" id="startDate" name="startDate">
</div>
<div class="col">
<label for="endDate">End Date:</label>
<input type="date" class="form-control" id="endDate" name="endDate">
</div>
</div>
<button type="button" class="btn btn-primary mt-1" id="submitDateRange">Change</button>
</form>
</div>
<div class="table-responsive">
<table id="status-tbl" class="table sortable table-hover table-sm">
<thead>
<tr>
<th scope="col">Instance</th>
</tr>
</thead>
<tbody>
{% for instance in instances -%}
<tr>
<td>{{instance.domain}}</td>
<td><a href="/admin/instance/stats/{{instance.id}}">Stats</a></td>
<td><a href="/admin/instance/errors/{{instance.id}}">Errors</a> <a href="/admin/instance/settings/{{instance.id}}">Settings</a></td>
</tr>
{%- endfor %}
</tbody>
</table>
</div>
<script src="/static/moment.min_2.29.4.js"></script>
<script src="/static/chart.min_4.4.0.js"></script>
<script src="/static/chartjs-adapter-moment_1.0.1.js"></script>
<script src="/static/admin.js"></script>
</body>
</html>