Search folders
This example shows how to use the dashboards folders in order to change the display behaviour of the dashboard search bar.
Configure dashboard folders using the
folderproperty indashboard.webfiles.Organize dashboards in a hierarchy of nested folders.
Navigate through folder levels in the OnSphere search bar.
Control which folder a dashboard belongs to at creation time.
git checkout origin/osp-web-configuration .
git checkout origin/example-dashboard-search-folders .
Steps
1. Create the dashboards with their folders
When creating a new dashboard, in the dashboard.web configuration file, you can specify the folders the dashboard belongs to.
This example contains the 6 following dashboards:
AlarmWay: Folder
Site: folder
AlarmWay - Fribourg: Dashboard, with folder “AlarmWay/Site”AlarmWay - Geneva: Dashboard, with folder “AlarmWay/Site”AlarmWay - Lausanne: Dashboard, with folder “AlarmWay/Site”
AlarmWay - Index: Dashboard, with folder “AlarmWay”
Examples: Folder
Collection table multiple collections: Dashboard, with folder “Examples”
Home: Dashboard, with folder “AlarmWay”
As an example of what a dashboard.web file should look like, here is the Home dashboard file:
{
"moduleId": "modules.web.web-1",
"title": "Home",
"description": "OnSphere home",
"tags": []
}
2. Visualize the dashboards within the search bar
Once you pushed the configuration, go on the OnSphere front page and interact with the search bar. You should see the folders and dashboard as we wanted.
If you click on one of the folders, you should navigate into it and see the folders and dashboard of the selected dashboard.