Alarm History Table

../../../../_images/alarm-history-table-hierarchy-all.png ../../../../_images/alarm-history-table-hierarchy-grouped.png

This table displays all the different states of every alarm life cycle that match a given filter and displays columns based on view.

The table can present the alarms in two different hierarchies:

  • All: each state of an alarm is shown as a full alarm on the table

  • Grouped: each row on the table represent the last state of an alarm. Expanding the row displays every state of this alarm inside a separated sub-table

Capabilities

Generic features for tables

Capability

Support

Comment

Customize menu

Supported feature

See menus and toolbar

Choice data to display (filter)

Supported feature

Filter can be used to choose the data displayed to a user. See menus and toolbar

Define a default filter by table

Supported feature

A unique default filter can be set for each view. See Default filter

Define a default filter by user or group of user

Not supported feature

The filter cannot be set by user or group of user, only by dashboard. But the local storage can be used to store the filter for a user.

Set views or filter by URL parameters

Supported feature

The filter can be set by URL parameters, which allows creating links from other widgets or dashboards. See URL parameters

List of configuration files

Filename

Short description

Format

Link to documentation

dashboard.view#AlarmHistoryTableWidget

Defines the AlarmHistoryTableWidget widget global settings

json

Link

List of examples

Short description

Link to documentation

Create menu for Alarm History Table sub-table

Link

Local storage

When local storage is activated, the following parameters are stored:

  • Columns width

  • Column states (shown or not)

  • Show/hide column names

  • Show/hide summary

  • Show/hide filter

  • Current filter

Grouped hierarchy and sub-table

When the table is set on the Grouped hierarchy, some aspect behave differently depending on the table configuration.

Expanding the row

By either double-click or using the arrow icon on the start, you can expand the row and various information, depending on the selected view configuration or on the current hierarchy.

The grouped hierarchy displays a sub-table when you expand the row. That second table show every state of the alarm as individual alarms. Only one row can be expanded at a time.

Filters behavior

The alarms displayed on the table represent the last state of the alarm. You can configure the filters to behave in two different ways :

  • Filters are only applied to the last state of the alarm: a filter, for example the alarm must contains the tag Fire, is only applied on the last state of the alarm. The alarm will be present only if his last state has the tag. The fact that the alarm may had the tag at one point in time doesn’t matter in this scenario

  • Filters are applied on the full historic of the alarm: the same filter will match an alarm if, at any point in time, the tag is/was present. The fact that the alarm may not have the tag anymore doesn’t matter in this scenario

With either option, the alarm displayed in the table is always the last state of the alarm.

This can be configured using the filtersAppliedToTheFullHistory setting of the table.

Share filters between the main table and the sub-table

You can decide to either share every filter applied to the main table and applied them to the sub-table as well, or otherwise you can decide to make the sub-table completely independent from the main one.

On the first case, the sub-table will not allows to define additional filters. On the second case, you can freely define filters for each column that will only affect the sub-table.

This can be configured using the shareFiltersBetweenTables setting of the table.

Sub-table widget context

To access a widget context, you need to know the widget id. For any widget you define in your configuration, you can choose yourself the id. For the automatically generated sub-table, the id is automatically generated too.

The id of the sub-table is generated by combining the main table id and the group id, that correspond to the row you expand. The group id is fed when the sub-table is generated.

You can access the widget context using:

osp.widgets("main-table-id"+'-'+${groupAlarmId})

Journal

Alarm journals are accessible but, in opposition to the Alarm Table widget, journals can’t be modified. You can’t add an entry to any alarm journal from an historic table, no matter the current state of the alarm.

Toolbar

The alarm toolbar contains different actions:

Refresh

On the refresh icon click, you can refresh manually the table.

Hierarchy

Two buttons allow you to switch between the two hierarchies available.

  • All: each state of an alarm is shown as a full alarm on the table

  • Grouped: each row on the table represent the last state of an alarm. Expanding the row displays every state of this alarm inside a separated table

Journal

You can open the journal when one or more alarms are selected.

Change table structure

Three options can change the structure of the table:

  • Show/hide column: display the names of the columns at the top of the table, as well as an option to select/unselect all the rows.

  • Show/hide filter: display filters options for each column, depending on the type of value.

  • Show/hide summary: display a summary at the bottom of the table (ie: rows, count, sum of a column,…).

Export

The export button can export multiples rows into an excel file. Either export every row or export only the ones selected.

Show/Hide column

You can show or hide a particular column with the Show Column Chooser. These will also change depending on the view.

Clear filters

Remove all current filters and reset the default ones.

URL parameters

This widget handle URL parameters. These are the available parameters:

  • filter: change the active filter (ItemId)

  • view: change the active view (ItemId)

  • search: set the search term (string)

  • currentPage: current page (number)

Set disableUrlHistory to true in the widget settings to stop this widget reading and writing these parameters. See Disabling the parameters.

Widget context

Operations

Alarm live/history table support following operation:

  • updateFilter(id: string) with filter id in parameter updates the table filter

  • updateView(id: string) with view id in parameter updates the table view

  • appendSort(columnName: string, direction: AlarmViewSortDirection) with column name and direction (asc or desc, emptied toggles it) in parameter appends to the current sorting

  • applySort(columnName: string, direction: AlarmViewSortDirection) with column name and direction (asc or desc, emptied toggles it) in parameter overrides the current sorting

  • clearSort(columnName: string) with column name in parameter clears the column sorting

  • clearSorts() clears the table sorting

  • appendFilter(columnName: string, value?: string, operation?: string) with column name, value (empty clears filter) and operation (see below) in parameters appends to the current filtering

  • applyFilter(columnName: string, value?: string, operation?: string) with column name, value (empty clears filter) and operation (see below) in parameters overrides to the current filtering

  • clearFilter(columnName: string) clears filter for given column name

  • clearFilters() clears all filters

  • getFilters() retrieve all the filter currently applied

  • setFilters(filters: Filter[]) set the filters by directly passing a list of filters. Could be used in tandem with getFilters() to easily copy filters from one table to another

  • applySearch(value?: string) applies table search (among all fields) with value parameters (empty clears it)

  • clearSearch() clears table search

Built-in filter operations are:

  • contains (default)

  • notContains

  • startsWith

  • endsWith

  • equal

  • notEqual

  • greaterThan

  • greaterThanOrEqual

  • lessThan

  • lessThanOrEqual

  • between

  • dayEqual

Context

The widget context can be access from menus in order to fetch these different values from the alarm table. Alarms objects are dependant on view used.

  • alarms

    • all: all rows (list)

    • clicked: clicked row (object)

    • selected: selected rows (list)

    • column: column with name and title (object)

    • value: value of the cell

  • view: current view id of the table

  • filter: current filter id of the table

  • columnFilter: current filters on the table (list)

  • columnOrder: list of all columns names in order

  • hiddenColumnNames: list of hidden columns

  • groupAlarmId: id of the expanded alarm (for a sub-table only)