From 22fd31469468212fe02641acc5cec7bcd200b535 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Mon, 18 May 2026 03:17:56 -0400 Subject: [PATCH] fix(admin): make the role-grants page interactive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The role-grants page is the authoring surface for LdapGroupRoleMapping rows, but it had no @rendermode — so it rendered as static SSR and its @onclick handlers (Add grant, Revoke) never fired. App.razor's sets no global render mode; only ClusterDetail opted in. - Add @rendermode RenderMode.InteractiveServer. - Fix the SignalR hub URL: the page connected to /hubs/fleet-status, but FleetStatusHub is mapped at /hubs/fleet. Static SSR masked this (OnAfterRenderAsync never ran); enabling interactivity surfaced the 404 that terminated the circuit. Verified in-browser: Add grant opens the form, a cluster-scoped grant saves and lists, Revoke removes it. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../ZB.MOM.WW.OtOpcUa.Admin/Components/Pages/RoleGrants.razor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.Admin/Components/Pages/RoleGrants.razor b/src/Server/ZB.MOM.WW.OtOpcUa.Admin/Components/Pages/RoleGrants.razor index 96c8f34..0f3533f 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.Admin/Components/Pages/RoleGrants.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.Admin/Components/Pages/RoleGrants.razor @@ -1,5 +1,6 @@ @page "/role-grants" @attribute [Microsoft.AspNetCore.Authorization.Authorize(Policy = "CanPublish")] +@rendermode RenderMode.InteractiveServer @using Microsoft.AspNetCore.Components.Web @using Microsoft.AspNetCore.SignalR.Client @using ZB.MOM.WW.OtOpcUa.Admin.Hubs @@ -179,7 +180,7 @@ else { if (!firstRender || _hub is not null) return; _hub = new HubConnectionBuilder() - .WithUrl(Nav.ToAbsoluteUri("/hubs/fleet-status")) + .WithUrl(Nav.ToAbsoluteUri("/hubs/fleet")) .WithAutomaticReconnect() .Build(); _hub.On("RoleGrantsChanged", async _ =>