17 lines
743 B
Plaintext
17 lines
743 B
Plaintext
@* Thin adapter: maps MxGateway runtime state text → kit StatusPill state.
|
|
The bespoke .chip rendering now lives in the kit; only the app's domain
|
|
text→state vocabulary remains here. Call sites (<StatusBadge Text="..."/>) unchanged. *@
|
|
<StatusPill State="MapState(Text)">@Text</StatusPill>
|
|
@code {
|
|
[Parameter] public string? Text { get; set; }
|
|
|
|
private static StatusState MapState(string? text) => text switch
|
|
{
|
|
"Ready" or "Healthy" or "Active" => StatusState.Ok,
|
|
"Creating" or "StartingWorker" or "WaitingForPipe" or "InitializingWorker" or "Closing"
|
|
or "Stale" or "Degraded" => StatusState.Warn,
|
|
"Faulted" or "Unavailable" => StatusState.Bad,
|
|
_ => StatusState.Idle,
|
|
};
|
|
}
|