public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager 3/9] ui: improve error message when controller cannot be found
Date: Wed, 12 Nov 2025 14:20:20 +0100	[thread overview]
Message-ID: <20251112132045.165444-4-g.goller@proxmox.com> (raw)
In-Reply-To: <20251112132045.165444-1-g.goller@proxmox.com>

With the added permissions, it often happens that the user has
permissions to view the zone, but doesn't have permissions to view the
controller. This means we can't display the zone in the EVPN overview.
"not found" is a more correct error than "doesn't exist".

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 ui/src/sdn/evpn/remote_tree.rs | 6 ++++--
 ui/src/sdn/evpn/vrf_tree.rs    | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ui/src/sdn/evpn/remote_tree.rs b/ui/src/sdn/evpn/remote_tree.rs
index ee57b33c18f2..7243a03329c0 100644
--- a/ui/src/sdn/evpn/remote_tree.rs
+++ b/ui/src/sdn/evpn/remote_tree.rs
@@ -176,7 +176,8 @@ fn zones_to_remote_view(
             })
             .ok_or_else(|| {
                 anyhow!(tr!(
-                    "Could not find Controller for EVPN zone {}",
+                    "Controller {} of EVPN zone {} not found",
+                    zone_controller_id,
                     zone_data.zone
                 ))
             })?;
@@ -260,7 +261,8 @@ fn zones_to_remote_view(
             })
             .ok_or_else(|| {
                 anyhow!(tr!(
-                    "Controller of EVPN zone {} does not exist",
+                    "Controller {} of EVPN zone {} not found",
+                    zone_controller_id,
                     zone.zone.zone
                 ))
             })?;
diff --git a/ui/src/sdn/evpn/vrf_tree.rs b/ui/src/sdn/evpn/vrf_tree.rs
index 8481dfcf6027..d690501265a9 100644
--- a/ui/src/sdn/evpn/vrf_tree.rs
+++ b/ui/src/sdn/evpn/vrf_tree.rs
@@ -140,7 +140,8 @@ fn zones_to_vrf_view(
             })
             .ok_or_else(|| {
                 anyhow!(tr!(
-                    "Controller of EVPN zone {} does not exist",
+                    "Controller {} of EVPN zone {} not found",
+                    zone_controller_id,
                     zone_data.zone
                 ))
             })?;
@@ -199,7 +200,8 @@ fn zones_to_vrf_view(
             })
             .ok_or_else(|| {
                 anyhow!(tr!(
-                    "Controller of EVPN zone {} does not exist",
+                    "Controller {} of EVPN zone {} not found",
+                    zone_controller_id,
                     zone.zone.zone
                 ))
             })?;
-- 
2.47.3



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


  parent reply	other threads:[~2025-11-12 13:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 13:20 [pdm-devel] [RFC proxmox-datacenter-manager 0/9] Granular permissions for SDN resources Gabriel Goller
2025-11-12 13:20 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/9] api: sdn: rename vnets to zones in list_zones Gabriel Goller
2025-11-12 13:20 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/9] api: sdn: rename "vnet" to "controller" in list_controller Gabriel Goller
2025-11-12 13:20 ` Gabriel Goller [this message]
2025-11-12 13:20 ` [pdm-devel] [PATCH proxmox-datacenter-manager 4/9] api: allow acl paths longer than 4 segments in sdn Gabriel Goller
2025-11-12 13:20 ` [pdm-devel] [PATCH proxmox-datacenter-manager 5/9] api: sdn: add granular permissions for zones Gabriel Goller
2025-11-12 13:20 ` [pdm-devel] [PATCH proxmox-datacenter-manager 6/9] api: sdn: add granular permissions for vnets Gabriel Goller
2025-11-12 13:20 ` [pdm-devel] [PATCH proxmox-datacenter-manager 7/9] api: sdn: add granular permissions for controllers Gabriel Goller
2025-11-12 13:20 ` [pdm-devel] [PATCH proxmox-datacenter-manager 8/9] api: add permissions for ip-vrf and mac-vrf endpoints Gabriel Goller
2025-11-12 13:20 ` [pdm-devel] [PATCH proxmox-datacenter-manager 9/9] api: add permissions for sdn resources Gabriel Goller

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=20251112132045.165444-4-g.goller@proxmox.com \
    --to=g.goller@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