From 5e3831a1a4265c32458aef7638f5065e65cf8df0 Mon Sep 17 00:00:00 2001 From: Pierre Date: Thu, 17 Mar 2016 12:11:49 +0100 Subject: [PATCH] Added tag in report e-mail --- packages/xo-server-backup-reports/src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/xo-server-backup-reports/src/index.js b/packages/xo-server-backup-reports/src/index.js index 4bd4aa29e..99644f73c 100644 --- a/packages/xo-server-backup-reports/src/index.js +++ b/packages/xo-server-backup-reports/src/index.js @@ -120,6 +120,7 @@ class BackupReportsXoPlugin { const start = moment(status.start) const end = moment(status.end) const duration = moment.duration(end - start).humanize() + const tag = status.calls[status.start].params.tag if (reportWhen === 'fail' && globalStatus === 'Success') { return @@ -127,7 +128,7 @@ class BackupReportsXoPlugin { // Global status. text.unshift([ - `## Global status: ${globalStatus}`, + `## Global status for "${tag}": ${globalStatus}`, ` - Start time: ${String(start)}`, ` - End time: ${String(end)}`, ` - Duration: ${duration}`, @@ -142,7 +143,7 @@ class BackupReportsXoPlugin { if (this._xo.sendEmail) { await this._xo.sendEmail({ to: this._mailsReceivers, - subject: 'Backup Reports (XenOrchestra)', + subject: `Backup Reports for "${tag}" (XenOrchestra)`, markdown }) }