|
1
|
{% extends "base.html" %} |
|
2
|
{% block title %}Deliveries — {{ webhook.url }} — {{ project.name }} — Fossilrepo{% endblock %} |
|
3
|
|
|
4
|
{% block content %} |
|
5
|
<h1 class="text-2xl font-bold text-gray-100 mb-2">{{ project.name }}</h1> |
|
6
|
{% include "fossil/_project_nav.html" %} |
|
7
|
|
|
8
|
<div class="mb-4"> |
|
9
|
<a href="{% url 'fossil:webhooks' slug=project.slug %}" class="text-sm text-brand-light hover:text-brand">← Back to Webhooks</a> |
|
10
|
</div> |
|
11
|
|
|
12
|
<div class="flex items-center justify-between mb-6"> |
|
13
|
<div> |
|
14
|
<h2 class="text-lg font-semibold text-gray-200">Delivery Log</h2> |
|
15
|
<p class="text-sm text-gray-400 mt-1 truncate max-w-xl">{{ webhook.url }}</p> |
|
16
|
</div> |
|
17
|
</div> |
|
18
|
|
|
19
|
{% if deliveries %} |
|
20
|
<div class="overflow-x-auto rounded-lg border border-gray-700"> |
|
21
|
<table class="min-w-full divide-y divide-gray-700"> |
|
22
|
<thead class="bg-gray-800"> |
|
23
|
<tr> |
|
24
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-400 uppercase tracking-wider">Status</th> |
|
25
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-400 uppercase tracking-wider">Event</th> |
|
26
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-400 uppercase tracking-wider">Response</th> |
|
27
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-400 uppercase tracking-wider">Duration</th> |
|
28
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-400 uppercase tracking-wider">Attempt</th> |
|
29
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-400 uppercase tracking-wider">Delivered</th> |
|
30
|
</tr> |
|
31
|
</thead> |
|
32
|
<tbody class="divide-y divide-gray-800 bg-gray-900"> |
|
33
|
{% for d in deliveries %} |
|
34
|
<tr class="hover:bg-gray-800/50"> |
|
35
|
<td class="px-4 py-3 whitespace-nowrap"> |
|
36
|
{% if d.success %} |
|
37
|
<span class="inline-flex rounded-full bg-green-900/50 px-2 py-0.5 text-xs font-semibold text-green-300">OK</span> |
|
38
|
{% else %} |
|
39
|
<span class="inline-flex rounded-full bg-red-900/50 px-2 py-0.5 text-xs font-semibold text-red-300">Failed</span> |
|
40
|
{% endif %} |
|
41
|
</td> |
|
42
|
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-300">{{ d.event_type }}</td> |
|
43
|
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-300">{{ d.response_status|default:"--" }}</td> |
|
44
|
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-400">{{ d.duration_ms }}ms</td> |
|
45
|
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-400">#{{ d.attempt }}</td> |
|
46
|
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">{{ d.delivered_at|timesince }} ago</td> |
|
47
|
</tr> |
|
48
|
{% endfor %} |
|
49
|
</tbody> |
|
50
|
</table> |
|
51
|
</div> |
|
52
|
{% else %} |
|
53
|
<div class="rounded-lg bg-gray-800 border border-gray-700 p-8 text-center"> |
|
54
|
<p class="text-sm text-gray-500">No deliveries yet.</p> |
|
55
|
</div> |
|
56
|
{% endif %} |
|
57
|
{% endblock %} |
|
58
|
|