mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-14 05:30:55 +00:00
docs: simplify Mermaid diagrams for better readability
The previous diagrams were too complex and overwhelming. Simplified all diagrams to show core concepts clearly: - Adaptive polling: reduced to basic scheduler→queue→workers flow - Temperature proxy: simplified to 3-box trust boundary view - Sensor proxy sequence: simplified to essential request flow - Webhook pipeline: reduced to template→send→retry flow - Script library: simplified to code→test→bundle→dist flow Fixed parsing error in temperature proxy diagram (parentheses in edge label causing render failure). Diagrams should clarify architecture, not recreate implementation.
This commit is contained in:
parent
7bfd6997ec
commit
2f43d67af9
5 changed files with 43 additions and 144 deletions
|
|
@ -114,31 +114,15 @@ For webhooks that require authentication or custom headers:
|
|||
## Custom Payload Templates
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
AlertEvent["Alert Event Triggered"]
|
||||
GatherData["Gather Alert Data\n(Level, Type, Resource, Node, etc.)"]
|
||||
ResolveURL["Resolve URL Template\n({{urlpath}}, {{urlquery}}"]
|
||||
ResolvePayload["Resolve Payload Template\n(variable substitution)"]
|
||||
ApplyFunctions["Apply Template Functions\n(title, upper, lower, printf)"]
|
||||
Dispatch["HTTP POST Request"]
|
||||
CheckResponse{"Response\nStatus?"}
|
||||
Success["200-299: Success\nLog delivery"]
|
||||
Retry["429/5xx: Retry\n(exponential backoff)"]
|
||||
Failure["4xx: Failure\nLog error"]
|
||||
TrackDelivery["Update Delivery Metrics\npulse_webhook_deliveries_total"]
|
||||
flowchart LR
|
||||
Alert[Alert Triggered]
|
||||
Template[Render Template<br/>Variables & Functions]
|
||||
Send[HTTP POST]
|
||||
|
||||
AlertEvent --> GatherData
|
||||
GatherData --> ResolveURL
|
||||
ResolveURL --> ResolvePayload
|
||||
ResolvePayload --> ApplyFunctions
|
||||
ApplyFunctions --> Dispatch
|
||||
Dispatch --> CheckResponse
|
||||
CheckResponse -->|Success| Success
|
||||
CheckResponse -->|Transient Error| Retry
|
||||
CheckResponse -->|Permanent Error| Failure
|
||||
Success --> TrackDelivery
|
||||
Retry --> TrackDelivery
|
||||
Failure --> TrackDelivery
|
||||
Alert --> Template
|
||||
Template --> Send
|
||||
Send -->|2xx| Success[Delivered]
|
||||
Send -->|5xx| Retry[Retry with Backoff]
|
||||
```
|
||||
|
||||
For generic webhooks, you can define custom JSON payloads using Go template syntax.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue