@page "/scripted-alarms" @attribute [Microsoft.AspNetCore.Authorization.Authorize] @rendermode RenderMode.InteractiveServer @using Microsoft.EntityFrameworkCore @using ZB.MOM.WW.OtOpcUa.Configuration @using ZB.MOM.WW.OtOpcUa.Configuration.Entities @inject IDbContextFactory DbFactory

Scripted alarms

New scripted alarm
@if (_rows is null) {

Loading…

} else {
Scripted alarms watch a predicate script per equipment instance and fire OPC UA alarms when the predicate transitions true. HistorizeToAveva routes events through the Wonderware historian sidecar (F11) when enabled.
@_rows.Count scripted alarm@(_rows.Count == 1 ? "" : "s")
@if (_rows.Count == 0) {
No scripted alarms defined.
} else {
@foreach (var a in _rows) { }
ScriptedAlarmId Name Equipment Type Severity Predicate Flags Status
@a.ScriptedAlarmId @a.Name @a.EquipmentId @a.AlarmType @a.Severity @a.PredicateScriptId @if (a.HistorizeToAveva) { historize } @if (a.Retain) { retain } @if (a.Enabled) { Enabled } else { Disabled } Edit
}
} @code { private List? _rows; protected override async Task OnInitializedAsync() { await using var db = await DbFactory.CreateDbContextAsync(); _rows = await db.ScriptedAlarms.AsNoTracking() .OrderBy(a => a.Name) .ToListAsync(); } }