Dashboards

Introduction to dashboards in ConSol CM

Dashboards allow to display graphical information in the Web Client. This can be statistics, highlighted system data or any other information which is helpful for the users in their daily work. The content of a dashboard is configured using widgets. Dashboards are available on the general welcome page and the resource overview page.

Concepts, terms and definitions

Concept

Other terms

Definition

dashboard

 

Web Client screen which shows one or several widgets to provide an overview of important data

widget

 

Dashboard item which shows data or provides a specific functionality

Purpose and usage

Dashboards are used to show important information in a graphical way to the users. They are used in two places of the Web Client:

The dashboards can be customized using widgets. There are several widgets types which allow displaying different kinds of information, see Available widgets. Widgets can contain interactive elements. Most of the widgets require a widget script which retrieves the required data, see Scripts of the type Widget.

By default, the dashboards are displayed to all users. If you want to adapt the dashboard content to the user’s roles, you need to add the corresponding logic to the dashboard and / or widget scripts, see Adapting the dashboard to the user’s role.

The following figure shows a dashboard which contains several widgets in tabs. The currently selected tab shows the default chart widget with the cases in the current view.

Available widgets

The following widget types are available:

Name

Type

Description

Script required

Calendar

Calendar

Displays an integrated Microsoft Outlook calendar, see Calendar widgets and Microsoft Exchange calendars.

Yes

Chart

Chart

Displays a chart, see Chart widgets

Yes

HTML

Generic

Displays HTML content, see HTML widgets

Yes

KPI

kpi

Displays KPIs in colored boxes with a trend indicator, see KPI widgets

Yes

News

News

Displays news, see News widgets

Yes

Recent changes

RecentChanges

Displays a list of objects which have been changed recently, see Recent changes widgets

No

Recently visited

RecentlyVisited

Displays a list of the objects which the current user has viewed recently, see Recently visited widgets

No

Table

Table

Displays a table, see Table widgets

Yes

Basic tasks

Defining the dashboard layout

The overall layout of the dashboards is defined using the page customization, see Page customization. The following attributes are used:

The following general principles apply when defining the dashboard layout:

Please proceed as follows to define the overall layout of a dashboard.

  1. Log in as an administrator.
  2. Open the page with the dashboard which you want to edit in the Web Client.
  3. Open the page customization by clicking the Page customization link in the menu bar.
  4. Locate the page customization scope widgetsGrid / welcomePage or widgetsGrid / resourceDashboard.
  5. Edit the value of the layout attribute.
    • If all the widgets should be displayed on the same page, add one array for each row and fill the arrays with the widget references.
    • If you use tabs, create one array for each tab. The widgets attribute within the tab contains one array for each row. Add the localized tab name to the i18n attribute if needed.
  6. Save your changes by clicking the Create or Update button in the page customization.
  7. Reload the page.
  8. Open the page customization again to configure the widgets, see Configuring widgets.

The attribute refreshOnViewChange allows to determine whether the dashboard should be refreshed when the user changes the view of the case list. The default value is true, i.e. the dashboard is refreshed when the view changes.

The following examples show different layouts.

Layout example 1 - Widget covering several cells

Three widgets are displayed, two charts and one table.

Value of the layout attribute:

[ticketsInView:Chart, ticketsInView, myTickets:Table], [ticketsInView, ticketsInView, ticketsOverview:Chart]

Layout example 2 - Different number of widgets per row

Four widgets are displayed, two KPI widgets, one chart and one table.

Value of the layout attribute:

[ticketsGlobalOverview:KPI,ticketsOpenedLastWeek:KPI],[ticketsInView:Chart],[ticketsOverview:Table]

Layout example 3 - Tabs with localized names

The following example shows a dashboard which consists of three tabs with localized names. The first tab contains two KPI widgets, the second tab a chart widget and the third tab a table widget.

Value of the layout attribute:

[tabName:'Open tickets global overview',i18n:{en:'Open tickets global overview',de:'Übersicht offene Tickets'},widgets:[ticketsGlobalOverview:KPI,ticketsOpenedLastWeek:KPI]],[tabName:'Tickets in current view',i18n:{en:'Tickets in current view',de:'Tickets in der aktuellen Sicht'},widgets:[ticketsInView:Chart]],[tabName:'Job table',i18n:{en:'Job table',de:'Tabelle Jobs'},widgets:[ticketsOverview:Table]]

Display in the Web Client, with English browser locale: 

Configuring widgets

The following general principles apply when configuring individual widgets:

Please proceed as follows to configure a widget:

  1. Add the (empty) widget to the dashboard, see Defining the dashboard layout.
  2. Open the page with the dashboard which includes the widget in the Web Client. If your dashboard uses tabs, you need to select the tab where the widget is placed.
  3. Open the page customization by clicking the Page customization link in the menu bar.
  4. Locate the page customization scope of the widget, e.g. chartWidget/ welcomePage / ticketsInView.
  5. If the widget type requires a script, create the script and reference it in the page customization. The place where the script is referenced depends on the widget type:
  6. Set the required values in the attributes of the page customization. You need to set the attribute visible to true for the widget to be displayed.

    You can set attributes both in the widget script and in the page customization. The values set in the script overwrite the values entered in the page customization.

    Please see the section of the respective widget type for details about the available attributes.

Localizing widget text

You can localize the text displayed in the widget using the localization attribute of the widget configuration. It can be set either in the page customization or in the widget script. The localization attribute can hold the localized values for all string attributes used in the widget.

Please proceed as follows to define localized strings in the page customization:

  1. Enter a placeholder in the following syntax as a value for the attribute which you want to localize.

    Example: attribute: title, value: _('titlestring')

  2. Provide localizations in the following syntax in the localization attribute.

    Example: attribute: localization, value: de:{titlestring:'Offene Vorgänge'}, en:{titlestring:'Open cases'}

    You can add localizations for different attributes as a comma-separated list within the language tag: de:{titlestring:'Offene Vorgänge',footerstring:'Anzahl bearbeitbare Vorgänge'}

Please proceed as follows to define localized strings in the widget script:

  1. Use placeholders in the following syntax when aggregating data for the widget (highlighted in red):

    data.add("{name: _('all'), data:[${allTickets}]}" as String)

    data.add("{name: _('own'), data:[${ownTickets}]}"as String)

    data.add("{name: _('unassigned'), data:[${unassignedTickets}]}"as String)

  2. Provide localizations in the return statement using the following syntax (highlighted in red):

    localization:"de: {all:'Alle',own:'Eigene',unassigned:'Unzugewiesene'},"+ "en: {all:'All', own:'Own', unassigned: 'Unassigned'}"];

Advanced tasks

Adapting the dashboard to the user’s role

There are two options to adapt the dashboard for different users:

If you want to display different widgets for different kinds of users, you need to set the visibility attribute of the widget within the widget script. This allows you to display the widget only to the users who have a certain role.

The following example shows how to hide the widget if the current user does not have the consultant role.

def role = roleService.getById('consultant');

def engineer = engineerService.getById(engineer_id);

if(!getRolesForEngineer(engineer).contains(role))

{

return ["visible": false]

}

Code example 38: Widget visibility depending on the user’s roles

If you want to display different tabs for different kinds of users, you need to modify the layout attribute of the dashboard in a script. This is done by creating a page customization script and referencing it in the configuration script field at the top of the page customization.

The following example shows how to display a different set of tabs if the current user has the sales role.

def role = roleService.getById('sales');

def engineer = engineerService.getById(engineer_id);

 

if (getRolesForEngineer(engineer).contains(role)) {

configuration.put("layout",

"[tabName:'Sales performance', widgets:[sales:Chart]]," +

"[tabName:'Most important leads', widgets:[leads:Table]]");

} else {

configuration.put("layout",

"[tabName:'Service summary', widgets:[service:Chart]]" +

"[tabName:'HelpDesk performance', widgets:[hd:Chart]]");

}

return configuration;

Code example 39: Dashboard layout depending on the user’s roles