public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH widget-toolkit] notification matcher: fix inverted match modes
@ 2023-11-20 14:53 Fiona Ebner
  2023-11-20 15:05 ` Dominik Csapak
  2023-11-20 15:18 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2023-11-20 14:53 UTC (permalink / raw)
  To: pve-devel

The 'not' prefix is already stripped in the set() method of the view
model's 'rootMode' and not present anymore when updating the store.
The information about whether the mode is inverted or not is present
in the 'invert' data member.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/window/NotificationMatcherEdit.js | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/window/NotificationMatcherEdit.js b/src/window/NotificationMatcherEdit.js
index 5a88288..ee08c16 100644
--- a/src/window/NotificationMatcherEdit.js
+++ b/src/window/NotificationMatcherEdit.js
@@ -778,12 +778,8 @@ Ext.define('Proxmox.panel.NotificationMatchRuleTree', {
 			matchCalendarStmts.push(data.value);
 			break;
 		    case 'mode':
-			if (data.value.startsWith('not')) {
-			    modeStmt = data.value.substring(3); // after 'not''
-			    invertMatchStmt = true;
-			} else {
-			    modeStmt = data.value;
-			}
+			modeStmt = data.value;
+			invertMatchStmt = data.invert;
 			break;
 		}
 
-- 
2.39.2





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

* Re: [pve-devel] [PATCH widget-toolkit] notification matcher: fix inverted match modes
  2023-11-20 14:53 [pve-devel] [PATCH widget-toolkit] notification matcher: fix inverted match modes Fiona Ebner
@ 2023-11-20 15:05 ` Dominik Csapak
  2023-11-20 15:18 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2023-11-20 15:05 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

yes, this fixes setting/loading the inverted modes
it seems i have sent a hunk too much with my followup

thanks for fixing!

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>

On 11/20/23 15:53, Fiona Ebner wrote:
> The 'not' prefix is already stripped in the set() method of the view
> model's 'rootMode' and not present anymore when updating the store.
> The information about whether the mode is inverted or not is present
> in the 'invert' data member.
> 
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>   src/window/NotificationMatcherEdit.js | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/src/window/NotificationMatcherEdit.js b/src/window/NotificationMatcherEdit.js
> index 5a88288..ee08c16 100644
> --- a/src/window/NotificationMatcherEdit.js
> +++ b/src/window/NotificationMatcherEdit.js
> @@ -778,12 +778,8 @@ Ext.define('Proxmox.panel.NotificationMatchRuleTree', {
>   			matchCalendarStmts.push(data.value);
>   			break;
>   		    case 'mode':
> -			if (data.value.startsWith('not')) {
> -			    modeStmt = data.value.substring(3); // after 'not''
> -			    invertMatchStmt = true;
> -			} else {
> -			    modeStmt = data.value;
> -			}
> +			modeStmt = data.value;
> +			invertMatchStmt = data.invert;
>   			break;
>   		}
>   





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

* [pve-devel] applied: [PATCH widget-toolkit] notification matcher: fix inverted match modes
  2023-11-20 14:53 [pve-devel] [PATCH widget-toolkit] notification matcher: fix inverted match modes Fiona Ebner
  2023-11-20 15:05 ` Dominik Csapak
@ 2023-11-20 15:18 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2023-11-20 15:18 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 20/11/2023 um 15:53 schrieb Fiona Ebner:
> The 'not' prefix is already stripped in the set() method of the view
> model's 'rootMode' and not present anymore when updating the store.
> The information about whether the mode is inverted or not is present
> in the 'invert' data member.
> 
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>  src/window/NotificationMatcherEdit.js | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
>

applied, thanks!




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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 14:53 [pve-devel] [PATCH widget-toolkit] notification matcher: fix inverted match modes Fiona Ebner
2023-11-20 15:05 ` Dominik Csapak
2023-11-20 15:18 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal