blob: a7f968e42c236126491255f7b3dbd3d4d08c8d78 (
plain) (
blame)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<!--
SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me>
SPDX-License-Identifier: BSD-3-Clause
-->
{% extends "base.html" %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="mb-0">Dashboard</h1>
<span class="text-body-secondary">Single-site overview</span>
</div>
<div class="row g-4 mb-4">
<section class="col-lg-6" aria-labelledby="received-summary">
<div class="card h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center mb-3">
<h2 class="h4 mb-0" id="received-summary">Received</h2>
<a href="{{ url_for('webmentions.received_list') }}">View all</a>
</div>
<p class="display-6 mb-3">{{ received_total }} <span class="fs-6 text-body-secondary">total</span></p>
<div class="row row-cols-2 g-3">
<div class="col">
<a href="{{ url_for('webmentions.received_list', status='pending') }}">Pending</a>
<div class="h3">{{ received_counts.received }}</div>
</div>
<div class="col">
<a href="{{ url_for('webmentions.received_list', status='verifying') }}">Verifying</a>
<div class="h3">{{ received_counts.verifying }}</div>
</div>
<div class="col">
<a href="{{ url_for('webmentions.received_list', status='verified') }}">Verified</a>
<div class="h3">{{ received_counts.verified }}</div>
</div>
<div class="col">
<a href="{{ url_for('webmentions.received_list', status='declined') }}">Declined</a>
<div class="h3">{{ received_counts.failed + received_counts.source_removed }}</div>
<p class="small text-body-secondary mb-0">Failed: {{ received_counts.failed }} · Source removed: {{ received_counts.source_removed }}</p>
</div>
</div>
</div>
</div>
</section>
<section class="col-lg-6" aria-labelledby="sent-summary">
<div class="card h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center mb-3">
<h2 class="h4 mb-0" id="sent-summary">Outgoing</h2>
<a href="{{ url_for('webmentions.source_list') }}">View sources</a>
</div>
<p class="display-6 mb-3">{{ sent_total }} <span class="fs-6 text-body-secondary">total</span></p>
<div class="row row-cols-2 g-3">
<div class="col">
<div>Sent</div>
<div class="h3">{{ sent_counts.sent }}</div>
</div>
<div class="col">
<div>No endpoint</div>
<div class="h3">{{ sent_counts.no_endpoint }}</div>
</div>
<div class="col">
<div>Failed (final)</div>
<div class="h3">{{ sent_counts.failed }}</div>
</div>
<div class="col">
<div>Not attempted</div>
<div class="h3">{{ not_attempted }}</div>
</div>
<div class="col">
<div>Pending</div>
<div class="h3">{{ pending_sends }}</div>
<p class="small text-body-secondary mb-0">Waiting to retry: {{ waiting_retries }}</p>
</div>
</div>
</div>
</div>
</section>
</div>
<section class="mb-4" aria-labelledby="recent-activity">
<h2 class="h4" id="recent-activity">Recent activity</h2>
<div class="table-responsive">
<table class="table table-bordered align-middle">
<thead>
<tr>
<th scope="col">Activity (UTC)</th>
<th scope="col">Last 7 days</th>
<th scope="col">Last 30 days</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">New received Webmentions</th>
<td>{{ recent[7].received }}</td>
<td>{{ recent[30].received }}</td>
</tr>
<tr>
<th scope="row">Webmentions last sent successfully</th>
<td>{{ recent[7].sent }}</td>
<td>{{ recent[30].sent }}</td>
</tr>
</tbody>
</table>
</div>
</section>
<section aria-labelledby="operations">
<h2 class="h4" id="operations">Operations</h2>
<div class="row g-3">
<div class="col-md-4">
<div class="card h-100">
<div class="card-body">
<h3 class="h6 text-body-secondary">Source documents</h3>
<p class="h3 mb-0">{{ source_count }}</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card h-100">
<div class="card-body">
<h3 class="h6 text-body-secondary">Last completed source scan</h3>
{% if last_scan %}
<time datetime="{{ last_scan.isoformat() }}" class="fs-5">
{{ last_scan.strftime("%Y-%m-%d %H:%M:%S") }} UTC
</time>
{% else %}
<p class="text-body-secondary mb-0">No completed scan yet</p>
{% endif %}
</div>
</div>
</div>
<div class="col-md-4">
<div class="card h-100">
<div class="card-body">
<h3 class="h6 text-body-secondary">Huey pending tasks</h3>
{% if queue_size is not none %}
<p class="h3 mb-0">{{ queue_size }}</p>
{% else %}
<p class="text-body-secondary mb-0">Unavailable</p>
{% endif %}
</div>
</div>
</div>
</div>
</section>
{% endblock %}
|