From: Dominik Csapak <d.csapak@proxmox.com>
To: Shannon Sterz <s.sterz@proxmox.com>
Cc: Proxmox Datacenter Manager development discussion
<pdm-devel@lists.proxmox.com>
Subject: Re: [pdm-devel] [RFC PATCH datacenter-manager v2 15/16] ui: dashboard: implement 'View'
Date: Thu, 23 Oct 2025 13:44:53 +0200 [thread overview]
Message-ID: <ff1b7075-c2f3-40cf-8de3-1e4afb1a4a4e@proxmox.com> (raw)
In-Reply-To: <DDPNT6DP4TSQ.25NHTZX5MTZZJ@proxmox.com>
On 10/23/25 1:19 PM, Shannon Sterz wrote:
> On Thu Oct 23, 2025 at 10:28 AM CEST, Dominik Csapak wrote:
[snip]
>> +
>> +struct ViewComp {
>> + template: LoadResult<ViewTemplate, Error>,
>> +
>> + // various api call results
>> + status: LoadResult<ResourcesStatus, Error>,
>> + top_entities: LoadResult<TopEntities, proxmox_client::Error>,
>> + statistics: LoadResult<TaskStatistics, Error>,
>
> this is fine, but i just had an idea, maybe this isn't too useful right
> now, but might be worth exploring: we could turn this into a HashMap
> with something like this:
>
> HashMap<ToQuery, LoadResult<ApiResponseData, Error>>
>
> then loading could become iterating over the keys and calling a function
> on them. with a wrapper type we could even implement a getter that
> transforms the ApiResponseData to a concrete type. might cut down on the
> loading logic below and make this more easily extensible in the future.
>
> the required_api_calls below could then just return such a hashmap with
> only the necessary keys. what do you think (note i haven't tested any of
> this)?
i don't think this will work, since ApiResponseData itself takes a
generic parameter too, and we can't use different ones for different
values of the same hashmap AFAIK
but yeah, we should think about how we could generalize this
instead of just adding on new members...
[snip]
>> + match self.template.data.as_ref().map(|template| &template.layout) {
>> + Some(ViewLayout::Rows { rows }) => {
>> + for items in rows {
>> + let mut row = Row::new()
>> + .gap(4)
>> + .padding_top(0)
>> + .class("pwt-content-spacer")
>
> since this is used here quite extensively, might make sense to also give
> that a type in the `css` module, but that's unrelated to this series
yes, i agree (we have quite some classes that would IMHO benefit
from that)
>
>> + .class(css::FlexDirection::Row)
>
> just something i'm curious about, but is this necessary? shouldn't a
> `Row` already be `FlexDirection::Row`? or more accurately, isn't it by
> default?
you're right, this seems to be a leftover from some older versions i had
_______________________________________________
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-23 11:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 8:28 [pdm-devel] [PATCH datacenter-manager v2 00/16] prepare ui for customizable views Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 01/16] ui: dashboard: refactor guest panel creation to its own module Dominik Csapak
2025-10-23 11:19 ` Shannon Sterz
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 02/16] ui: dashboard: refactor creating the node panel into " Dominik Csapak
2025-10-23 11:19 ` Shannon Sterz
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 03/16] ui: dashboard: refactor remote panel creation " Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 04/16] ui: dashboard: remote panel: make wizard menu optional Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 05/16] ui: dashboard: refactor sdn panel creation into its own module Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 06/16] ui: dashboard: refactor task summary panel creation to " Dominik Csapak
2025-10-23 11:19 ` Shannon Sterz
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 07/16] ui: dashboard: task summary: disable virtual scrolling Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 08/16] ui: dashboard: refactor subscription panel creation to its own module Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 09/16] ui: dashboard: refactor top entities " Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 10/16] ui: dashboard: refactor DashboardConfig editing/constants to their module Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 11/16] ui: dashboard: factor out task parameter calculation Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 12/16] ui: dashboard: remove unused remote list Dominik Csapak
2025-10-23 8:28 ` [pdm-devel] [PATCH datacenter-manager v2 13/16] ui: dashboard: status row: make loading less jarring Dominik Csapak
2025-10-23 11:19 ` Shannon Sterz
2025-10-23 8:28 ` [pdm-devel] [RFC PATCH datacenter-manager v2 14/16] ui: introduce `LoadResult` helper type Dominik Csapak
2025-10-23 11:19 ` Shannon Sterz
2025-10-23 8:28 ` [pdm-devel] [RFC PATCH datacenter-manager v2 15/16] ui: dashboard: implement 'View' Dominik Csapak
2025-10-23 11:19 ` Shannon Sterz
2025-10-23 11:44 ` Dominik Csapak [this message]
2025-10-23 11:48 ` Dominik Csapak
2025-10-24 10:17 ` Shannon Sterz
2025-10-23 8:28 ` [pdm-devel] [RFC PATCH datacenter-manager v2 16/16] ui: dashboard: use 'View' instead of the Dashboard Dominik Csapak
2025-10-23 11:19 ` Shannon Sterz
2025-10-23 11:20 ` [pdm-devel] [PATCH datacenter-manager v2 00/16] prepare ui for customizable views Shannon Sterz
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=ff1b7075-c2f3-40cf-8de3-1e4afb1a4a4e@proxmox.com \
--to=d.csapak@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