@using ZB.MOM.WW.OtOpcUa.Commons.Messages.Admin @using ZB.MOM.WW.OtOpcUa.Configuration.Enums
@if (InitialLoading) {

Loading deployment history…

} else { @if (RequestPending) {

Waiting for request acceptance…

} else if (RequestResultUnavailable) {

The request result could not be confirmed. Refresh status before retrying.

} else if (RequestOutcome == StartDeploymentOutcome.Accepted) {

@(Status is null or DeploymentStatus.Dispatching or DeploymentStatus.AwaitingApplyAcks ? "Request accepted — deployment in progress." : "Request accepted.")

} else if (RequestOutcome == StartDeploymentOutcome.NoChanges) {

No configuration changes; no new deployment was requested.

} else if (RequestOutcome == StartDeploymentOutcome.AnotherDeploymentInFlight) {

Another deployment is already in progress. This request was not started.

} else if (RequestOutcome == StartDeploymentOutcome.Rejected) {

Request rejected. @(string.IsNullOrEmpty(RequestMessage) ? "No reason was supplied." : "Open the request details below for the recorded reason.")

} @if (!HistoryAvailable) {

Deployment history is unavailable. Refresh to try again.

} else if (Status is not null) {
@ContextLabel: @(Status == DeploymentStatus.AwaitingApplyAcks ? "Awaiting acks" : RecordedLabel) @if (Status == DeploymentStatus.AwaitingApplyAcks) {
Awaiting apply acknowledgements
}
} else if (RequestOutcome == StartDeploymentOutcome.Accepted) {

The requested deployment status is not yet observed in the loaded history. Refresh status to check application progress.

} else {

No deployment history recorded.

} }
@* Full diagnostics are outside the live region: opening one must not announce an entire payload. *@ @if (!string.IsNullOrEmpty(RequestMessage)) {
} @if (!string.IsNullOrEmpty(FailureReason)) {
}
@code { /// The actual actor reply outcome, absent before a confirmed reply. [Parameter] public StartDeploymentOutcome? RequestOutcome { get; set; } /// True only while waiting for the request reply, not while application proceeds. [Parameter] public bool RequestPending { get; set; } /// A transport failure left the reply unknown; it does not establish server rejection. [Parameter] public bool RequestResultUnavailable { get; set; } /// Complete existing request metadata, disclosed outside the short live outcome. [Parameter] public string? RequestMessage { get; set; } /// The recorded status of the explicitly named loaded deployment. [Parameter] public DeploymentStatus? Status { get; set; } /// Complete recorded application failure metadata, including sealed degradation. [Parameter] public string? FailureReason { get; set; } /// The initial history query is still pending, distinct from a confirmed empty read. [Parameter] public bool InitialLoading { get; set; } /// Whether any history read has succeeded; false avoids inventing an empty history. [Parameter] public bool HistoryAvailable { get; set; } = true; /// Identifies whose recorded status is shown, e.g. the requested deployment. [Parameter] public string ContextLabel { get; set; } = "Most recent recorded deployment"; private string RecordedLabel => Status switch { DeploymentStatus.Dispatching => "Dispatching", DeploymentStatus.AwaitingApplyAcks => "Awaiting apply acknowledgements", DeploymentStatus.Sealed when !string.IsNullOrEmpty(FailureReason) => "Sealed (degraded)", DeploymentStatus.Sealed => "Sealed", DeploymentStatus.PartiallyFailed => "Partially failed", DeploymentStatus.TimedOut => "Timed out", _ => $"Unknown status ({(int?)Status})", }; private StatusState RecordedState => Status switch { DeploymentStatus.Sealed when string.IsNullOrEmpty(FailureReason) => StatusState.Ok, DeploymentStatus.Sealed => StatusState.Warn, DeploymentStatus.PartiallyFailed or DeploymentStatus.TimedOut => StatusState.Bad, DeploymentStatus.Dispatching or DeploymentStatus.AwaitingApplyAcks => StatusState.Info, _ => StatusState.Idle, }; }