From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 306101FF0AA for ; Tue, 03 Nov 2026 16:23:04 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D7386218AB; Tue, 03 Nov 2026 16:23:03 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 03 Nov 2026 16:23:01 +0100 Message-Id: Subject: Re: [PATCH proxmox-widget-toolkit v7 21/41] notifications: matcher: add support for match expressions From: "Lukas Wagner" To: "Dominik Csapak" , "Lukas Wagner" , , X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261103104859.172466-1-l.wagner@proxmox.com> <20261103104859.172466-22-l.wagner@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793719381149 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.217 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: Z2OHTZZZFAYBP7KBMNSYVCKKTU7GUD6F X-Message-ID-Hash: Z2OHTZZZFAYBP7KBMNSYVCKKTU7GUD6F X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: I'll keep my reply short, I've already drafted a longer reponse but then my mail client crashed... On Tue Nov 3, 2026 at 1:57 PM CET, Dominik Csapak wrote: > hi, looks mostly good to me, a few nits and comments inline > > no blockers for me though > (maybe only consider them as follow up improvements or if > you need to send another version) I've checked with Thomas, since nothing you mentioned should affect funtionality, I'd do these style fixes as a followup. The series is quite huge and I'm already building another series on top of it, so it's simpler to apply this version (unless anything else more urgent pops up) and then go back to improve the style where you requested changes. > > In general i'm not a fan of the viewmodel to be declared and modified > in one component and the effects only applied in another > (e.g. which match field is shown) > > Nothing tragic (and i think it's pre-existing), > but the connection between components is often lost when one > does not know what to look for.... > > On 11/3/26 11:57 AM, Lukas Wagner wrote: >> This patches changes to 'matcher edit window' to support the new >> 'expression' paramter in the matcher config. Instead of of flat >> 'match-*' configuration keys, 'expression' contains the match rules as a >> serialized JSON blob. This allows us to create arbitrarily nested match >> formulas. >>=20 >> Support for match expressions has to be enabled via a feature flag. This >> avoids awkward versioned breaks between the widget toolkit package and >> the main product. >>=20 >> The entire match rule panel has changed so much that copying the old >> component and using that as a base was deemed more useful than modifying >> the existing panel in-place. The old component can be removed once we >> @@ -1013,7 +1016,7 @@ Ext.define('Proxmox.panel.MatchCalendarSettings', = { >> initComponent: function () { >> let me =3D this; >> Ext.apply(me.viewModel, { >> - parent: me.up('pmxNotificationMatchRulesEditPanel').getView= Model(), >> + parent: me.up(Proxmox.Schema.notificationMatcherPanelType()= ).getViewModel(), >> }); >> me.callParent(); >> }, >> @@ -1091,7 +1094,7 @@ Ext.define('Proxmox.panel.MatchSeveritySettings', = { >> initComponent: function () { >> let me =3D this; >> Ext.apply(me.viewModel, { >> - parent: me.up('pmxNotificationMatchRulesEditPanel').getView= Model(), >> + parent: me.up(Proxmox.Schema.notificationMatcherPanelType()= ).getViewModel(), >> }); >> me.callParent(); >> }, >> @@ -1164,7 +1167,7 @@ Ext.define('Proxmox.panel.MatchFieldSettings', { >> regexVal +=3D `(${currentData.value.join('= |')})`; >> } >> regexVal +=3D '$'; >> - newValue.push(regexVal); >> + newValue =3D regexVal; > > doesn't that change the type from array to string now? > does that have any obvious effects on the older code? This change fixed a minor bug when switching from 'exact' to 'regex' mode, it only surfaced with the new UI changes, hence I did not put it in a separate commit.=20 I don't remember the exact details about the bug, but I've reverified that everything works as expected now, with both the old and new UI enabled. > >> } >> =20 >> record.set({ >> @@ -1282,7 +1285,7 @@ Ext.define('Proxmox.panel.MatchFieldSettings', { >> }); >> =20 >> Ext.apply(me.viewModel, { >> - parent: me.up('pmxNotificationMatchRulesEditPanel').getView= Model(), >> + parent: me.up(Proxmox.Schema.notificationMatcherPanelType()= ).getViewModel(), >> }); >> Ext.apply(me, { >> items: [