From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 285ED1FF16F for ; Tue, 5 Aug 2025 15:34:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E57041564E; Tue, 5 Aug 2025 15:36:05 +0200 (CEST) From: Lukas Wagner To: pbs-devel@lists.proxmox.com Date: Tue, 5 Aug 2025 15:35:54 +0200 Message-ID: <20250805133555.257076-2-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250805133555.257076-1-l.wagner@proxmox.com> References: <20250805133555.257076-1-l.wagner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754400942277 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup 1/2] notifications: templates: adapt to whitespace handling changes with new handlebars version X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Handlebars 4.1 changed how whitespace is trimmed when using the `~` operator in helpers/variables in order to be closer to the canonical JavaScript handlebars implementation. These changed impacted how some of our notification templates were rendered. This commit aims to restore the initial appearance. [1] https://github.com/sunng87/handlebars-rust Signed-off-by: Lukas Wagner --- templates/default/package-updates-body.txt.hbs | 2 +- templates/default/sync-err-body.txt.hbs | 1 + templates/default/sync-ok-body.txt.hbs | 1 + templates/default/tape-backup-err-body.txt.hbs | 17 ++++++++++------- templates/default/tape-backup-ok-body.txt.hbs | 16 +++++++++------- templates/default/verify-err-body.txt.hbs | 2 +- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/templates/default/package-updates-body.txt.hbs b/templates/default/package-updates-body.txt.hbs index cf69ae694..9800ab5ca 100644 --- a/templates/default/package-updates-body.txt.hbs +++ b/templates/default/package-updates-body.txt.hbs @@ -1,6 +1,6 @@ Proxmox Backup Server has the following updates available: {{#each available-updates}} - {{this.package-name}}: {{this.installed-version}} -> {{this.available-version~}} + {{this.package-name}}: {{this.installed-version}} -> {{this.available-version}} {{/each}} To upgrade visit the web interface: diff --git a/templates/default/sync-err-body.txt.hbs b/templates/default/sync-err-body.txt.hbs index d47a5d6c8..85b829976 100644 --- a/templates/default/sync-err-body.txt.hbs +++ b/templates/default/sync-err-body.txt.hbs @@ -6,6 +6,7 @@ Remote Store: {{remote-datastore}} {{else~}} Local Source Store: {{remote-datastore}} {{/if}} + Synchronization failed: {{error}} diff --git a/templates/default/sync-ok-body.txt.hbs b/templates/default/sync-ok-body.txt.hbs index 6ef5993de..aba8c9961 100644 --- a/templates/default/sync-ok-body.txt.hbs +++ b/templates/default/sync-ok-body.txt.hbs @@ -6,6 +6,7 @@ Remote Store: {{remote-datastore}} {{else~}} Local Source Store: {{remote-datastore}} {{/if}} + Synchronization successful. diff --git a/templates/default/tape-backup-err-body.txt.hbs b/templates/default/tape-backup-err-body.txt.hbs index 387b2438a..7e6203db7 100644 --- a/templates/default/tape-backup-err-body.txt.hbs +++ b/templates/default/tape-backup-err-body.txt.hbs @@ -5,18 +5,21 @@ Datastore: {{datastore}} Tape Pool: {{tape-pool}} Tape Drive: {{tape-drive}} -{{#if snapshot-list~}} +{{#if snapshot-list}} Snapshots included: +{{#each snapshot-list}} + {{this}} +{{/each}} -{{#each snapshot-list~}} -{{this}} -{{/each~}} {{/if}} +Duration: {{duration job-duration}} + {{#if used-tapes-list}} Used Tapes: -{{#each used-tapes-list~}} -{{this}} -{{/each~}} +{{#each used-tapes-list}} + {{this}} +{{/each}} + {{/if}} Tape Backup failed: {{error}} diff --git a/templates/default/tape-backup-ok-body.txt.hbs b/templates/default/tape-backup-ok-body.txt.hbs index 33364142a..6c03e49d4 100644 --- a/templates/default/tape-backup-ok-body.txt.hbs +++ b/templates/default/tape-backup-ok-body.txt.hbs @@ -5,19 +5,21 @@ Datastore: {{datastore}} Tape Pool: {{tape-pool}} Tape Drive: {{tape-drive}} -{{#if snapshot-list~}} +{{#if snapshot-list}} Snapshots included: +{{#each snapshot-list}} + {{this}} +{{/each}} -{{#each snapshot-list~}} -{{this}} -{{/each~}} {{/if}} Duration: {{duration job-duration}} + {{#if used-tapes-list}} Used Tapes: -{{#each used-tapes-list~}} -{{this}} -{{/each~}} +{{#each used-tapes-list}} + {{this}} +{{/each}} + {{/if}} Tape Backup successful. diff --git a/templates/default/verify-err-body.txt.hbs b/templates/default/verify-err-body.txt.hbs index 96922eee1..1eb63206a 100644 --- a/templates/default/verify-err-body.txt.hbs +++ b/templates/default/verify-err-body.txt.hbs @@ -5,7 +5,7 @@ Datastore: {{datastore}} Verification failed on these snapshots/groups: {{#each failed-snapshot-list}} - {{this~}} + {{this}} {{/each}} -- 2.47.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel