public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [yew-devel] [PATCH yew-comp 0/2] fix default realm loading for proxmox ve
@ 2025-11-25 11:10 Shannon Sterz
  2025-11-25 11:10 ` [yew-devel] [PATCH yew-comp 1/2] common api types: make BasicRealmInfo compatible with " Shannon Sterz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shannon Sterz @ 2025-11-25 11:10 UTC (permalink / raw)
  To: yew-devel

the default realm support for proxmox ve is incomplete. these fixes at
least make it possible for yew-comp to be compatible with the current
implementation.

Shannon Sterz (2):
  common api types: make BasicRealmInfo compatible with proxmox ve
  realm selector: log load errors

 src/common_api_types.rs | 3 ++-
 src/realm_selector.rs   | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

--
2.47.3



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


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

* [yew-devel] [PATCH yew-comp 1/2] common api types: make BasicRealmInfo compatible with proxmox ve
  2025-11-25 11:10 [yew-devel] [PATCH yew-comp 0/2] fix default realm loading for proxmox ve Shannon Sterz
@ 2025-11-25 11:10 ` Shannon Sterz
  2025-11-25 11:10 ` [yew-devel] [PATCH yew-comp 2/2] realm selector: log load errors Shannon Sterz
  2025-11-25 12:06 ` [yew-devel] applied: [PATCH yew-comp 0/2] fix default realm loading for proxmox ve Dietmar Maurer
  2 siblings, 0 replies; 4+ messages in thread
From: Shannon Sterz @ 2025-11-25 11:10 UTC (permalink / raw)
  To: yew-devel

the perl return types for booleans are integers so need special
handling when deserializing. otherwise, the realm selector will just
remain empty.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 src/common_api_types.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/common_api_types.rs b/src/common_api_types.rs
index a9d3c2a..be5c64e 100644
--- a/src/common_api_types.rs
+++ b/src/common_api_types.rs
@@ -15,7 +15,8 @@ pub struct BasicRealmInfo {
     #[serde(rename = "type")]
     pub ty: String,
     /// True if it is the default realm
-    #[serde(skip_serializing_if = "Option::is_none")]
+    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
+    #[serde(default, skip_serializing_if = "Option::is_none")]
     pub default: Option<bool>,
     #[serde(skip_serializing_if = "Option::is_none")]
     pub comment: Option<String>,
-- 
2.47.3



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


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

* [yew-devel] [PATCH yew-comp 2/2] realm selector: log load errors
  2025-11-25 11:10 [yew-devel] [PATCH yew-comp 0/2] fix default realm loading for proxmox ve Shannon Sterz
  2025-11-25 11:10 ` [yew-devel] [PATCH yew-comp 1/2] common api types: make BasicRealmInfo compatible with " Shannon Sterz
@ 2025-11-25 11:10 ` Shannon Sterz
  2025-11-25 12:06 ` [yew-devel] applied: [PATCH yew-comp 0/2] fix default realm loading for proxmox ve Dietmar Maurer
  2 siblings, 0 replies; 4+ messages in thread
From: Shannon Sterz @ 2025-11-25 11:10 UTC (permalink / raw)
  To: yew-devel

so it's easier to debug when loading realms does not work out as
intended.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 src/realm_selector.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/realm_selector.rs b/src/realm_selector.rs
index 305e544..4f63105 100644
--- a/src/realm_selector.rs
+++ b/src/realm_selector.rs
@@ -80,7 +80,10 @@ impl ProxmoxRealmSelector {
 
         match response {
             Ok(data) => Msg::LoadComplete(data.data),
-            Err(_) => Msg::LoadFailed,
+            Err(e) => {
+                log::error!("could not load realms: {e:?}");
+                Msg::LoadFailed
+            }
         }
     }
 }
-- 
2.47.3



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


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

* [yew-devel] applied: [PATCH yew-comp 0/2] fix default realm loading for proxmox ve
  2025-11-25 11:10 [yew-devel] [PATCH yew-comp 0/2] fix default realm loading for proxmox ve Shannon Sterz
  2025-11-25 11:10 ` [yew-devel] [PATCH yew-comp 1/2] common api types: make BasicRealmInfo compatible with " Shannon Sterz
  2025-11-25 11:10 ` [yew-devel] [PATCH yew-comp 2/2] realm selector: log load errors Shannon Sterz
@ 2025-11-25 12:06 ` Dietmar Maurer
  2 siblings, 0 replies; 4+ messages in thread
From: Dietmar Maurer @ 2025-11-25 12:06 UTC (permalink / raw)
  To: Yew framework devel list at Proxmox


[-- Attachment #1.1: Type: text/plain, Size: 9 bytes --]

applied

[-- Attachment #1.2: Type: text/html, Size: 199 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

end of thread, other threads:[~2025-11-25 12:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-25 11:10 [yew-devel] [PATCH yew-comp 0/2] fix default realm loading for proxmox ve Shannon Sterz
2025-11-25 11:10 ` [yew-devel] [PATCH yew-comp 1/2] common api types: make BasicRealmInfo compatible with " Shannon Sterz
2025-11-25 11:10 ` [yew-devel] [PATCH yew-comp 2/2] realm selector: log load errors Shannon Sterz
2025-11-25 12:06 ` [yew-devel] applied: [PATCH yew-comp 0/2] fix default realm loading for proxmox ve Dietmar Maurer

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