ui: util: override default mail author for sendmail/smtp targets

Otherwise, 'Proxmox VE' is shown as the default author in the UI.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Lukas Wagner 2024-04-23 13:52:28 +02:00 committed by Thomas Lamprecht
parent 37e8ba56cd
commit a52f2819e7

View File

@ -461,6 +461,28 @@ Ext.define('PBS.Utils', {
sync: false,
},
});
// TODO: use `overrideEndpointTypes` later - not done right now to avoid
// breakage if widget-toolkit is not updated yet.
Proxmox.Schema.notificationEndpointTypes = {
sendmail: {
name: 'Sendmail',
ipanel: 'pmxSendmailEditPanel',
iconCls: 'fa-envelope-o',
defaultMailAuthor: 'Proxmox Backup Server ($hostname)',
},
smtp: {
name: 'SMTP',
ipanel: 'pmxSmtpEditPanel',
iconCls: 'fa-envelope-o',
defaultMailAuthor: 'Proxmox Backup Server ($hostname)',
},
gotify: {
name: 'Gotify',
ipanel: 'pmxGotifyEditPanel',
iconCls: 'fa-bell-o',
},
};
},
// Convert an ArrayBuffer to a base64url encoded string.