notification ui: unprotected mailto-root target

A default notification config will now be created in pve-manager's
postinst hook - which is not magic in any way and can be modified
and deleted as desired.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
Lukas Wagner 2023-11-14 13:59:49 +01:00 committed by Thomas Lamprecht
parent 03a54ebd29
commit 5bd3ad4e90

View File

@ -41,10 +41,6 @@ Ext.define('Proxmox.panel.NotificationEndpointView', {
openEditWindow: function(endpointType, endpoint) { openEditWindow: function(endpointType, endpoint) {
let me = this; let me = this;
if (endpoint === 'mail-to-root') {
return;
}
Ext.create('Proxmox.window.EndpointEditBase', { Ext.create('Proxmox.window.EndpointEditBase', {
baseUrl: me.getView().baseUrl, baseUrl: me.getView().baseUrl,
type: endpointType, type: endpointType,
@ -183,13 +179,11 @@ Ext.define('Proxmox.panel.NotificationEndpointView', {
xtype: 'proxmoxButton', xtype: 'proxmoxButton',
text: gettext('Modify'), text: gettext('Modify'),
handler: 'openEditForSelectedItem', handler: 'openEditForSelectedItem',
enableFn: rec => rec.data.name !== 'mail-to-root',
disabled: true, disabled: true,
}, },
{ {
xtype: 'proxmoxStdRemoveButton', xtype: 'proxmoxStdRemoveButton',
callback: 'reload', callback: 'reload',
enableFn: rec => rec.data.name !== 'mail-to-root',
getUrl: function(rec) { getUrl: function(rec) {
return `${me.baseUrl}/endpoints/${rec.data.type}/${rec.getId()}`; return `${me.baseUrl}/endpoints/${rec.data.type}/${rec.getId()}`;
}, },