Event log: show attempt and delivery times, label replays, zone event times (closes #386)
check / check (push) Successful in 3m19s
check / check (push) Successful in 3m19s
Each attempt shows when it was recorded and each delivery when it was created, in the event log and on the event's page. The event log's event times read as the recent events list does: how long ago, with the full UTC time on hover. A delivery records whether Replay created it, in a new replay column added to the delivery model in place. Such a delivery is labelled a replay in the event's summary line and in both pages' delivery lists. Model: opus-5-5
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
@@ -95,6 +96,14 @@ type DeliveryView struct {
|
||||
Status database.DeliveryStatus
|
||||
Target delivery.TargetView
|
||||
|
||||
// Replay is set on a delivery the Replay action created.
|
||||
Replay bool
|
||||
|
||||
// Created is how long ago the delivery was created, and
|
||||
// CreatedUTC the full timestamp the page shows on hover.
|
||||
Created string
|
||||
CreatedUTC string
|
||||
|
||||
// Results is this delivery's attempts in attempt order,
|
||||
// bounded by maxRenderedAttempts. Without them a failure
|
||||
// renders as the status word alone and says nothing about
|
||||
@@ -1430,6 +1439,7 @@ func (h *Handlers) newDeliveryViews(
|
||||
for i := range deliveries {
|
||||
target := targetMap[deliveries[i].TargetID]
|
||||
rows := attempts[deliveries[i].ID]
|
||||
created := deliveries[i].CreatedAt
|
||||
|
||||
results, omitted := renderedAttempts(
|
||||
rows, target.Redactor,
|
||||
@@ -1439,6 +1449,9 @@ func (h *Handlers) newDeliveryViews(
|
||||
ID: deliveries[i].ID,
|
||||
Status: deliveries[i].Status,
|
||||
Target: target.View,
|
||||
Replay: deliveries[i].Replay,
|
||||
Created: humanize.Time(created),
|
||||
CreatedUTC: created.UTC().Format(time.DateTime) + " UTC",
|
||||
Results: results,
|
||||
AttemptCount: len(rows),
|
||||
AttemptsOmitted: omitted,
|
||||
|
||||
Reference in New Issue
Block a user