public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Dominik Csapak" <d.csapak@proxmox.com>, <pdm-devel@lists.proxmox.com>
Subject: Re: [PATCH datacenter-manager v2 3/4] ui: dashboard: add new gauge panels widget type
Date: Wed, 01 Apr 2026 13:36:55 +0200	[thread overview]
Message-ID: <DHHSDJMCC744.3RUN45VOPFMOR@proxmox.com> (raw)
In-Reply-To: <20260330131044.693709-4-d.csapak@proxmox.com>

On Mon Mar 30, 2026 at 3:07 PM CEST, Dominik Csapak wrote:
> diff --git a/ui/src/dashboard/view/row_view.rs b/ui/src/dashboard/view/row_view.rs
> index 673b4627..f220f954 100644
> --- a/ui/src/dashboard/view/row_view.rs
> +++ b/ui/src/dashboard/view/row_view.rs
> @@ -21,7 +21,7 @@ use crate::dashboard::view::EditingMessage;
>  
>  use pdm_api_types::remotes::RemoteType;
>  use pdm_api_types::views::{
> -    LeaderboardType, RowWidget, TaskSummaryGrouping, ViewLayout, WidgetType,
> +    LeaderboardType, NodeResourceType, RowWidget, TaskSummaryGrouping, ViewLayout, WidgetType,
>  };
>  
>  #[derive(Properties, PartialEq)]
> @@ -539,6 +539,35 @@ fn create_menu(ctx: &yew::Context<RowViewComp>, new_coords: Position) -> Menu {
>          ctx.link()
>              .callback(move |_| Msg::AddWidget(new_coords, widget.clone()))
>      };
> +    let create_gauge_menu = |remote_type: Option<RemoteType>| -> Menu {
> +        Menu::new()
> +            .with_item(
> +                MenuItem::new(tr!("All Resources")).on_select(create_callback(
> +                    WidgetType::NodeResourceGauge {
> +                        resource: None,
> +                        remote_type,
> +                    },
> +                )),
> +            )
> +            .with_item(MenuItem::new(tr!("CPU")).on_select(create_callback(
> +                WidgetType::NodeResourceGauge {
> +                    resource: Some(NodeResourceType::Cpu),
> +                    remote_type,
> +                },
> +            )))
> +            .with_item(MenuItem::new(tr!("Memory")).on_select(create_callback(
> +                WidgetType::NodeResourceGauge {
> +                    resource: Some(NodeResourceType::Memory),
> +                    remote_type,
> +                },
> +            )))
> +            .with_item(MenuItem::new(tr!("Storage")).on_select(create_callback(
> +                WidgetType::NodeResourceGauge {
> +                    resource: Some(NodeResourceType::Storage),
> +                    remote_type,
> +                },
> +            )))
> +    };
>      Menu::new()
>          .with_item(
>              MenuItem::new(tr!("Remote Panel"))
> @@ -642,4 +671,16 @@ fn create_menu(ctx: &yew::Context<RowViewComp>, new_coords: Position) -> Menu {
>              MenuItem::new(tr!("Resource Tree"))
>                  .on_select(create_callback(WidgetType::ResourceTree)),
>          )
> +        .with_item(
> +            MenuItem::new(tr!("Resource Usage")).menu(
> +                Menu::new()
> +                    .with_item(MenuItem::new(tr!("All")).menu(create_gauge_menu(None)))
> +                    .with_item(
> +                        MenuItem::new(tr!("PVE")).menu(create_gauge_menu(Some(RemoteType::Pve))),
> +                    )
> +                    .with_item(
> +                        MenuItem::new(tr!("PBS")).menu(create_gauge_menu(Some(RemoteType::Pbs))),
> +                    ),

Sorry, forgot this in my initial reply:

I'd also use the full product name here instead of the colloquially used
acronyms.

> +            ),
> +        )
>  }





  parent reply	other threads:[~2026-04-01 11:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 13:07 [PATCH datacenter-manager v2 0/4] add resource gauge panels to dashboard/views Dominik Csapak
2026-03-30 13:07 ` [PATCH datacenter-manager v2 1/4] api: return global cpu/memory/storage statistics Dominik Csapak
2026-04-01 11:34   ` Lukas Wagner
2026-04-02 13:02     ` Dominik Csapak
2026-04-02 13:48       ` Lukas Wagner
2026-03-30 13:07 ` [PATCH datacenter-manager v2 2/4] ui: css: use mask for svg icons Dominik Csapak
2026-03-30 13:07 ` [PATCH datacenter-manager v2 3/4] ui: dashboard: add new gauge panels widget type Dominik Csapak
2026-04-01 11:34   ` Lukas Wagner
2026-04-01 11:36   ` Lukas Wagner [this message]
2026-03-30 13:07 ` [PATCH datacenter-manager v2 4/4] ui: dashboard: add resource gauges to default dashboard Dominik Csapak
2026-04-01 11:34 ` [PATCH datacenter-manager v2 0/4] add resource gauge panels to dashboard/views Lukas Wagner
2026-04-02 13:24 ` superseded: " Dominik Csapak

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=DHHSDJMCC744.3RUN45VOPFMOR@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pdm-devel@lists.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal