From de0cec409a3b2bc5da603ba59a5ce9e6ba338b9d Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Tue, 14 Nov 2023 13:59:50 +0100 Subject: [PATCH] noficiation: matcher edit: make 'field' an editable combobox For now with fixed options that are shared between most notification events - later, once we have a notification registry, this should be filled dynamically. Signed-off-by: Lukas Wagner --- src/window/NotificationMatcherEdit.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/window/NotificationMatcherEdit.js b/src/window/NotificationMatcherEdit.js index c6f0726..fb55e17 100644 --- a/src/window/NotificationMatcherEdit.js +++ b/src/window/NotificationMatcherEdit.js @@ -963,14 +963,23 @@ Ext.define('Proxmox.panel.NotificationMatchRuleSettings', { }, { fieldLabel: gettext('Field'), - xtype: 'textfield', + xtype: 'proxmoxKVComboBox', isFormField: false, submitValue: false, + allowBlank: false, + editable: true, + displayField: 'key', bind: { hidden: '{!typeIsMatchField}', disabled: '{!typeIsMatchField}', value: '{matchFieldField}', }, + // TODO: Once we have a 'notification registry', we should + // retrive those via an API call. + comboItems: [ + ['type', ''], + ['hostname', ''], + ], }, { fieldLabel: gettext('Value'),