Dashboard configuration

Introduction

By default, service.monitor Analytics comes pre-configured dashboards that show already many statistics of the map.apps installation that is analysed. Besides these default dashboards, it is possible to configure custom ones instead. The dashboard configuration is served as a bundle to the map.apps installation and all the configuration is done inside the bundle’s manifest.json.

Dashboard Configuration Component

A dashboard configuration bundle has needs to define at least one component which carries the interface usagelog_management.DashboardConfig:

manifest.json (excerpt)
{
// the name of the custom dashboard bundle
"Bundle-SymbolicName": "my-dashboard",
// the version of the dashboard configuration
"Bundle-Version": "0.0.1",

     // no i18n is used in the sample
    "Bundle-Layer": "",
    "Bundle-Main": "",
    "Bundle-Localization": [],

    // define that this dashboard needs the default widgets
    "Require-Bundle": [{
            "name": "usagelog_management_widgets"
        }],

    "Components": [{
            "name": "DashboardConfig",
            // a config is a simple object with a "config" property
            "impl": "ct/Stateful",

            // this identifies the dashboard configuration in the system
            "provides": ["usagelog_management.DashboardConfig"],

            "propertiesConstructor": true,
            "properties": {

                // here the real dashboard configuration
                "config": {
                    "dashboards": [...],
                    "widgets": [...]
                }
            }
        }
    ]
}

Dashboards

The dashboard configuration is divided into two parts as depicted below. It is possible to define multiple dashboards and multiple widgets. A widget can be assigned to a single dashboard only once but on multiple dashboards simultaneously.

Basically a dashboard consist of three parts. The first two (title and iconClass) are used to create a proper menu-option in map.apps manager. The third is a simple list of widgetIds that are defined in the widgets list below.

manifest.json (excerpt)
"config": {
  "dashboards": [
    {
      "title": "My custom dashboard",
      "iconClass": "icon-users",
      "widgetIds": [
        "myAppStartsWidget",
        "myAppsWidget",
        "myVisitorsWidget"
      ]
    }
  ],
  "widgets": [
    {
      ...
    }
  ]
}