41 lines
1.1 KiB
Cheetah
41 lines
1.1 KiB
Cheetah
{{/*
|
|
Docker Backup Notification Template
|
|
Variables expected:
|
|
- .title: The backup title/name
|
|
- .asset: The asset being backed up
|
|
- .backupsizeinmb: The backup size in MB (will be formatted automatically)
|
|
- .extra: Optional array of additional fields with .name and .value
|
|
|
|
Template Functions Available:
|
|
- formatSize: Formats size in MB/GiB automatically
|
|
*/}}
|
|
{
|
|
"embeds": [
|
|
{
|
|
"title": "📦 Docker Backup - {{.title}}",
|
|
"description": "**{{.asset}}** has been backup-ed successfully! ✅🫡\n",
|
|
"color": 3066993,
|
|
"fields": [
|
|
{
|
|
"name": "💾 Backup Size",
|
|
"value": "{{if .backupsizeinmb}}{{formatSize .backupsizeinmb}}{{else}}Unknown{{end}}",
|
|
"inline": true
|
|
}
|
|
{{- if .extra}}
|
|
{{- range $index, $field := .extra}},
|
|
{
|
|
"name": "{{$field.name}}",
|
|
"value": "{{$field.value}}",
|
|
"inline": true
|
|
}
|
|
{{- end}}
|
|
{{- end}}
|
|
],
|
|
"footer": {
|
|
"text": "✨ Haven Notify ✨"
|
|
}{{if .timestamp}},
|
|
"timestamp": "{{formatTime .timestamp}}"{{end}}
|
|
}
|
|
]
|
|
}
|