mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-05-21 20:29:07 +00:00
server: sync email notification: adapt template for local sync jobs
Add a guard clause that checks `job.remote`, otherwise the template fails to render to to handlebars being configured in strict mode. Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
parent
ca8cf67187
commit
6ef0238f99
@ -90,11 +90,14 @@ Please visit the web interface for further details:
|
||||
|
||||
const SYNC_OK_TEMPLATE: &str = r###"
|
||||
|
||||
Job ID: {{job.id}}
|
||||
Datastore: {{job.store}}
|
||||
Remote: {{job.remote}}
|
||||
Remote Store: {{job.remote-store}}
|
||||
|
||||
Job ID: {{job.id}}
|
||||
Datastore: {{job.store}}
|
||||
{{#if job.remote~}}
|
||||
Remote: {{job.remote}}
|
||||
Remote Store: {{job.remote-store}}
|
||||
{{else~}}
|
||||
Local Source Store: {{job.remote-store}}
|
||||
{{/if}}
|
||||
Synchronization successful.
|
||||
|
||||
|
||||
@ -106,11 +109,14 @@ Please visit the web interface for further details:
|
||||
|
||||
const SYNC_ERR_TEMPLATE: &str = r###"
|
||||
|
||||
Job ID: {{job.id}}
|
||||
Datastore: {{job.store}}
|
||||
Remote: {{job.remote}}
|
||||
Remote Store: {{job.remote-store}}
|
||||
|
||||
Job ID: {{job.id}}
|
||||
Datastore: {{job.store}}
|
||||
{{#if job.remote~}}
|
||||
Remote: {{job.remote}}
|
||||
Remote Store: {{job.remote-store}}
|
||||
{{else~}}
|
||||
Local Source Store: {{job.remote-store}}
|
||||
{{/if}}
|
||||
Synchronization failed: {{error}}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user