Added tag in report e-mail
This commit is contained in:
parent
4095d6dcf6
commit
5e3831a1a4
@ -120,6 +120,7 @@ class BackupReportsXoPlugin {
|
|||||||
const start = moment(status.start)
|
const start = moment(status.start)
|
||||||
const end = moment(status.end)
|
const end = moment(status.end)
|
||||||
const duration = moment.duration(end - start).humanize()
|
const duration = moment.duration(end - start).humanize()
|
||||||
|
const tag = status.calls[status.start].params.tag
|
||||||
|
|
||||||
if (reportWhen === 'fail' && globalStatus === 'Success') {
|
if (reportWhen === 'fail' && globalStatus === 'Success') {
|
||||||
return
|
return
|
||||||
@ -127,7 +128,7 @@ class BackupReportsXoPlugin {
|
|||||||
|
|
||||||
// Global status.
|
// Global status.
|
||||||
text.unshift([
|
text.unshift([
|
||||||
`## Global status: ${globalStatus}`,
|
`## Global status for "${tag}": ${globalStatus}`,
|
||||||
` - Start time: ${String(start)}`,
|
` - Start time: ${String(start)}`,
|
||||||
` - End time: ${String(end)}`,
|
` - End time: ${String(end)}`,
|
||||||
` - Duration: ${duration}`,
|
` - Duration: ${duration}`,
|
||||||
@ -142,7 +143,7 @@ class BackupReportsXoPlugin {
|
|||||||
if (this._xo.sendEmail) {
|
if (this._xo.sendEmail) {
|
||||||
await this._xo.sendEmail({
|
await this._xo.sendEmail({
|
||||||
to: this._mailsReceivers,
|
to: this._mailsReceivers,
|
||||||
subject: 'Backup Reports (XenOrchestra)',
|
subject: `Backup Reports for "${tag}" (XenOrchestra)`,
|
||||||
markdown
|
markdown
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user