public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] Revert "ui: dc: remove notify key from datacenter option view"
@ 2024-02-09 10:16 Lukas Wagner
  2024-04-09 13:07 ` Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Lukas Wagner @ 2024-02-09 10:16 UTC (permalink / raw)
  To: pve-devel

This reverts commit c81bca2d28744616098448b81fa58e133d3ac5ed.

In the first iteration of the notification system, notification
routing and enabling/disabling notifications was configured via
the (extended) `notify` parameter in `datacenter.cfg`.
Because of that, the configuration UI for this parameter was moved to
a new panel as a part of the notification UI.
When changing to the newer approach for notification routing (matcher
based), the "new" panel this setting was moved to was dropped from the
UI.

Notification sending for package updates is still influenced by this
parameter (see bin/pveupdate, line 55), so there should be a way to
configure this from the GUI. At some point, the `notify` parameter
should be dropped, but that'd be a thing for a major release.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
https://forum.proxmox.com/threads/package-update-notifs-not-working.141182/

Notes:
    Alternatively, we could just *always* send package update
    notifications and just ignore that parameter from now on but this
    might leave users wondering who have previously set
    `package-updates=never`...

 www/manager6/dc/OptionView.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
index b200fd12..19884bbe 100644
--- a/www/manager6/dc/OptionView.js
+++ b/www/manager6/dc/OptionView.js
@@ -91,6 +91,26 @@ Ext.define('PVE.dc.OptionView', {
 	    vtype: 'proxmoxMail',
 	    defaultValue: 'root@$hostname',
 	});
+	me.add_inputpanel_row('notify', gettext('Notify'), {
+	    renderer: v => !v ? 'package-updates=auto' : PVE.Parser.printPropertyString(v),
+	    labelWidth: 120,
+	    url: "/api2/extjs/cluster/options",
+	    //onlineHelp: 'ha_manager_shutdown_policy',
+	    items: [{
+		xtype: 'proxmoxKVComboBox',
+		name: 'package-updates',
+		fieldLabel: gettext('Package Updates'),
+		deleteEmpty: false,
+		value: '__default__',
+		comboItems: [
+		    ['__default__', Proxmox.Utils.defaultText + ' (auto)'],
+		    ['auto', gettext('Automatically')],
+		    ['always', gettext('Always')],
+		    ['never', gettext('Never')],
+		],
+		defaultValue: '__default__',
+	    }],
+	});
 	me.add_text_row('mac_prefix', gettext('MAC address prefix'), {
 	    deleteEmpty: true,
 	    vtype: 'MacPrefix',
-- 
2.39.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-09 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 10:16 [pve-devel] [PATCH manager] Revert "ui: dc: remove notify key from datacenter option view" Lukas Wagner
2024-04-09 13:07 ` Thomas Lamprecht
2024-04-09 13:44   ` Lukas Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal