Unify gateway styling and preserve identity through recovery
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
@namespace MxUiCanary.Components
|
||||
@using ZB.MOM.WW.MxGateway.Server.Dashboard
|
||||
@page "/fault-identity-fixture"
|
||||
@implements IDisposable
|
||||
@inject IJSRuntime JS
|
||||
<ThemeShell Product="Synthetic fault identity"><ChildContent>
|
||||
<h1>Fault identity fixture</h1>
|
||||
<button type="button" class="btn btn-primary" @onclick="ArmAsync">Arm synthetic next snapshot</button>
|
||||
<p role="status">Snapshot @_round</p>
|
||||
<section data-fault-mode="compact"><FaultList Faults="_faults" Compact="true" /></section>
|
||||
<section data-fault-mode="table"><FaultList Faults="_faults" /></section>
|
||||
</ChildContent></ThemeShell>
|
||||
@code {
|
||||
private int _round;private bool _disposed;
|
||||
private IReadOnlyList<DashboardFaultSummary> _faults=[Fault("session-a"),Fault("session-b")];
|
||||
private static DashboardFaultSummary Fault(string id)=>new("Worker",id,123,"Faulted","Synthetic fault for "+id+" "+new string('x',300),DateTimeOffset.UnixEpoch);
|
||||
private async Task ArmAsync(){await Task.Delay(1200);if(_disposed)return;_round++;_faults=[Fault("session-c"),Fault("session-b"),Fault("session-a") with{ObservedAt=DateTimeOffset.UnixEpoch.AddMinutes(1)}];}
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");}
|
||||
public void Dispose()=>_disposed=true;
|
||||
}
|
||||
Reference in New Issue
Block a user