all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api/gui/docs, proxmox-widget-toolkit] Extend rule system
@ 2023-04-07 13:42 Leo Nunner
  2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 1/8] feature: negation: add field to database Leo Nunner
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Leo Nunner @ 2023-04-07 13:42 UTC (permalink / raw)
  To: pmg-devel

This series introduces two new features for the PMG rule system: object
negation, and match groups. Negation allows the user to negate objects
inside a rule, meaning that they will evaluate to true if their
condition is NOT fulfilled.

The second feature, match groups, allows objects to be chained together.
A match group functions as a container for multiple other objects; it
will only evaluate to true if all its members evaluate to true. Match groups
are connected via logical 'or' to all other objects inside the rule;
take the following rule system:

- Rule
    - Match Group
	- Object 1
	- Object 2
    - Object 3

It will match if either (Object 1 && Object 2), or if Object 3
evaluate to true.

To properly achieve match groups inside the GUI, the rule overview was
reworked as a tree, instead of a simple list. It can now be
collapsed/expanded, and each object type (except actions) has a single
subfolder called 'Match Group'.

In combination, these features should cover quite a few use cases, and
make it possible to model more complex rule systems.

pmg-api:

Leo Nunner (8):
  feature: negation: add field to database
  feature: negation: parse negation value into objects
  feature: negation: expand/implement API endpoints
  feature: negation: implement matching logic
  feature: match groups: add field to database
  feature: match groups: parse field into objects
  feature: match groups: update API endpoints
  feature: match groups: implement matching logic

 src/PMG/API2/ObjectGroupHelpers.pm     |   6 +-
 src/PMG/API2/Rules.pm                  | 119 +++++++++++++++++++++++++
 src/PMG/DBTools.pm                     |  28 ++++++
 src/PMG/RuleCache.pm                   |  61 +++++++++++--
 src/PMG/RuleDB.pm                      |  65 +++++++++++++-
 src/PMG/RuleDB/ArchiveFilter.pm        |   6 +-
 src/PMG/RuleDB/ContentTypeFilter.pm    |   6 +-
 src/PMG/RuleDB/MatchArchiveFilename.pm |   4 +-
 src/PMG/RuleDB/MatchField.pm           |   2 +-
 src/PMG/RuleDB/MatchFilename.pm        |   2 +-
 10 files changed, 280 insertions(+), 19 deletions(-)

pmg-gui:

Leo Nunner (2):
  feature: negate objects inside rules
  feature: introduce logical 'and' for rules

 css/ext6-pmg.css |  10 ++
 js/RuleInfo.js   | 321 +++++++++++++++++++++++++++++++++++++----------
 js/Utils.js      |  14 +--
 3 files changed, 271 insertions(+), 74 deletions(-)

pmg-docs:

Leo Nunner (1):
  docs: document negation and match groups

 pmg-mail-filter.adoc | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

proxmox-widget-toolkit:

Leo Nunner (1):
  dark-mode: fix colour of default tree icons

 src/proxmox-dark/scss/other/_icons.scss | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.30.2





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

end of thread, other threads:[~2023-04-11 11:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-07 13:42 [pmg-devel] [PATCH pmg-api/gui/docs, proxmox-widget-toolkit] Extend rule system Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 1/8] feature: negation: add field to database Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 2/8] feature: negation: parse negation value into objects Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 3/8] feature: negation: expand/implement API endpoints Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 4/8] feature: negation: implement matching logic Leo Nunner
2023-04-11  7:35   ` Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 5/8] feature: match groups: add field to database Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 6/8] feature: match groups: parse field into objects Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 7/8] feature: match groups: update API endpoints Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-api 8/8] feature: match groups: implement matching logic Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-gui 1/2] feature: negate objects inside rules Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-gui 2/2] feature: introduce logical 'and' for rules Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH pmg-docs] docs: document negation and match groups Leo Nunner
2023-04-07 13:42 ` [pmg-devel] [PATCH widget-toolkit] dark-mode: fix colour of default tree icons Leo Nunner
2023-04-11  9:52 ` [pmg-devel] [PATCH pmg-api/gui/docs, proxmox-widget-toolkit] Extend rule system Thomas Lamprecht
2023-04-11 11:04   ` Leo Nunner
2023-04-11 11:19     ` Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal