fix(adminui,cli): /raw device-name placeholder + no-prerender tree, CLI read prints Bad status (#577)

Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
Joseph Doherty
2026-10-07 22:56:47 -04:00
parent e588443ced
commit 3d081ad29c
6 changed files with 70 additions and 6 deletions
@@ -1,6 +1,10 @@
@page "/raw"
@attribute [Authorize(Policy = AdminUiPolicies.ConfigEditor)]
@rendermode RenderMode.InteractiveServer
@* prerender: false (#577 "first tree click ignored"): with prerender on, the server-rendered tree is shown
before the circuit attaches, so a click on its (handler-less) twists is silently dropped, and the
component then re-runs OnInitializedAsync and swaps in a second, freshly loaded node set. The tree
is the only content here and needs the circuit anyway, so render it once, interactively. *@
@rendermode @(new InteractiveServerRenderMode(prerender: false))
@using ZB.MOM.WW.OtOpcUa.AdminUI.Uns
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Raw
@inject IRawTreeService Svc
@@ -28,7 +28,7 @@
<div class="row g-3 mb-2">
<div class="col-md-6">
<label class="form-label">Device name</label>
<input class="form-control form-control-sm mono" @bind="_name" placeholder="Device1" />
<input class="form-control form-control-sm mono" @bind="_name" placeholder="e.g. plc1" />
<div class="form-text">A RawPath segment — letters, digits, dash, underscore.</div>
</div>
<div class="col-md-3">
@@ -145,7 +145,7 @@
{
_resolvedDriverInstanceId = DriverInstanceId;
_driverType = DriverType ?? "";
_name = "Device1";
_name = ""; // placeholder only: a pre-filled value made typing append to it (#577); the name is validated on save
_enabled = true;
_deviceConfigJson = "{}";
_rowVersion = [];