* [pve-devel] [PATCH widget-toolkit] node/Tasks: don't count 'preFilters' as normal filters
@ 2022-03-29 14:04 Dominik Csapak
2022-03-29 15:48 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2022-03-29 14:04 UTC (permalink / raw)
To: pve-devel
they can not be removed nor are they visible, so don't count them.
When having a prefilter, we now don't show anymore that there is an
active filter, and don't enable the button anymore.
This is the case for vms for example (vmid is a prefilter).
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/node/Tasks.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/node/Tasks.js b/src/node/Tasks.js
index 3d7113d..ef1177c 100644
--- a/src/node/Tasks.js
+++ b/src/node/Tasks.js
@@ -165,9 +165,11 @@ Ext.define('Proxmox.node.Tasks', {
}
if (get('extraFilter')) {
+ let preFilter = get('preFilter') || {};
let extraFilter = get('extraFilter');
- for (const value of Object.values(extraFilter)) {
- if (value !== undefined && value !== null && value !== "") {
+ for (const [name, value] of Object.entries(extraFilter)) {
+ if (value !== undefined && value !== null && value !== "" &&
+ preFilter[name] === undefined) {
count++;
}
}
@@ -458,6 +460,8 @@ Ext.define('Proxmox.node.Tasks', {
updateExtraFilters(name, value);
}
+ me.getViewModel().set('preFilter', me.preFilter);
+
me.callParent();
let addFields = function(items) {
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH widget-toolkit] node/Tasks: don't count 'preFilters' as normal filters
2022-03-29 14:04 [pve-devel] [PATCH widget-toolkit] node/Tasks: don't count 'preFilters' as normal filters Dominik Csapak
@ 2022-03-29 15:48 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-03-29 15:48 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
On 29.03.22 16:04, Dominik Csapak wrote:
> they can not be removed nor are they visible, so don't count them.
>
> When having a prefilter, we now don't show anymore that there is an
> active filter, and don't enable the button anymore.
> This is the case for vms for example (vmid is a prefilter).
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> src/node/Tasks.js | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-29 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29 14:04 [pve-devel] [PATCH widget-toolkit] node/Tasks: don't count 'preFilters' as normal filters Dominik Csapak
2022-03-29 15:48 ` [pve-devel] applied: " 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