feat(ui): warn on bare ns= node bindings in the browse picker (v3 cutover #14)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
@using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Protocol
|
@using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Protocol
|
||||||
@using ZB.MOM.WW.ScadaBridge.Commons.Messages.Management
|
@using ZB.MOM.WW.ScadaBridge.Commons.Messages.Management
|
||||||
|
@using ZB.MOM.WW.ScadaBridge.Commons.Types.DataConnections
|
||||||
@using ZB.MOM.WW.ScadaBridge.CentralUI.Services
|
@using ZB.MOM.WW.ScadaBridge.CentralUI.Services
|
||||||
@inject IBrowseService BrowseService
|
@inject IBrowseService BrowseService
|
||||||
|
|
||||||
@@ -89,9 +90,17 @@
|
|||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Manual node id:</span>
|
<span class="input-group-text">Manual node id:</span>
|
||||||
<input class="form-control" @bind="_manualNodeId" placeholder="ns=2;s=..." />
|
<input class="form-control" @bind="_manualNodeId" @bind:event="oninput" placeholder="nsu=<namespace-uri>;s=..." />
|
||||||
<button class="btn btn-outline-secondary" @onclick="UseManual" disabled="@string.IsNullOrWhiteSpace(_manualNodeId)">Use</button>
|
<button class="btn btn-outline-secondary" @onclick="UseManual" disabled="@string.IsNullOrWhiteSpace(_manualNodeId)">Use</button>
|
||||||
</div>
|
</div>
|
||||||
|
@if (!OpcUaReferenceForm.IsDurable(_manualNodeId))
|
||||||
|
{
|
||||||
|
<small class="text-warning-emphasis d-block mt-1" data-test="ns-index-warning">
|
||||||
|
This is a bare namespace-<em>index</em> binding. Indexes can silently re-point after a
|
||||||
|
server namespace change — prefer selecting from the tree above (it stores the durable
|
||||||
|
<code>nsu=<uri>;…</code> form).
|
||||||
|
</small>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<span class="me-auto text-muted">Selected: <code>@(_selectedNodeId ?? "(none)")</code></span>
|
<span class="me-auto text-muted">Selected: <code>@(_selectedNodeId ?? "(none)")</code></span>
|
||||||
|
|||||||
Reference in New Issue
Block a user