all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix
@ 2025-09-26  7:20 Dominik Csapak
  2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 2/4] ui: pve: storage: remove unnecessary import Dominik Csapak
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dominik Csapak @ 2025-09-26  7:20 UTC (permalink / raw)
  To: pdm-devel

unnecessary reference, after we remove that, it's an unnecessary closure

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 ui/src/pve/storage.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/pve/storage.rs b/ui/src/pve/storage.rs
index 4f5abbe9..d5b25063 100644
--- a/ui/src/pve/storage.rs
+++ b/ui/src/pve/storage.rs
@@ -282,7 +282,7 @@ impl yew::Component for StoragePanelComp {
                 status
                     .content
                     .iter()
-                    .map(|c| render_content_type(&c))
+                    .map(render_content_type)
                     .collect::<Vec<_>>()
                     .join(", "),
             ))
-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pdm-devel] [PATCH datacenter-manager 2/4] ui: pve: storage: remove unnecessary import
  2025-09-26  7:20 [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix Dominik Csapak
@ 2025-09-26  7:20 ` Dominik Csapak
  2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 3/4] ui: pve: storage: fix rrd update Dominik Csapak
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2025-09-26  7:20 UTC (permalink / raw)
  To: pdm-devel

this is always imported

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 ui/src/pve/storage.rs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ui/src/pve/storage.rs b/ui/src/pve/storage.rs
index d5b25063..ababb7e0 100644
--- a/ui/src/pve/storage.rs
+++ b/ui/src/pve/storage.rs
@@ -1,4 +1,3 @@
-use core::f64;
 use std::rc::Rc;
 
 use gloo_timers::callback::Timeout;
-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pdm-devel] [PATCH datacenter-manager 3/4] ui: pve: storage: fix rrd update
  2025-09-26  7:20 [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix Dominik Csapak
  2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 2/4] ui: pve: storage: remove unnecessary import Dominik Csapak
@ 2025-09-26  7:20 ` Dominik Csapak
  2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 4/4] ui: pve: storage: remove unnecessary 'enabled' status line Dominik Csapak
  2025-09-26 10:47 ` [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2025-09-26  7:20 UTC (permalink / raw)
  To: pdm-devel

we saved the rrd timeout into the _status_timeout, so we overwrote it
and never updated the status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 ui/src/pve/storage.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/pve/storage.rs b/ui/src/pve/storage.rs
index ababb7e0..db25c1d3 100644
--- a/ui/src/pve/storage.rs
+++ b/ui/src/pve/storage.rs
@@ -199,7 +199,7 @@ impl yew::Component for StoragePanelComp {
                     }
                     Err(err) => self.last_rrd_error = Some(err),
                 }
-                self._status_timeout = Some(Timeout::new(props.rrd_interval, move || {
+                self._rrd_timeout = Some(Timeout::new(props.rrd_interval, move || {
                     link.send_message(Msg::ReloadRrd)
                 }));
                 true
-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pdm-devel] [PATCH datacenter-manager 4/4] ui: pve: storage: remove unnecessary 'enabled' status line
  2025-09-26  7:20 [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix Dominik Csapak
  2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 2/4] ui: pve: storage: remove unnecessary import Dominik Csapak
  2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 3/4] ui: pve: storage: fix rrd update Dominik Csapak
@ 2025-09-26  7:20 ` Dominik Csapak
  2025-09-26 10:47 ` [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2025-09-26  7:20 UTC (permalink / raw)
  To: pdm-devel

all storages that are visible in the tree must be enabled,
so this will always be true.

Since it does not add any useful information, just remove it.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 ui/src/pve/storage.rs | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/ui/src/pve/storage.rs b/ui/src/pve/storage.rs
index db25c1d3..28671d77 100644
--- a/ui/src/pve/storage.rs
+++ b/ui/src/pve/storage.rs
@@ -257,15 +257,6 @@ impl yew::Component for StoragePanelComp {
         };
 
         status_comp = status_comp
-            .with_child(status_row_right_icon(
-                tr!("Enabled"),
-                if status.enabled.unwrap_or_default() {
-                    "fa-toggle-on"
-                } else {
-                    "fa-toggle-off"
-                },
-                String::new(),
-            ))
             .with_child(status_row_right_icon(
                 tr!("Active"),
                 if status.active.unwrap_or_default() {
-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix
  2025-09-26  7:20 [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix Dominik Csapak
                   ` (2 preceding siblings ...)
  2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 4/4] ui: pve: storage: remove unnecessary 'enabled' status line Dominik Csapak
@ 2025-09-26 10:47 ` Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2025-09-26 10:47 UTC (permalink / raw)
  To: pdm-devel, Dominik Csapak

On Fri, 26 Sep 2025 09:20:05 +0200, Dominik Csapak wrote:
> unnecessary reference, after we remove that, it's an unnecessary closure
> 
> 

Applied, thanks!

I reworded the commit message though, as especially the one from patch 3/4 was
misleading (fixes status update not rrd update). Also made a follow-up to
change the name of the timeout update reference guards to not start with an
underscore, as then we would have noticed this earlier.
We should avoud rework other code sides using this problematic pattern too, not
sure if the "_guard" prefix is the best one ("_holder" might be an
alternative), but it's semantically true enough and we can change that still.

[1/4] ui: pve: storage: clippy fix
      commit: cf90529e6d250dd4113db3884efc8ce46c02699c
[2/4] ui: pve: storage: remove unnecessary import
      commit: f8c9d3db5cd51dfff92384379f764a0710c29ab7
[3/4] ui: pve: storage: fix rrd update
      commit: c515d324ba077625b0f15ccf08c878bc97fdb12e
[4/4] ui: pve: storage: remove unnecessary 'enabled' status line
      commit: e8be46072ead4e53dd3cec04bc26ed90642dcffd


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-09-26 10:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-26  7:20 [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix Dominik Csapak
2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 2/4] ui: pve: storage: remove unnecessary import Dominik Csapak
2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 3/4] ui: pve: storage: fix rrd update Dominik Csapak
2025-09-26  7:20 ` [pdm-devel] [PATCH datacenter-manager 4/4] ui: pve: storage: remove unnecessary 'enabled' status line Dominik Csapak
2025-09-26 10:47 ` [pdm-devel] [PATCH datacenter-manager 1/4] ui: pve: storage: clippy fix Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal