pmg-gui/js/form/MatchModeSelector.js
Dominik Csapak e3c8d4fd63 rules/objects: add mode selector dropdown
for objects and object types in rules. We add a simple dropdown for
the 'and' and 'invert' flags, to be somewhat consistent with the
notification matchers from pve and to make the wording more clear than
simple and/invert.

For What matches add a special warning hint, since that behaves a bit
special because of the mail parts.

When the mode changes for an object group, we reload the list of
objects since that holds the info about the attributes, so to avoid
having to keep track in the gui which field changed on the group, we
simply reload the list with the current information.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2024-02-22 14:54:44 +01:00

12 lines
306 B
JavaScript

Ext.define('PMG.MatchModeSelector', {
extend: 'Proxmox.form.KVComboBox',
alias: 'widget.pmgMatchModeSelector',
comboItems: [
['all', gettext('All match')],
['any', gettext('Any matches')],
['notall', gettext('At least one does not match')],
['notany', gettext('None matches')],
],
});