Configuring Multiple Grids/Views
This page explains how to configure multiple tabular views in a monitor. The views are based on the same data set—the monitor’s configured index. However, they can be restricted using filters, such as logical rules or permissions.
To enable multiple views for a monitor, the configuration parameter ` function_gridMultipleViews ` must be set to ` true `.
All other functions are then controlled via the parameter function_gridMultipleViewsConfig.
Multiple Grids Configuration
The JSON object function_gridMultipleViewsConfig contains all settings for the display and content of the views.
At the top level of this object, you can control the general behavior of the tabs.
-
tabPosition
Determines the position of the tab bar (possible values:top(default),bottom,left,right) (optional). -
tabRotation
Defines the text alignment of the tabs, which is particularly helpful when they are placed on the side (possible values:default(automatic rotation),0(no rotation, default),1(90-degree clockwise rotation),2(90-degree counterclockwise rotation)) (optional). -
views
Contains the list of views.
See Defining View Properties -
defaultView
The initial view, which is always displayed first (optional).
See Set the initial view
Defining View Properties
The actual views are listed in the configuration as an array under the key views.
Each of these views can have the following properties:
-
id
Unique ID for the view.
Used to reference the view, e.g., in a dashboard widget. -
title
Used as the title in the tab or header (optional if iconCls is set).
Supports HTML, e.g.,"<span class='x-fal fa-info-circle' style='color:green'></span> INFO"for colored icons. -
iconCls
Adds a FontAwesome icon to the tab title (optional iftitleis set). -
filter
Restricts the monitoring data displayed in this specific view (optional). -
organisation
Restricts the visibility of this tab to specific organizations (optional). -
role
Restricts the visibility of this tab to specific roles (optional). -
right
Restricts the visibility of this tab to specific permissions (optional). -
margin
Defines the table’s margin, e.g.,10 10 10 10(optional). -
hideColumnHeaders
Hides the table column headers when the value is set totrue(optional).
Example of a configuration
{
"tabPosition": "left",
"tabRotation": "default",
"views": [
{
"filter": {
"bool": {
"must_not": [],
"should": [],
"must": [
{
"match_all": {}
}
]
}
},
"id": "allView",
"title": "Gesamtansicht",
"iconCls": "x-fal fa-list",
"margin": "10 10 10 10",
"hideColumnHeaders": false
},
{
"filter": {
"bool": {
"must_not": [
{
"match_all": {}
}
],
"should": [],
"must": []
}
},
"id": "noView",
"role": [
"bpcadmin"
],
"title": "Leer",
"hideColumnHeaders": true
}
]
}
Set the initial view
Unless otherwise specified, the first view is always displayed first.
To change this behavior, a default view (defaultView) must be specified within function_gridMultipleViewsConfig.
This can refer directly to a view ID or be controlled via the user’s organizations, roles, or permissions.
Referencing a View
{
(...),
"defaultView": "allView",
"views": [
{
"filter": {},
"id": "allView",
"title": "Gesamtansicht"
}
]
}
View Based on Organizations/Roles/Permissions
When organizations, roles, or permissions are specified, the system searches for the first entry that matches the current user. The following order is checked: Organizations → Roles → Permissions. If no matching entry is found, the first defined view is used.
{
"defaultView": {
"organisation": {
"orgX": "allView",
"orgY": "noView"
},
"role": {
"bpcadmin": "noView"
},
"right": {
"right1": "allView"
}
},
(...)
}