From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 7338F1FF187 for ; Mon, 3 Nov 2025 13:35:33 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D69C11C5AB; Mon, 3 Nov 2025 13:36:11 +0100 (CET) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Date: Mon, 3 Nov 2025 13:35:09 +0100 Message-ID: <20251103123521.266258-1-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762173320988 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.124 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH datacenter-manager v2 00/12] backend implementation for view filters X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Key aspects: - new config file at /etc/proxmox-datacenter-manager/views/filters.cfg (subject to change, depending on where the view templates are stored) - ViewFilterConfig as a filter defintion type,has - {include,exclude} {remote,resource-id,resource-type,resource-pool,tag}:{value} - Filter implementation & big suite of unit tests - excludes are processed after includes - if no include rules are defined, all resources but those which were excluded are matched - if no rules are defined in a filter, everything is matched - Added the 'view-filter' parameter to a couple of API endpoints - /resources/list - /resources/status - /resources/subscription - /resources/top-entities - /remote-tasks/list - /remote-tasks/statistis - ACL checks are done on /view/{view-filter-id} for now, replace any other permission check in the handler iff the view-filter paramter is set Left to do: - CRUD for filter definition - Decide on how exactly they will work together with the view templates -> most likely a new config type View { filter: String, template: String, } - UI for filter rules - Depending on how the view template is integrated, maybe rename ViewFilter to View (also change the API parameter name) Changes since v1 (RFC): - Change config key structure, moving the type into the value e.g. include-remote foo became include remote:foo - Minor fixes from the review (thanks Wolfgang & Shannon) proxmox-datacenter-manager: Lukas Wagner (12): pdm-api-types: views: add ViewFilterConfig type pdm-config: views: add support for view-filters acl: add '/view' and '/view/{view-id}' as allowed ACL paths views: add implementation for view filters views: add tests for view filter implementation api: resources: list: add support for view-filter parameter api: resources: top entities: add support for view-filter parameter api: resources: status: add support for view-filter parameter api: subscription status: add support for view-filter parameter api: remote-tasks: add support for view-filter parameter pdm-client: resource list: add view-filter parameter pdm-client: top entities: add view-filter parameter cli/client/src/resources.rs | 2 +- lib/pdm-api-types/src/lib.rs | 8 + lib/pdm-api-types/src/views.rs | 165 ++++++ lib/pdm-client/src/lib.rs | 19 +- lib/pdm-config/src/lib.rs | 2 +- lib/pdm-config/src/views.rs | 62 ++ server/src/acl.rs | 6 + server/src/api/remote_tasks.rs | 36 +- server/src/api/resources.rs | 168 +++++- server/src/lib.rs | 1 + server/src/metric_collection/top_entities.rs | 5 + server/src/remote_tasks/mod.rs | 39 +- server/src/resource_cache.rs | 3 +- server/src/views/mod.rs | 4 + server/src/views/tests.rs | 585 +++++++++++++++++++ server/src/views/view_filter.rs | 182 ++++++ ui/src/dashboard/mod.rs | 2 +- ui/src/sdn/zone_tree.rs | 2 +- 18 files changed, 1242 insertions(+), 49 deletions(-) create mode 100644 lib/pdm-api-types/src/views.rs create mode 100644 lib/pdm-config/src/views.rs create mode 100644 server/src/views/mod.rs create mode 100644 server/src/views/tests.rs create mode 100644 server/src/views/view_filter.rs Summary over all repositories: 18 files changed, 1242 insertions(+), 49 deletions(-) -- Generated by murpp 0.9.0 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel