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 KPI and chart widgets.

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 dashboard layout is defined on the Dashboards page in the Web Client menu. There are two tabs:

The dashboards are optional. Please proceed as follows to define a dashboard:

  1. Click the + icon to a add a new tab. You need to enter a name for the tab. Localizations are optional. You can edit the data afterwards by clicking Edit tab.

    If there is only one tab, the widgets are shown without a tab header in the Web Client.

  2. Define how many columns you need in your grid by entering the desired number in the Number of columns field.

  3. You need to add at least one widget. Click Add widget, enter a widget name and select the desired widget type.

  4. Configure the widget using the following approaches:

    • Create a script which returns the values for the settings. You can either select an existing script of the type Page customization or Widget, or create a new one by entering its name and clicking the Create option.

    • Edit the settings directly in the Widget settings dialog, which can be opened by double-clicking the widget in the grid or clicking the Edit icon.

    The values set in the script overwrite the values entered in the widget settings.

  5. Define the size and position of the widget.

    1. Drag the widget to the desired position.

    2. Define the number of columns which the widget should occupy by using the Span right / left icons.

    3. Define the number of rows which the widget should occupy by using the Span down / up icons.

    4. You can insert empty position for blank cells between widgets.

  6. Save the dashboard by clicking Save dashboards.

You need to set Visible to True for the widget to be displayed.

By default, the dashboard is refreshed when the user changes the view of the case list. If this is not desired, you can set Refresh on case list view change to False in the Script and raw data section.

Advanced tasks

Working with scripts

The layout of the dashboard and the content of the widgets can be defined using scripts. For some widgets, scripts are mandatory, see the subpages for the widget types for details. Scripts can be used in the following places:

Syntax

The following general principles apply when defining the dashboard layout:

Localizing widget text

You can localize the text displayed in the widget using the Localizations setting of the widget. It can be set either in the widget settings dialog or in the widget script and can hold the localized values for all strings used in the widget.

Please proceed as follows to define localizations:

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

    Example: Setting: Title, value: _('titlestring')

  2. Provide the translations in the following syntax in the Localizations setting.

    Example: Setting: Localizations, 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 localizations 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'}"];

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 make the Visibility setting for the widget within the widget script. This is done by creating a widget script and referencing it in the Script field below the widget type in widget settings. 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 33: Widget visibility depending on the user’s roles

If you want to display different tabs for different kinds of users, you need to make the layout configuration of the dashboard in a script. This is done by creating a page customization script and referencing it in the Script field in the Script and raw data section.

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 34: Dashboard layout depending on the user’s roles