Add webhooks to the UI - #3320
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Eliza Weisman <eliza@elizas.website>
hawkw
left a comment
There was a problem hiding this comment.
I like the UI, it looks great! Let's try to keep the language consistent with the terminology we use in the documentation, API, and the CLI.
In particular, we should always say "alert" and "alert class" rather than "event" or "event class". In the API and public documentation, the term "event" is only used in the abstract (i.e. "Alerts provide a notification when an event has occurred in the system"); it's not the name of an object in the API. I think the only place where we refer to them as "events" is in RFD 538, which...should really be updated to reflect the terminology used in the product. My bad.
Also, I'd generally prefer to always refer to an endpoint that receives webhooks for alerts as a "webhook receiver", not a "webhook". Elsewhere, I've seen the term "webhook" used to refer to both the request itself and the thing that receives that request, which I think is a bit confusing, so I'd rather we use the terminology consistently.
Sorry for being persnickety about names, the UI looks awesome!
| // The delivery request format is defined by RFD 538 and built in | ||
| // https://github.com/oxidecomputer/omicron/blob/32615a35/nexus/src/app/webhook.rs#L395-L555 | ||
| // The API does not return the request that was sent, so we reconstruct it from | ||
| // the delivery record. Alert data, the alert version, and the signature can't | ||
| // be known from here, so they show up as angle-bracket placeholders. | ||
| const payloadJson = (delivery: AlertDelivery, sentAt: string) => `{ |
There was a problem hiding this comment.
We could, perhaps, just fetch the alert by ID using the alert_view API endpoint that was added in oxidecomputer/omicron#11072
Co-authored-by: Eliza Weisman <eliza@elizas.website>
Co-authored-by: Eliza Weisman <eliza@elizas.website>
Co-authored-by: Eliza Weisman <eliza@elizas.website>
Co-authored-by: Eliza Weisman <eliza@elizas.website>
Co-authored-by: Eliza Weisman <eliza@elizas.website>
Co-authored-by: Eliza Weisman <eliza@elizas.website>
Co-authored-by: Eliza Weisman <eliza@elizas.website>
Co-authored-by: Eliza Weisman <eliza@elizas.website>
Co-authored-by: Eliza Weisman <eliza@elizas.website>
DRAFT. Still pulling this together, but wanted to make it easier to look at in GitHub.