docs: refactor notifications to use tabs
This commit is contained in:
parent
ff9decb54b
commit
c5e35cf8b1
1 changed files with 151 additions and 134 deletions
|
|
@ -77,185 +77,201 @@ Each assignment is independent. One schedule can send failures to Email, warning
|
||||||
|
|
||||||
## Type reference
|
## Type reference
|
||||||
|
|
||||||
### Email (SMTP)
|
<Tabs
|
||||||
|
items={[
|
||||||
|
"Email (SMTP)",
|
||||||
|
"Slack",
|
||||||
|
"Discord",
|
||||||
|
"Gotify",
|
||||||
|
"ntfy",
|
||||||
|
"Pushover",
|
||||||
|
"Telegram",
|
||||||
|
"Generic Webhook",
|
||||||
|
"Custom",
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Tab value="Email (SMTP)">
|
||||||
|
Use Email when you want alerts to go to people, shared mailboxes, or downstream systems that already process email.
|
||||||
|
|
||||||
Use Email when you want alerts to go to people, shared mailboxes, or downstream systems that already process email.
|
**Fields**
|
||||||
|
|
||||||
**Fields**
|
- `SMTP Host`
|
||||||
|
- `SMTP Port`
|
||||||
|
- `Username` and `Password` (optional)
|
||||||
|
- `From Address`
|
||||||
|
- `From Name` (optional)
|
||||||
|
- `To Addresses`
|
||||||
|
- `Use TLS`
|
||||||
|
|
||||||
- `SMTP Host`
|
**Notes**
|
||||||
- `SMTP Port`
|
|
||||||
- `Username` and `Password` (optional)
|
|
||||||
- `From Address`
|
|
||||||
- `From Name` (optional)
|
|
||||||
- `To Addresses`
|
|
||||||
- `Use TLS`
|
|
||||||
|
|
||||||
**Notes**
|
- `To Addresses` is a comma-separated list in the UI.
|
||||||
|
- TLS is a simple yes or no toggle.
|
||||||
|
- SMTP authentication is optional because some relays accept trusted network senders.
|
||||||
|
|
||||||
- `To Addresses` is a comma-separated list in the UI.
|
**Example**
|
||||||
- TLS is a simple yes or no toggle.
|
|
||||||
- SMTP authentication is optional because some relays accept trusted network senders.
|
|
||||||
|
|
||||||
**Example**
|
```text
|
||||||
|
Type: Email (SMTP)
|
||||||
|
SMTP Host: smtp.example.com
|
||||||
|
SMTP Port: 587
|
||||||
|
Username: alerts@example.com
|
||||||
|
Password: <smtp-password>
|
||||||
|
From Address: alerts@example.com
|
||||||
|
From Name: Zerobyte Alerts
|
||||||
|
To Addresses: ops@example.com, backups@example.com
|
||||||
|
Use TLS: On
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
|
||||||
```text
|
<Tab value="Slack">
|
||||||
Type: Email (SMTP)
|
Use Slack for shared operational visibility in a team channel.
|
||||||
SMTP Host: smtp.example.com
|
|
||||||
SMTP Port: 587
|
|
||||||
Username: alerts@example.com
|
|
||||||
Password: <smtp-password>
|
|
||||||
From Address: alerts@example.com
|
|
||||||
From Name: Zerobyte Alerts
|
|
||||||
To Addresses: ops@example.com, backups@example.com
|
|
||||||
Use TLS: On
|
|
||||||
```
|
|
||||||
|
|
||||||
### Slack
|
**Fields**
|
||||||
|
|
||||||
Use Slack for shared operational visibility in a team channel.
|
- `Webhook URL`
|
||||||
|
- `Bot Username` (optional)
|
||||||
|
- `Icon Emoji` (optional)
|
||||||
|
|
||||||
**Fields**
|
**Example**
|
||||||
|
|
||||||
- `Webhook URL`
|
```text
|
||||||
- `Bot Username` (optional)
|
Type: Slack
|
||||||
- `Icon Emoji` (optional)
|
Webhook URL: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXX
|
||||||
|
Bot Username: Zerobyte
|
||||||
|
Icon Emoji: :floppy_disk:
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
|
||||||
**Example**
|
<Tab value="Discord">
|
||||||
|
Use Discord when your team lives in a server channel, or when you want to post to a specific thread.
|
||||||
|
|
||||||
```text
|
**Fields**
|
||||||
Type: Slack
|
|
||||||
Webhook URL: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXX
|
|
||||||
Bot Username: Zerobyte
|
|
||||||
Icon Emoji: :floppy_disk:
|
|
||||||
```
|
|
||||||
|
|
||||||
### Discord
|
- `Webhook URL`
|
||||||
|
- `Bot Username` (optional)
|
||||||
|
- `Avatar URL` (optional)
|
||||||
|
- `Thread ID` (optional)
|
||||||
|
</Tab>
|
||||||
|
|
||||||
Use Discord when your team lives in a server channel, or when you want to post to a specific thread.
|
<Tab value="Gotify">
|
||||||
|
Use Gotify when you want self-hosted push with explicit priority control.
|
||||||
|
|
||||||
**Fields**
|
**Fields**
|
||||||
|
|
||||||
- `Webhook URL`
|
- `Server URL`
|
||||||
- `Bot Username` (optional)
|
- `App Token`
|
||||||
- `Avatar URL` (optional)
|
- `Priority` from `0` to `10`
|
||||||
- `Thread ID` (optional)
|
- `Path` (optional)
|
||||||
|
</Tab>
|
||||||
|
|
||||||
### Gotify
|
<Tab value="ntfy">
|
||||||
|
Use ntfy when you want a simple topic-based push service, either on `ntfy.sh` or your own server.
|
||||||
|
|
||||||
Use Gotify when you want self-hosted push with explicit priority control.
|
**Fields**
|
||||||
|
|
||||||
**Fields**
|
- `Server URL` (optional, leave empty for `ntfy.sh`)
|
||||||
|
- `Topic`
|
||||||
|
- `Username` and `Password` (optional)
|
||||||
|
- `Access token` (optional)
|
||||||
|
- `Priority`
|
||||||
|
|
||||||
- `Server URL`
|
**Notes**
|
||||||
- `App Token`
|
|
||||||
- `Priority` from `0` to `10`
|
|
||||||
- `Path` (optional)
|
|
||||||
|
|
||||||
### ntfy
|
- If you set an access token, it takes precedence over username and password.
|
||||||
|
- Priority values are `max`, `high`, `default`, `low`, and `min`.
|
||||||
|
|
||||||
Use ntfy when you want a simple topic-based push service, either on `ntfy.sh` or your own server.
|
**Example**
|
||||||
|
|
||||||
**Fields**
|
```text
|
||||||
|
Type: Ntfy
|
||||||
|
Server URL: https://ntfy.example.com
|
||||||
|
Topic: zerobyte-backups
|
||||||
|
Access token: <token>
|
||||||
|
Priority: high
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
|
||||||
- `Server URL` (optional, leave empty for `ntfy.sh`)
|
<Tab value="Pushover">
|
||||||
- `Topic`
|
Use Pushover for direct, personal push notifications.
|
||||||
- `Username` and `Password` (optional)
|
|
||||||
- `Access token` (optional)
|
|
||||||
- `Priority`
|
|
||||||
|
|
||||||
**Notes**
|
**Fields**
|
||||||
|
|
||||||
- If you set an access token, it takes precedence over username and password.
|
- `User Key`
|
||||||
- Priority values are `max`, `high`, `default`, `low`, and `min`.
|
- `API Token`
|
||||||
|
- `Devices` (optional)
|
||||||
|
- `Priority` as `-1`, `0`, or `1`
|
||||||
|
</Tab>
|
||||||
|
|
||||||
**Example**
|
<Tab value="Telegram">
|
||||||
|
Use Telegram when you want notifications in a bot chat or a group topic.
|
||||||
|
|
||||||
```text
|
**Fields**
|
||||||
Type: Ntfy
|
|
||||||
Server URL: https://ntfy.example.com
|
|
||||||
Topic: zerobyte-backups
|
|
||||||
Access token: <token>
|
|
||||||
Priority: high
|
|
||||||
```
|
|
||||||
|
|
||||||
### Pushover
|
- `Bot Token`
|
||||||
|
- `Chat ID`
|
||||||
|
- `Thread ID` (optional)
|
||||||
|
|
||||||
Use Pushover for direct, personal push notifications.
|
**Example**
|
||||||
|
|
||||||
**Fields**
|
```text
|
||||||
|
Type: Telegram
|
||||||
|
Bot Token: 123456789:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
|
||||||
|
Chat ID: -1231234567890
|
||||||
|
Thread ID: 3
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
|
||||||
- `User Key`
|
<Tab value="Generic Webhook">
|
||||||
- `API Token`
|
Use Generic Webhook when another service expects a normal HTTP request instead of a provider-specific webhook format.
|
||||||
- `Devices` (optional)
|
|
||||||
- `Priority` as `-1`, `0`, or `1`
|
|
||||||
|
|
||||||
### Telegram
|
**Fields**
|
||||||
|
|
||||||
Use Telegram when you want notifications in a bot chat or a group topic.
|
- `Webhook URL`
|
||||||
|
- `Method` as `GET` or `POST`
|
||||||
|
- `Content Type`
|
||||||
|
- `Headers`
|
||||||
|
- `Use JSON Template`
|
||||||
|
- `Title Key` and `Message Key` when JSON mode is enabled
|
||||||
|
|
||||||
**Fields**
|
**Notes**
|
||||||
|
|
||||||
- `Bot Token`
|
- Headers are entered one per line as `Key: Value`.
|
||||||
- `Chat ID`
|
- With JSON mode enabled, Zerobyte sends a body shaped like `{titleKey: "...", messageKey: "..."}`.
|
||||||
- `Thread ID` (optional)
|
- With JSON mode disabled, the request body is plain notification text.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Type: Telegram
|
Type: Generic Webhook
|
||||||
Bot Token: 123456789:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
|
Webhook URL: https://hooks.example.com/backup-events
|
||||||
Chat ID: -1231234567890
|
Method: POST
|
||||||
Thread ID: 3
|
Content Type: application/json
|
||||||
```
|
Headers:
|
||||||
|
Authorization: Bearer <token>
|
||||||
|
X-Source: zerobyte
|
||||||
|
Use JSON Template: On
|
||||||
|
Title Key: title
|
||||||
|
Message Key: message
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
|
||||||
### Generic Webhook
|
<Tab value="Custom">
|
||||||
|
Use Custom when you already know the exact Shoutrrr URL you want Zerobyte to use.
|
||||||
|
|
||||||
Use Generic Webhook when another service expects a normal HTTP request instead of a provider-specific webhook format.
|
See the [Shoutrrr documentation](https://shoutrrr.nickfedor.com/services/overview) for the supported URL formats and service-specific options.
|
||||||
|
|
||||||
**Fields**
|
**Fields**
|
||||||
|
|
||||||
- `Webhook URL`
|
- `Shoutrrr URL`
|
||||||
- `Method` as `GET` or `POST`
|
|
||||||
- `Content Type`
|
|
||||||
- `Headers`
|
|
||||||
- `Use JSON Template`
|
|
||||||
- `Title Key` and `Message Key` when JSON mode is enabled
|
|
||||||
|
|
||||||
**Notes**
|
**Example**
|
||||||
|
|
||||||
- Headers are entered one per line as `Key: Value`.
|
```text
|
||||||
- With JSON mode enabled, Zerobyte sends a body shaped like `{titleKey: "...", messageKey: "..."}`.
|
slack://hook:T000-B000-XXX@webhook?username=Zerobyte
|
||||||
- With JSON mode disabled, the request body is plain notification text.
|
```
|
||||||
|
</Tab>
|
||||||
**Example**
|
</Tabs>
|
||||||
|
|
||||||
```text
|
|
||||||
Type: Generic Webhook
|
|
||||||
Webhook URL: https://hooks.example.com/backup-events
|
|
||||||
Method: POST
|
|
||||||
Content Type: application/json
|
|
||||||
Headers:
|
|
||||||
Authorization: Bearer <token>
|
|
||||||
X-Source: zerobyte
|
|
||||||
Use JSON Template: On
|
|
||||||
Title Key: title
|
|
||||||
Message Key: message
|
|
||||||
```
|
|
||||||
|
|
||||||
### Custom (Shoutrrr URL)
|
|
||||||
|
|
||||||
Use Custom when you already know the exact Shoutrrr URL you want Zerobyte to use.
|
|
||||||
|
|
||||||
**Fields**
|
|
||||||
|
|
||||||
- `Shoutrrr URL`
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```text
|
|
||||||
slack://hook:T000-B000-XXX@webhook?username=Zerobyte
|
|
||||||
```
|
|
||||||
|
|
||||||
## Practical routing patterns
|
## Practical routing patterns
|
||||||
|
|
||||||
|
|
@ -273,3 +289,4 @@ slack://hook:T000-B000-XXX@webhook?username=Zerobyte
|
||||||
- [Repository maintenance and status](/docs/guides/repository-maintenance)
|
- [Repository maintenance and status](/docs/guides/repository-maintenance)
|
||||||
|
|
||||||
import { Callout } from "fumadocs-ui/components/callout";
|
import { Callout } from "fumadocs-ui/components/callout";
|
||||||
|
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue