polish(client-ui): clearer Shelve/Unshelve success messages (review)
v2-ci / build (push) Failing after 44s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped

This commit is contained in:
Joseph Doherty
2026-06-16 18:38:58 -04:00
parent 4675bd6139
commit 1122dcdc57
@@ -209,7 +209,13 @@ public partial class AlarmsViewModel : ObservableObject
{
var result = await _service.ShelveAlarmAsync(alarm.ConditionNodeId, kind, durationSeconds);
if (Opc.Ua.StatusCode.IsGood(result))
return (true, $"Alarm {kind.ToString().ToLowerInvariant()} succeeded.");
return (true, kind switch
{
ShelveKind.OneShot => "Alarm shelved (one-shot).",
ShelveKind.Timed => $"Alarm shelved for {durationSeconds:0}s.",
ShelveKind.Unshelve => "Alarm unshelved.",
_ => "Shelve succeeded."
});
return (false, $"Shelve failed: {Helpers.StatusCodeFormatter.Format(result)}");
}
catch (Exception ex)