Name a deleted target on its historical deliveries (closes #211)
All checks were successful
check / check (push) Successful in 3m8s
All checks were successful
check / check (push) Successful in 3m8s
Deleting a target soft deletes its row while its deliveries survive in the per-webhook database, so the event log kept rendering the history and lost the label: every historical row read ": delivered" and the deliveries block was headed by an empty name. loadTargetMap already loaded soft-deleted rows Unscoped for the redactor half, then discarded them before building the view half. It now builds both halves from every loaded row, and TargetView carries a Deleted flag with a DisplayName that renders "name (deleted)" — an operator debugging an old delivery needs to know the target is gone, not just what it was called. The views still come from NewTargetViews, so a deleted target's configuration is masked by exactly the code that masks a live one's. The widening is confined to this map, which feeds only DeliveryView.Target on the event log page: the source detail target list, the target edit form, the receiver and resubmit fan-out and the delivery engine each resolve targets through their own scoped queries, and the replay path keeps refusing a deleted target.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<div class="flex items-center gap-4">
|
||||
{{range .Deliveries}}
|
||||
<span class="text-xs {{if eq .Status "delivered"}}text-green-600{{else if eq .Status "failed"}}text-red-600{{else if eq .Status "retrying"}}text-yellow-600{{else}}text-gray-400{{end}}">
|
||||
{{.Target.Name}}: {{.Status}}
|
||||
{{.Target.DisplayName}}: {{.Status}}
|
||||
</span>
|
||||
{{end}}
|
||||
<span class="text-xs text-gray-400">{{.CreatedAt.Format "2006-01-02 15:04:05"}}</span>
|
||||
@@ -74,7 +74,7 @@
|
||||
<div class="py-2" x-data="{ attempts: false }">
|
||||
<div class="flex items-center justify-between cursor-pointer" @click="attempts = !attempts">
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="text-sm text-gray-700">{{.Target.Name}}</span>
|
||||
<span class="text-sm text-gray-700">{{.Target.DisplayName}}</span>
|
||||
<span class="text-xs {{if eq .Status "delivered"}}text-green-600{{else if eq .Status "failed"}}text-red-600{{else if eq .Status "retrying"}}text-yellow-600{{else}}text-gray-400{{end}}">{{.Status}}</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
|
||||
Reference in New Issue
Block a user