AlarmScreenNg  0.9.5
Filter View editor

The panel for editing filter views is opened when "Edit Filter Views..." is selected from the menu.

The panel may look rather complex, but it consists of several parts, each of them relatively simple and clear:

The Filter View editor panel

Let us cover the numbered areas of the panel one by one, as it should make the logic of the entire panel clear.

1. Select/create/rename

Several configurations of the filter view area can be created. The upper part of the panel is used to select previously created configurations for editing, or to create a new configuration:

Select/create configuration for editing

The name of the selected filter view configuration can be changed using the text field located next to the New button.

The Delete button on the right can be used to delete the selected filter view configuration.

2. Text templates for items

The rule for building the strings displayed in items (widgets) of the filter view, is configure per-view. The string may contain the name of filter, plus some statistics, like the total number of alarms matching the filter or the number of unacknowledged alarms.

The second area of the Filter View editor is used to edit the text templates used to build item and tooltip texts for all items in the filter view:

Edit text templates for filter view items

Both format strings are built using the same rules. The template strings contains two types of elements:

  • 'Literal' characters that are copied to the resulting string, and
  • filter statistics names that will be substituted with the corresponding values calculated for the filter.

The following names are supported:

Name Description
%{name} The name of filter
%{total} Number of alarms matching this filter
%{totalBg} Background color of 'the most severe' alarm matching this filter
%{totalFg} Foreground color of 'the most severe' alarm matching this filter
%{totalTime} Time of the latest alarm matching this filter
%{came} Total number of CAME alarms matching this filter
%{cameBg} Background color of 'the most severe' CAME alarm matching this filter
%{cameFg} Foreground color of 'the most severe' CAME alarm matching this filter
%{cameTime} Time of the latest CAME alarm matching this filter
%{went} Total number of WENT alarms matching this filter
%{wentBg} Background color of 'the most severe' WENT alarm matching this filter
%{wentFg} Foreground color of 'the most severe' WENT alarm matching this filter
%{wentTime} Time of the latest WENT alarm matching this filter
%{notAck} Total number of not acknowledged alarms matching this filter
%{notAckBg} Background color of 'the most severe' not acknowledged alarm matching this filter
%{notAckFg} Foreground color of 'the most severe' not acknowledged alarm matching this filter
%{notAckTime} Time of the latest not acknowledged alarm matching this filter
%{new} Total number of 'new' alarms matching this filter. An alarm is 'new' if its direction is CAME and its comment is empty.
%{newBg} Background color of 'the most severe' new alarm matching this filter
%{newFg} Foreground color of 'the most severe' new alarm matching this filter
%{newTime} Time of the latest new alarm matching this filter

'The most severe' alarm, mentioned in the table above, is found using the following rules (applied in this order):

  • Alarms with higher priority are more severe than alarms with lower priority
  • CAME alarms are more severe than WENT alarms
  • Not acknowledged alarms are more severe than acknowledged alarms

If more than one 'most severe' alarm is found after applying all the rules, then one of them is selected randomly to be 'the most severe' alarm.

The combo box on the right side of this area acts as a helper for selecting one of the supported names: selecting an item in the combo box copies its text to the clipboard, and then it can be inserted to into the text field by using Ctrl+V.

Here are some examples of format strings:

  • Simple text with the filter name followed by a comma and the total number of alarms matching the filter:
    %{name}: %{total}
    This template will be rendered as (for a filter named 'na62dcs01', with 1234 alarms matching the filter):
    na62dcs01: 1234
  • Another simple example: in addition to the total number of matching alarms, we want to also display the number of unacknowledged alarms matching the filter:
    %{name}: %{total} (%{notAck})
    This template will be rendered as (filter from the previous example, there are 456 unacknowledged alarms):
    na62dcs01: 1234 (456)
  • A more advanced example: rich text formatting is also supported. We want the strings to be rendered as in the previous example, but the number of unacknowledged alarms should appear in a bold font on a background corresponding to the background color of the most severe unacknowledged alarm:
    <html><head/><body><p align="center">%{name}: %{total} (<span style="font-weight:600;color:%{notAckFg};background-color:%{notAckBg}">%{notAck}</span>)</p></body></html>
    This template will result in the following appearance of the items in the Filter View:
    Rich text example

3. Available filter names

The table in the area #3 of the filter view editor lists the names of all filters saved in the current project. Note that all filters are shown in the table, not only the filters saved by the current user:

List of available filters

Filters can be dragged from the table to the content table in order to build the contents the filter view.

4. Appearance

The controls in the area #4 of the filter view editor are used to customize the appearance of both the filter view area and items in it:

Customizing the appearance of the view and items

The controls in this area of panel are grouped into two columns:

  • The 'Frame' column is used to configure the appearance for the whole Filter View.
  • The 'Item (filter)' column is used to customize the appearance of individual items (filters) in the Filter View.

The results of the changes in this area can be immediately observed in the area #5 of the Filter View editor. Most of the settings fall into the category should be self-explanatory and achieving the desired look & feel is easy thanks to the preview.

Two additional widgets are located in the lower right corner in the picture above and allow to select sources of colors used in the items (see the table).

5. Content and preview

The area #5 of the filter view editor is used to build the contents of the filter view by adding and moving individual filters.

Building the filter view

This area contains three main widgets:

  • The radio box in the upper left corner is used to configure the orientation of the Filter View (horizontal/vertical).
    The orientation should be selected according to the planned position of the Filter View in the AS EWO:
    • Horizontal orientation should be used if it will be placed above or below the alarm table.
    • Vertical orientation should be used if it will be placed on the left or right of the alarm table.
  • The table where individual filters are placed according to the desired position of these filters in the resulting Filter View.
    • Cells with yellow background are already occupied and the name of filter is displayed in them.
    • Cells with green background are 'free' and filters can be placed in them.
    The main editing method of the Filter View content is based on drag-and-drop: dragging the filters from the list of available filters, or dragging filters between the cells of this table.
  • The preview area where the user can see how the resulting Filter View will look like. This preview area is not connected to any alarms, so all counters are set to 0 and default colors are used.