feat(admin): outbound queue page
- Add queue totals, delivery table with errors and next attempt - Refresh on demand and every 5 seconds - Add confirmed discard of a stuck delivery - Link the page from the header
This commit is contained in:
parent
98bbcf6b68
commit
f3c75dc97d
1 changed files with 341 additions and 5 deletions
|
|
@ -35,6 +35,15 @@ components:
|
|||
date: {type: string, format: date-time}
|
||||
size: {type: integer}
|
||||
body: {type: string, description: Only when reading a single message}
|
||||
QueueItem:
|
||||
type: object
|
||||
properties:
|
||||
id: {type: integer}
|
||||
recipient: {type: string}
|
||||
attempts: {type: integer, description: Failed attempts so far}
|
||||
last_error: {type: string}
|
||||
next_attempt: {type: string, format: date-time}
|
||||
created_at: {type: string, format: date-time}
|
||||
Member:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -243,3 +252,26 @@ paths:
|
|||
responses:
|
||||
'204': {description: Deleted}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
/queue:
|
||||
get:
|
||||
summary: Outbound queue totals and up to 100 deliveries (failing ones first)
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
pending: {type: integer}
|
||||
retrying: {type: integer, description: Deliveries that failed at least once}
|
||||
oldest: {type: string, format: date-time, nullable: true}
|
||||
items: {type: array, items: {$ref: '#/components/schemas/QueueItem'}}
|
||||
/queue/{id}:
|
||||
parameters:
|
||||
- {name: id, in: path, required: true, schema: {type: integer}}
|
||||
delete:
|
||||
summary: Discard a queued delivery
|
||||
responses:
|
||||
'204': {description: Discarded}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue