feat(grpc-data): H2 AdminUI HistoryRead checkbox, history limit fields, X0 banner
Connection/export/mapping editors offer HistoryRead (DataOperationAuthoring, never ahead of the validator) and the HistoryTimeoutMilliseconds / MaxConcurrentHistoryReads / MaxHistoryValuesPerPage / MaxHistoryResponseBytes / MaxHistoryAssemblyBytesPerRequest fields; an informational banner shows while a post-v1 bit is ticked (plan 4.3).
This commit is contained in:
+13
-2
@@ -73,6 +73,7 @@ else
|
||||
<label class="form-label" for="secret-ref">Secret reference</label><input id="secret-ref" class="form-control mb-2" placeholder="secret:data/…" @bind="c.SecretReference" /><div class="form-text">Reference only; never enter a key or secret value.</div>
|
||||
<fieldset><legend class="fs-6">Consumer nodes</legend>@foreach (var n in Nodes) { <label class="me-3"><input type="checkbox" checked="@c.ConsumerNodeIds.Contains(n.NodeId)" @onchange="e => Toggle(c.ConsumerNodeIds, n.NodeId, (bool)e.Value!)" /> @n.NodeId</label> }</fieldset>
|
||||
@Operations(c.AllowedOperations, v => c.AllowedOperations = v)
|
||||
<label class="form-label" for="history-timeout">History call timeout (ms)</label><input id="history-timeout" type="number" min="1" class="form-control mb-2" @bind="c.HistoryTimeoutMilliseconds" /><div class="form-text">Each remote HistoryRead call is bounded by the caller's remaining deadline and this.</div>
|
||||
<label><input type="checkbox" @bind="c.Enabled" /> Enabled in next deployment</label>
|
||||
@Actions(c, c.DataConnectionRowId != Guid.Empty)
|
||||
</div></section>
|
||||
@@ -86,6 +87,9 @@ else
|
||||
<label class="form-label" for="export-realm">Realm</label><select id="export-realm" class="form-select mb-2" @bind="e.Realm"><option value="@DataRealm.Raw">Raw</option><option value="@DataRealm.Uns">UNS</option></select>
|
||||
<label class="form-label" for="export-root">Local export root</label><select id="export-root" class="form-select mb-2" value="@(e.RootKind + "|" + e.RootEntityId)" @onchange="args => SetExportRoot(e, args.Value?.ToString())"><option value="">Choose a root</option>@foreach (var p in ExportRoots(e.Realm)) { <option value="@p.Value">@p.Label</option> }</select>
|
||||
@Operations(e.AllowedOperations, v => e.AllowedOperations = v)
|
||||
<label class="form-label" for="export-history-reads">Concurrent history reads per peer</label><input id="export-history-reads" type="number" min="1" class="form-control mb-2" @bind="e.MaxConcurrentHistoryReads" />
|
||||
<label class="form-label" for="export-history-page">History values per page</label><input id="export-history-page" type="number" min="1" class="form-control mb-2" @bind="e.MaxHistoryValuesPerPage" />
|
||||
<label class="form-label" for="export-history-bytes">History response bytes</label><input id="export-history-bytes" type="number" min="1" class="form-control mb-2" @bind="e.MaxHistoryResponseBytes" /><div class="form-text">Larger answers are sent in bounded chunks.</div>
|
||||
<label><input type="checkbox" @bind="e.Enabled" /> Enabled in next deployment</label>@Actions(e, e.DataExportRowId != Guid.Empty)
|
||||
</div></section>
|
||||
}
|
||||
@@ -103,6 +107,7 @@ else
|
||||
<label class="form-label" for="identifier">Remote canonical identifier</label><input id="identifier" class="form-control mb-2" @bind="m.RemoteIdentifier" />
|
||||
<fieldset><legend class="fs-6">Consumer nodes</legend>@foreach (var n in Nodes) { <label class="me-3"><input type="checkbox" checked="@m.ConsumerNodeIds.Contains(n.NodeId)" @onchange="e => Toggle(m.ConsumerNodeIds, n.NodeId, (bool)e.Value!)" /> @n.NodeId</label> }</fieldset>
|
||||
@Operations(m.AllowedOperations, v => m.AllowedOperations = v)
|
||||
<label class="form-label" for="mapping-history-bytes">History assembly bytes per request</label><input id="mapping-history-bytes" type="number" min="1" class="form-control mb-2" @bind="m.MaxHistoryAssemblyBytesPerRequest" />
|
||||
<div><label><input type="checkbox" @bind="m.WriteThrough" /> Allow write-through</label></div><label><input type="checkbox" @bind="m.Enabled" /> Enabled in next deployment</label>@Actions(m, m.RemoteNamespaceMappingRowId != Guid.Empty)
|
||||
</div></section>
|
||||
}
|
||||
@@ -226,10 +231,16 @@ else
|
||||
private RenderFragment Operations(DataOperations current, Action<DataOperations> set) => builder =>
|
||||
{
|
||||
builder.OpenElement(0, "fieldset"); builder.OpenElement(1, "legend"); builder.AddAttribute(2, "class", "fs-6"); builder.AddContent(3, "Allowed operations"); builder.CloseElement();
|
||||
foreach (var bit in new[] { DataOperations.Browse, DataOperations.Metadata, DataOperations.Read, DataOperations.Subscribe, DataOperations.Write })
|
||||
foreach (var bit in DataOperationAuthoring.AuthorableOperations)
|
||||
{
|
||||
builder.OpenElement(4, "label"); builder.AddAttribute(5, "class", "me-3"); builder.OpenElement(6, "input"); builder.AddAttribute(7, "type", "checkbox"); builder.AddAttribute(8, "checked", current.HasFlag(bit));
|
||||
builder.AddAttribute(9, "onchange", EventCallback.Factory.Create<ChangeEventArgs>(this, args => set((bool)args.Value! ? current | bit : current & ~bit))); builder.CloseElement(); builder.AddContent(10, " " + bit); builder.CloseElement();
|
||||
builder.AddAttribute(9, "onchange", EventCallback.Factory.Create<ChangeEventArgs>(this, args => set((bool)args.Value! ? current | bit : current & ~bit))); builder.CloseElement(); builder.AddContent(10, " " + DataOperationAuthoring.Label(bit)); builder.CloseElement();
|
||||
}
|
||||
if (DataOperationAuthoring.FeatureBitBanner(current) is { } banner)
|
||||
{
|
||||
// Plan §4.3: the X0-everywhere rule is procedural, so the editor reminds whenever a post-v1 bit is ticked.
|
||||
builder.OpenElement(11, "div"); builder.AddAttribute(12, "class", "notice mt-2"); builder.AddAttribute(13, "role", "note");
|
||||
builder.AddContent(14, banner); builder.CloseElement();
|
||||
}
|
||||
builder.CloseElement();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user