Search folders

🟢 Beginner

dashboard

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 folder property in dashboard.web files.

  • 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": []
}