Events Filters Configuration
At the top right of the admin UI a set of predefined filters for events are available, displayed with a description and the amount of events currently matching that filter. By default, the following filters are visible:
Statistic | Description |
---|---|
Yesterday | All events with a start date sometime yesterday. |
Today | All events with a start date sometime today. |
Tomorrow | All events with a start date sometime tomorrow. |
Scheduled | All events with status Scheduled. |
Recording | All events with status Recording. |
Running | All events with status Running. |
Paused | All events with status Paused. |
Failed | All events with status Failed. |
Todo | All events with status Finished and open comments. |
Finished | All events with status Finished. |
Filters can be added or removed by editing the file etc/listproviders/adminui.stats.properties
. For example, the
Finished filter is defined as follows:
FINISHED=\
{"filters": [{"name": "status", "filter": "FILTERS.EVENTS.STATUS.LABEL", \
"value": "EVENTS.EVENTS.STATUS.PROCESSED"}],\
"description": "DASHBOARD.FINISHED",\
"order":12}
filters
defines a list containing at least one filter. Each filter is defined with- a
name
that defines the event property to filter on for the backend - a
filter
that defines the event property to filter on for the frontend - and the
value
that property is supposed to have
- a
description
contains the (possibly translated) description displayed in the UIorder
controls the order the filters are shown in the UI
Filters with relative time spans
For defining filters that contain a relative time span like yesterday or this week value
can contain an object
instead of a string. This object has to contain a relativeDateSpan
property which itself contains the fields from
,
to
and unit
. The unit
defines the unit of time that is being considered, e.g. hour, day, week, month or
year, while from
and to
specify the beginning and end of the time span by defining an integer offset relative to
the current hour, day, ... depending on the unit. So if the unit
is defined as day, 0 is the current day while
-1 is yesterday and 1 is tomorrow. If the unit is week instead, 0 is the current week while -1 is the
last and 1 the next week, and so on.
Every date/time unit below the one defined by unit
depends on whether the offset is defined by to
or from
. So if
the unit is day, from: -1 would be the beginning of yesterday (so the time is 00:00:00 in the user's timezone)
while to: -1 would be the end of yesterday (23:59:59). If the unit is week, from: -1 is the beginning of last
week (which day is the first day of the week is defined by the user's locale) and to: 0 would be the end of this
week, so a filter defined as
LAST_TWO_WEEKS=\
{"filters": [{"name": "startDate", "filter":"FILTERS.EVENTS.START_DATE",
"value": {"relativeDateSpan": {"from": "-2", "to": "0", "unit": "week"}}}],\
"description": "DATES.LAST_TWO_WEEKS",\
"order":15}
would cover all events whose start dates occur sometime during the last or current week.
This functionality is implemented with the library Moment.js by adding the values of to
or
from
to the current date and time while considering the defined unit. A list of valid unit strings can be found in
the documentation.
To be considered
Since only one unit can be defined per filter, time spans like the beginning of this month until tomorrow are currently not possible.
Be advised that a too big amount of filters can lead to filters disappearing from view depending on the width of the user's screen.