Monitor deeplink
The BPC supports the use of deeplinks in the monitor module to restore a specific monitor state. The configured state of the monitor module can be mapped by a JSON object and attached directly to the URL.
This page only explains how the state JSON object can be constructed and attached.
How the deeplink is constructed is explained on the page Routing/Deeplinks page.
Generation of the state object
There are two ways to generate a state object so that it does not have to be configured manually:
-
Monitor setting "Navigation via states" (
gui_stateBrowsing) activate. This allows the state object to be copied directly from the URL, modified if necessary and Base64 encoded before the deep link is forwarded. -
Share plugin: This creates a deeplink that shows the current monitor status.
Structure of the URL
The status object is added at the end of the URL, after the monitor ID and after //.
Example:
https://COMPANY.COM/?#&/module/monitor/my-monitor//{"state": {}}
|
The status object should be Base64-encoded to avoid encoding and web browser problems. |
Structure of the state object
The state object contains the root attribute state.
The state attribute contains all information about the desired monitor status.
The following attributes are available under state:
-
searchQuery
The value in the full text search. -
activeView
Initial view to be displayed.
IfactiveViewis configured, this view must also have a configuration underviews. -
views
Contains the states of the monitor views.
The state of a monitor view includes the column configuration and the state of the store (i.e. sorter and filter).
The following is an example of how the entire state object can look in the URL:
{
"state": {
"searchQuery": "foo",
"activeView": "my-monitor_mainGrid",
"views": {
"my-monitor_mainGrid": {
"columns": [
{ "id": "firstColumn", "hidden": false, "width": 200 },
{ "id": "secondColumn", "hidden": true, "width": 200 },
{ "id": "timestamp", "hidden": false, "width": 200 }
],
"storeState": {
"sorters": [
{
"root": null,
"property": "timestamp",
"direction": "DESC",
"id": "timestamp"
}
],
"filters": [
{
"value": "foo",
"property": "firstColumn",
"columnId": "firstColumn",
"source": "raw",
"operator": "=*",
"invert": false
}
]
}
}
}
}
}
A minimum configuration of the state object is storeState, which can also be set alone and thus sets the filters and sorters for the current view.
{
"storeState": {
"sorters": [
{
"root": null,
"property": "timestamp",
"direction": "DESC",
"id": "timestamp"
}
],
"filters": [
{
"value": "foo",
"property": "firstColumn",
"columnId": "firstColumn",
"source": "raw",
"operator": "=*",
"invert": false
}
]
}
}