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 <l.wagner@proxmox.com>
This commit is contained in:
Lukas Wagner 2023-11-14 13:59:50 +01:00 committed by Thomas Lamprecht
parent 5bd3ad4e90
commit de0cec409a

View File

@ -963,14 +963,23 @@ Ext.define('Proxmox.panel.NotificationMatchRuleSettings', {
}, },
{ {
fieldLabel: gettext('Field'), fieldLabel: gettext('Field'),
xtype: 'textfield', xtype: 'proxmoxKVComboBox',
isFormField: false, isFormField: false,
submitValue: false, submitValue: false,
allowBlank: false,
editable: true,
displayField: 'key',
bind: { bind: {
hidden: '{!typeIsMatchField}', hidden: '{!typeIsMatchField}',
disabled: '{!typeIsMatchField}', disabled: '{!typeIsMatchField}',
value: '{matchFieldField}', value: '{matchFieldField}',
}, },
// TODO: Once we have a 'notification registry', we should
// retrive those via an API call.
comboItems: [
['type', ''],
['hostname', ''],
],
}, },
{ {
fieldLabel: gettext('Value'), fieldLabel: gettext('Value'),