27 lines
2.1 KiB
Plaintext
27 lines
2.1 KiB
Plaintext
@page "/presentation"
|
|
@layout ZB.MOM.WW.ScadaBridge.CentralUI.Components.Layout.MainLayout
|
|
@using ZB.MOM.WW.ScadaBridge.Commons.Types.Debugging
|
|
@using ZB.MOM.WW.ScadaBridge.ScriptAnalysis
|
|
<h1>Local flow and table presentation samples</h1>
|
|
<p>Actual flow/list/table components, synthetic outcomes and long values only. No live/replay command or backend is called.</p>
|
|
<section id="utility-samples">
|
|
<span class="text-success">Successful sample</span> · <span class="text-warning">Warning sample</span> ·
|
|
<span class="text-danger">Failure sample</span> · <span class="text-info">Information sample</span> ·
|
|
<span class="text-muted">Muted sample</span> · <span class="text-secondary">Secondary sample</span>
|
|
</section>
|
|
<FlowGraphView Graph="_graph" Predicted="_prediction" />
|
|
<FlowTraceList Graph="_graph" />
|
|
<DataTable TableLabel="Synthetic records" TItem="string" Items="_items" SearchFilter="@((item, search) => item.Contains(search, StringComparison.OrdinalIgnoreCase))">
|
|
<HeaderContent><th scope="col">Synthetic identifier</th><th scope="col">Details</th></HeaderContent>
|
|
<RowContent Context="item"><tr><th scope="row">@item</th><td><span class="mono text-nowrap">@LongValue</span></td></tr></RowContent>
|
|
</DataTable>
|
|
@code {
|
|
private static readonly string LongValue = "synthetic.identifier." + new string('x', 200);
|
|
private readonly string[] _items = ["Plant A", "Plant B"];
|
|
private static readonly FlowStep[] Steps = Enum.GetValues<FlowStepOutcome>().Select((outcome, i) => new FlowStep(Guid.NewGuid(), null, null,
|
|
FlowStepKind.ApiCall, FlowLane.Site, "Synthetic " + outcome, "Illustrative outcome", DateTimeOffset.UnixEpoch.AddSeconds(i), i * 10, outcome,
|
|
null, null, null, "local", null, null, null, null)).ToArray();
|
|
private readonly PredictedFlow _prediction = new([new PredictedNode("ghost", FlowStepKind.ScriptRun, FlowLane.Site, "Synthetic predicted-only branch", false, "Not observed in this synthetic run")], []);
|
|
private readonly FlowGraph _graph = new(Steps, Steps.Zip(Steps.Skip(1)).Select(pair => new FlowEdge(pair.First.EventId, pair.Second.EventId, false, false)).ToArray(), false, false);
|
|
}
|