Filters

Capabilities

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

Concept

There are two kinds of tables on OnSphere Collection Table and Alarm Table, each of them permits to display some information in rows and columns. The alarms table is dedicated to display alarms with a lot of mechanisms linked to this kind of feature. The collection tables permit to display any kind of data in a table.

Filter

A filter is a kind of rule that permits to choose data to display on a table.

Filters

Default filter

Limit the filters for a table

Concept

By default all the filters available for a kind of tables and for the user are showed in the filter dropdown. But it’s possible to limit the filters available for a table.

Use-case

  • Create multiples collections or alarms tables with different usage, therefore different filters

  • Have specific filter by kind of user.

Usage

There are two ways to limit the filters available for a table:

  • Limit the rights Define rights to be able to use a filter the read rights must be set for the user.

  • Limit the filters available for a table with the property includeFilters and excludeFilters.

Includes/excludes

The filter to include in the table. Theses filters can be filtered by using the properties includeFilters and excludeFilters. If you set both, it will first remove all filters not present in the include list and then remove, from that list, the filters presents in the exclude list.

The wildcard “*” can be used to replace any subpath.

“root.alarms.*” will match any direct filter children of “alarms” but excludes “root.alarms” itself.

Views

Views define the structure of the table. It defines the different columns with options to filter or sort the content of the table.

The column views options are (in view):

  • formatter: specifies the date format (see https://day.js.org/docs/en/display/format). Used by TIMESTAMP render.

  • formatterExport: specifies the date Excel format export. Used by TIMESTAMP render when exporting.

  • disableTimezoneExport: disables user timezone usage when exporting to Excel format. The date will be displayed in UTC. Used by TIMESTAMP render when exporting.

  • schemaId: specifies the schema ID to use (ie. root.collection.schema) to query. Used by COLLECTION render.

  • format: specifies the property to display from schema ID. Used by COLLECTION render.

  • depth: specifies the depth at which to get nodes from. Used by COLLECTION render.

  • dependsOn: change the behavior of a column filter based on the content of another filter. Used by COLLECTION render. Can be used with schemaId and depth to filter a query results based on another filter we made before.

  • search: defines how the column filter searches the entries it offers, as {"method": "<local or remote>", "fields": ["<field-name>", ...]}. Used by COLLECTION render. With local, the default, the front-end filters the entries it already received. With remote, the term is sent to the collections module and matched against fields. A query returns at most 1000 entries, so remote is the only way to reach them all in a larger collection. The equivalent options on the form component are named searchMethod and searchTerms.

  • samePage: specifies whether to open URL in the same page or not (boolean value). Used by URL render.

JSON render

A column can use the JSON render to display a JSON value (object, array or scalar) held by a cell.

In the table, objects and arrays are shown as a compact summary ({...} / [...] with the number of items). Clicking the cell opens a modal displaying the value with the same collapsible, theme-aware viewer as the Json widget. Scalar values are displayed directly in the cell.

A JSON column is filterable with a contains / not contains predicate, matched against the JSON content of the cell.

The JSON render column options are:

  • display: viewer display options used in the modal (collapsed, displayObjectSize, objectSortKeys, keyName, …). See the Json widget display options.

  • style: viewer appearance in the modal, as a map of CSS variables with optional light / dark overrides. See the Json widget appearance.

{
  "name": "JSON",
  "render": "JSON",
  "position": 8,
  "options": {
    "display": {
      "displayDataTypes": true,
      "displayObjectSize": true,
      "keyName": "additionalData.json"
    },
    "style": {
      "--w-rjv-font-family": "\"Roboto Mono\", monospace",
      "light": {"--w-rjv-type-string-color": "#1b5e20"},
      "dark": {"--w-rjv-type-string-color": "#a5d6a7"}
    }
  }
}