a038363e74
ci / windows (push) Waiting to run
ci / live-mxaccess (push) Waiting to run
ci / windows (pull_request) Waiting to run
ci / live-mxaccess (pull_request) Waiting to run
ci / portable (push) Failing after 44s
ci / java (push) Failing after 50s
ci / java (pull_request) Failing after 37s
ci / portable (pull_request) Failing after 55s
Gateway-side follow-up to the shared auth-lib expiry core (delivered via G-2): - apikey create-key gains optional --expires — absolute ISO-8601 UTC or relative <N>d/<N>h from now; omitted means non-expiring (opt-in, unchanged default). Threaded ApiKeyAdminCommand -> parser -> runner into the library's CreateKeyAsync(..., expiresUtc, ...). list-keys shows an expiry column and an active/expired/revoked status. - Dashboard API Keys page surfaces expiry: an Expires column (Never when unset) and a status badge reading Expired (red) / Expiring (<=7d, amber) / Revoked / Active. DashboardApiKeySummary.ExpiresUtc projected in DashboardSnapshotService; StatusBadge maps the new states. Tests: parser (absolute/relative/invalid/none) + end-to-end past-expiry rejection through the live verifier; dashboard summary suite green. Docs: Authentication.md (verification-flow expiry step, CLI table + examples, dashboard badge). Closes the tracked SEC-10 polish (SEC-10 core was already Done).
17 lines
770 B
Plaintext
17 lines
770 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" or "Expiring" => StatusState.Warn,
|
|
"Faulted" or "Unavailable" or "Expired" => StatusState.Bad,
|
|
_ => StatusState.Idle,
|
|
};
|
|
}
|