Alarms and status

Alarm Banner <smart-alarm-banner>

AlarmBanner shows the alarms an operator should deal with next.

<smart-alarm-banner> · 6 properties, 2 methods, 2 events · source/modules/smart.alarmbanner.js

Usage in Blazor

The Razor component is <AlarmBanner> in Smart.Blazor.Industrial: every property is a parameter in PascalCase, every event an EventCallback<Event> named On<Event> whose ev["Detail"] is the typed detail class, and the methods are called on the @ref. String choices are enums. In a Blazor Web App (.NET 8 and later) the page needs an interactive render mode, for example @rendermode InteractiveServer; a statically rendered component stays empty.

@using Smart.Blazor.Industrial
@* .NET 8 and later: an interactive render mode, on the page or for the whole app *@
@rendermode InteractiveServer

<AlarmBanner @ref="alarmBanner" ShowAcknowledge="true"
    OnAcknowledge="OnAcknowledge" />

@code {
    AlarmBanner alarmBanner;

    void OnAcknowledge(Event ev)
    {
        AlarmBannerAcknowledgeEventDetail detail = ev["Detail"];
    }

    // void AcknowledgeAll()
    void Call() => alarmBanner.AcknowledgeAll();
}

Properties

ParameterType, defaultDescription
AcknowledgeLabel
acknowledgeLabel
stringSets or retrieves the caption of the acknowledge button. It is empty by default, so the caption comes from the acknowledge message ("Ack" in English) and follows the locale. A value set here takes precedence over the message.
Alarms
alarms
IEnumerable<object>Sets or retrieves the alarms. Each entry is an object with: id - the identifier of the alarm, returned in the events; tag - the instrument or point tag; message - the alarm text; priority - a number, or a number written as text, as in ISA-18.2: 0 and 1 critical, 2 warning, 3 and above advisory; severity - critical, warning or advisory (any case), which overrides the priority mapping and, for a record without a priority, sets its place in the order; timestamp - a Date, epoch milliseconds or a value Date can parse, shown as the time, or the date and time when it is not today; acknowledged - whether an operator has acknowledged the alarm; active - false once the condition has cleared (absent means active), so an unacknowledged alarm with active false is shown as returned to normal; shelvedUntil, suppressed, outOfService - an alarm shelved into the future, suppressed or out of service is not shown. Flags written as the text "false", "0", "no" or "off" are false. Assign a new array to update the component, or call redraw after modifying the array in place; an array that is deep-equal to the current one does not trigger a redraw.
EmptyMessage
emptyMessage
stringSets or retrieves the text shown when there are no alarms to display. It is empty by default, so the text comes from the empty message ("No active alarms" in English) and follows the locale. A value set here takes precedence over the message.
MaxVisible
maxVisible
int
1
Sets or retrieves the number of alarms shown at once. One row is usual for an operator screen; a larger stack suits a wall display that covers several areas.
ShowAcknowledge
showAcknowledge
bool
true
Sets or retrieves whether an acknowledge button is shown on unacknowledged alarms. The default is true. Boolean attributes are presence-based, so show-acknowledge="false" in markup enables the button; set the property from script to disable it.
ShowTimestamps
showTimestamps
bool
true
Sets or retrieves whether the alarm timestamp is rendered. Same attribute caveat as showAcknowledge: set the property from script to turn it off.

Methods

MethodDescription
void AcknowledgeAll()Raises the acknowledge event once for every unacknowledged alarm the banner would show, including alarms that returned to normal unacknowledged; shelved, suppressed and out-of-service alarms are left alone. Nothing is raised while the banner is disabled. The component does not change the alarms; the application applies the acknowledgements and returns an updated list.
Task<object> VisibleAlarms()Returns the alarms the banner is currently showing, in the order shown: active unacknowledged, returned to normal unacknowledged, acknowledged; then priority, severity and age.

Events

Every event is an EventCallback<Event>; Event is a dictionary and ev["Detail"] converts to the detail class named under the event.

EventDescription and detail
OnAcknowledge
acknowledge
AlarmBannerAcknowledgeEventDetail
This event is triggered when an operator acknowledges an alarm, either from its acknowledge button or through acknowledgeAll. One press raises one event: the repeats of a held Enter or Space are ignored, and the same alarm acknowledged again within 600 ms (a double click) is not raised twice.
Alarm dynamic The alarm being acknowledged.
OnAlarmClick
alarmClick
AlarmBannerAlarmClickEventDetail
This event is triggered when an alarm row is clicked anywhere other than its acknowledge button, typically used to open the alarm's detail.
Alarm dynamic The alarm that was clicked.

CSS variables

The component declares 2 CSS variables; the CSS page shows how to set them.

--smart-alarm-banner-blink-duration --smart-alarm-banner-row-gap