From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Shannon Sterz" <s.sterz@proxmox.com>,
"Lukas Wagner" <l.wagner@proxmox.com>
Cc: Proxmox Datacenter Manager development discussion
<pdm-devel@lists.proxmox.com>
Subject: Re: [pdm-devel] [PATCH datacenter-manager 05/13] views: add implementation for view filters
Date: Thu, 30 Oct 2025 14:30:24 +0100 [thread overview]
Message-ID: <DDVOZ34O3VVJ.1QCW2TBD47NK3@proxmox.com> (raw)
In-Reply-To: <DDVMQ48JAXW6.2F66R7OC7RBA3@proxmox.com>
On Thu Oct 30, 2025 at 12:44 PM CET, Shannon Sterz wrote:
>> +impl<'a> From<&'a Resource> for ResourceData<'a> {
>> + fn from(value: &'a Resource) -> Self {
>> + match value {
>> + Resource::PveStorage(_) => ResourceData {
>> + resource_type: value.resource_type(),
>> + tags: None,
>> + resource_pool: None,
>> + resource_id: value.global_id(),
>> + },
>> + Resource::PveQemu(resource) => ResourceData {
>> + resource_type: value.resource_type(),
>> + tags: Some(&resource.tags),
>> + resource_pool: Some(&resource.pool),
>> + resource_id: value.global_id(),
>> + },
>> + Resource::PveLxc(resource) => ResourceData {
>> + resource_type: value.resource_type(),
>> + tags: Some(&resource.tags),
>> + resource_pool: Some(&resource.pool),
>> + resource_id: value.global_id(),
>> + },
>> + Resource::PveNode(_) => ResourceData {
>> + resource_type: value.resource_type(),
>> + tags: None,
>> + resource_pool: None,
>> + resource_id: value.global_id(),
>> + },
>> + Resource::PveSdn(_) => ResourceData {
>> + resource_type: value.resource_type(),
>> + tags: None,
>> + resource_pool: None,
>> + resource_id: value.global_id(),
>> + },
>> + Resource::PbsNode(_) => ResourceData {
>> + resource_type: value.resource_type(),
>> + tags: None,
>> + resource_pool: None,
>> + resource_id: value.global_id(),
>> + },
>> + Resource::PbsDatastore(_) => ResourceData {
>> + resource_type: value.resource_type(),
>> + tags: None,
>> + resource_pool: None,
>> + resource_id: value.global_id(),
>> + },
>> + }
>> + }
>> +}
>
> nit: imo this would be fine to group this a match statement a bit. i.e.
> PveStorage, PveNode, PveSdn, PbsNode and PbsDatastore have essentially
> the same arm here. could be simply or-ed (|)
>
Ah, yes, of course! Will be fixed in the next version.
Thanks!
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-10-30 13:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 14:48 [pdm-devel] [RFC datacenter-manager 00/13] backend " Lukas Wagner
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 01/13] fake remote: add missing parameter for cluster_metrics_export function Lukas Wagner
2025-10-30 10:26 ` [pdm-devel] applied: " Wolfgang Bumiller
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 02/13] pdm-api-types: views: add ViewFilterConfig type Lukas Wagner
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 03/13] pdm-config: views: add support for view-filters Lukas Wagner
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 04/13] acl: add '/view' and '/view/{view-id}' as allowed ACL paths Lukas Wagner
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 05/13] views: add implementation for view filters Lukas Wagner
2025-10-30 11:44 ` Shannon Sterz
2025-10-30 13:30 ` Lukas Wagner [this message]
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 06/13] views: add tests for view filter implementation Lukas Wagner
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 07/13] api: resources: list: add support for view-filter parameter Lukas Wagner
2025-10-30 11:21 ` Wolfgang Bumiller
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 08/13] api: resources: top entities: " Lukas Wagner
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 09/13] api: resources: status: " Lukas Wagner
2025-10-29 14:48 ` [pdm-devel] [PATCH datacenter-manager 10/13] api: subscription " Lukas Wagner
2025-10-30 11:31 ` Wolfgang Bumiller
2025-10-30 11:44 ` Shannon Sterz
2025-10-29 14:49 ` [pdm-devel] [PATCH datacenter-manager 11/13] api: remote-tasks: " Lukas Wagner
2025-10-29 14:49 ` [pdm-devel] [PATCH datacenter-manager 12/13] pdm-client: resource list: add " Lukas Wagner
2025-10-29 14:49 ` [pdm-devel] [PATCH datacenter-manager 13/13] pdm-client: top entities: " Lukas Wagner
2025-10-30 11:41 ` [pdm-devel] [RFC datacenter-manager 00/13] backend implementation for view filters Wolfgang Bumiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DDVOZ34O3VVJ.1QCW2TBD47NK3@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
--cc=s.sterz@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox