From: Dominik Rusovac <d.rusovac@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH yew-mobile-gui v2 3/3] dashboard: clarify presentation of CPU utilization
Date: Thu, 19 Feb 2026 13:05:35 +0100 [thread overview]
Message-ID: <20260219120535.209549-4-d.rusovac@proxmox.com> (raw)
In-Reply-To: <20260219120535.209549-1-d.rusovac@proxmox.com>
To align "Summary" of "Resources" in "Datacenter" of the PVE web ui,
this adds "CPU(s)" as the unit of the total number of CPUs displayed
above to the right of the CPU utilization bar. In addition, this makes
the involved strings translatable.
Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com>
---
changes since v1:
* make strings translatable
src/pages/page_dashboard.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pages/page_dashboard.rs b/src/pages/page_dashboard.rs
index ac8e3e7..f33f182 100644
--- a/src/pages/page_dashboard.rs
+++ b/src/pages/page_dashboard.rs
@@ -125,8 +125,8 @@ impl PvePageDashboard {
tiles.push(
icon_list_tile(Fa::new("cpu"), tr!("CPU"), (), ()).with_child(list_tile_usage(
- format!("{:.2}", cpu_proportion * 100.0),
- maxcpu.to_string(),
+ tr!("{0}%", format!("{:.2}", cpu_proportion * 100.0)),
+ tr!("{0} CPU(s)", maxcpu.to_string()),
cpu_proportion,
)),
);
--
2.47.3
prev parent reply other threads:[~2026-02-19 12:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 12:05 [PATCH yew-mobile-gui v2 0/3] fix #7330: dashboard: display CPU utilization correctly Dominik Rusovac
2026-02-19 12:05 ` [PATCH yew-mobile-gui v2 1/3] run cargo fmt Dominik Rusovac
2026-02-19 12:05 ` [PATCH yew-mobile-gui v2 2/3] fix #7330: dashboard: display CPU utilization correctly Dominik Rusovac
2026-02-19 12:05 ` Dominik Rusovac [this message]
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=20260219120535.209549-4-d.rusovac@proxmox.com \
--to=d.rusovac@proxmox.com \
--cc=pve-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