Bosch IoT Insights

Rich Text widget

Using the Rich Text widget, formatted text and images for, e.g. a description of your project can be displayed.

It provides a basic set of useful text processing functionalities such as:

  • Text formatting: bold, italic, underline, orstrike it through

  • Quotes

  • Code blocks

  • Level 1 and level 2 heading (H1, H2)

  • Ordered or unordered lists

  • Indented text

  • Text and background color

  • Text alignment

  • Clear the formatting

  • Links and images

Example

images/confluence/download/attachments/1081316247/widget_rich_text_example_2020_07_23.png

Proceed as follows

  1. Select the Rich Text widget in the widget list.
    → The widget configuration page is displayed.

    images/confluence/download/attachments/1081316247/widget_rich_text_configuration_2020_07_23.png
  2. Configure the settings as described below.

  3. Click the Add button.
    → The widget is added to the dashboard.

Dashboard Settings

Open the Dashboard Settings pane to set how the widget is displayed in the dashboard.

  1. In the Size drop-down list, decide how much space the widget should take in the form of columns.

  2. In the Visibility drop-down list, decide whether the widget should be shown or hidden in the dashboard.

  3. In the Title field, enter a title for the widget.

General Settings

Open the General Settings pane to configure some general aspects for the widget.

  1. In the Widget Refresh Interval in Seconds field, enter a value in seconds after which the widget should be refreshed.

The configuration of a data source in the Rich Text widget is optional. I you want to use placeholders, it is necessary to define a data source.

Tree widget

Data Sources

Open the Data Sources pane to configure the data source for the widget.

You can select a maximum of three data sources.

  1. Click the + Add Source button to add a data source.

  2. Select any of the following options further explained underneath:

Query Template

  1. In the Query Template drop-down list, select a query template that you configured under Explore > Data Explorer, refer to Creating a query template.

    A query template is a template that has been created, parameterized, and provided for others. It is similar to an SQL View and shows data in a table view.

    To connect the widget with the Filter Panel widget you created for this dashboard, click the Available references icon images/confluence/download/thumbnails/1083888325/icon_reference.png and select the Filter Panel.

    If you have a time parameter, you can choose between absolute time, relative time, and a preset by clicking the time icon images/confluence/download/thumbnails/1083888325/icon_absolute_relative_time.png .

  2. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh.png to open a preview.

  3. Click the Save Data Source button.

Single Device

  1. In the Default Device ID drop-down list, select a Device ID.

    To connect the widget with the Filter Panel widget you created for this dashboard, click the Available references icon images/confluence/download/thumbnails/1083888325/icon_reference.png and select the Filter Panel.

  2. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh.png to open a preview.

  3. Click the Update Source button.

Multiple Devices

  1. In the Select Device Types drop-down list, select a device type.

  2. Click the Advanced Settings button to narrow down the output.

  3. In the Start field, enter a value to specify the device to start with.

    Example: If you select 3, the first two devices are skipped.

  4. In the Limit field, enter a value to specify the last device.

    The maximum is 200 devices.

  5. In the Fields field, enter the fields whose information shall be retrieved from Bosch IoT Things.

  6. In the Sort field, enter a field configured in Bosch IoT Things according to which the data shall be sorted.

  7. In the Namespaces field, add namespaces separated by a comma.

  8. In the DefaultFilter field, add a filter to narrow down the search results.

    To connect the widget with the Filter Panel widget you created for this dashboard, click the Available references icon images/confluence/download/thumbnails/1083888325/icon_reference.png and select the Filter Panel.

  9. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh.png to open a preview.

  10. Click the Update Source button.

Device Count

The Device Count data source is based on the counting functionality in Bosch IoT Things and is used to count things.

  1. In the Select Device Type drop-down list, select the device types/devices to be used as data source.

    • All Devices: Counts all devices regardless of the fact that they have a device type or not

    • All Device Types: Counts the devices that have the thing attribute type which means that the device belongs to a device type

    • Without Device Type: Counts the devices without the thing attribute type

    • Device Type xy: Counts the devices of the selected device types

  2. Click the Advanced Settings button to narrow down the output.

  3. In the Namespaces field, add namespaces separated by a comma.

  4. In the DefaultFilter field, add a filter to narrow down the search results.

    To connect the widget with the Filter Panel widget you created for this dashboard, click the Available references icon images/confluence/download/thumbnails/1083888325/icon_reference.png and select the Filter Panel.

  5. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh.png to open a preview.

  6. Click the Update Source button.

Devices from Filter Selection

Devices will be loaded that match the Device filter type configured in the Filter Panel widget.

  1. In the Pagination Limit field, enter a limit of devices that shall be displayed per page.

  2. In the Sort field, enter a property according to which the devices shall be sorted.

  3. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh.png to open a preview.

  4. Click the Update Source button.

Playback: All Frames

The Playback widget must have been configured for your dashboard.

  1. Select Playback: All Frames to display all data that has been recorded.

Playback: Current Frame

The Playback widget must have been configured for your dashboard.

  1. Select Playback: Current Frame to display the data that is just being recorded.

External Data Source

Using the external data source, an external endpoint can be specified to reference data.

  1. Select an HTTP method.

  2. In the Request URL field, enter the URL of the request.

  3. If you selected the GET HTTP method:

    1. In the Headers pane, enter a key and a value to specify the header information of the external system.

    2. Activate the Secret Header checkbox to flag the header as secret.

      When editing the data source, the header information has to be provided.

    3. In the Test Parameters pane, enter a filter parameter to test it.

      This pane can be used if a filter widget is configured for the dashboard. The filter values can be referenced as described in this pane within the URL and Headers.

      Modifiers can be used to manipulate referenced filter values. The following modifiers are available:

      • noencode: Only used in URLs. The value is not encoded as it is done by default.

      • join: Concatenates multiple values in one string separating them with the provided separator.

      • queryParams: Creates an entry with the provided parameterName for each value.

      Usage examples:

      Example filter context:

      {

      "multi": ["v1", "v2"]

      }

      join:

      ${filterParams.multi | join: ','} will result in v1,v2

      queryParams:

      ${filterParams.multi | queryParams: 'multiParam'} will result in multiParam=v1&multiParam=v2

      Independently from the test parameters, user-specific information can be referenced.

  4. If you selected the PUT HTTP method:

    1. In the Body pane, select the type of data in the Type drop-down list.

    2. Activate the Secret Header checkbox to flag the header as secret.

      When editing the data source, the header information has to be provided.

    3. In the Test Parameters pane, enter a filter parameter to test it.

      This pane can be used if a filter widget is configured for the dashboard. The filter values can be referenced as described in this pane within the URL, Headers and the Body.

      Modifiers can be used to manipulate referenced filter values. The following modifiers are available:

      • noencode: Only used in URLs. The value is not encoded as it is done by default.

      • join: Concatenates multiple values in one string separating them with the provided separator.

      • queryParams: Creates an entry with the provided parameterName for each value.

      Usage examples:

      Example filter context:

      {

      "multi": ["v1", "v2"]

      }

      join:

      ${filterParams.multi | join: ','} will result in v1,v2

      queryParams:

      ${filterParams.multi | queryParams: 'multiParam'} will result in multiParam=v1&multiParam=v2

      Independently from the test parameters, user-specific information can be referenced.

  5. If you selected the POST HTTP method:

    1. In the Body pane, select the type of data in the Type drop-down list.

    2. Activate the Secret Header checkbox to flag the header as secret.

      When editing the data source, the header information has to be provided.

    3. In the Test Parameters pane, enter a filter parameter to test it.

      This pane can be used if a filter widget is configured for the dashboard. The filter values can be referenced as described in this pane within the URL, Headers and the Body.

      Modifiers can be used to manipulate referenced filter values. The following modifiers are available:

      • noencode: Only used in URLs. The value is not encoded as it is done by default.

      • join: Concatenate multiple values in one string separating them with the provided separator.

      • queryParams: Creates an entry with the provided parameterName for each value.

      Usage examples:

      Example filter context:

      {

      "multi": ["v1", "v2"]

      }

      join:

      ${filterParams.multi | join: ','} will result in v1,v2

      queryParams:

      ${filterParams.multi | queryParams: 'multiParam'} will result in multiParam=v1&multiParam=v2

      Independently from the test parameters, user-specific information can be referenced.

  6. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh.png to open a preview.

  7. Click the Save Data Source button.

Rich Text Settings

In the text box, add text, links, and or images using the functionalities mentioned above.

Adding dynamic text

If you have selected a data source, you can display dynamic text in the Rich Text widget by adding placeholders.

  1. Add text to the text box.

  2. To add a placeholder, type ${ and select a parameter path from the list that is displayed, e.g., .thingId.

    If there are filter parameters available, they can also be referenced using ${, e.g., ${filterParam.name} which displays the name value from the URL arguments.

    → The Rich Text widget displays the value of the parameter path you have selected.

Adding links

If you have selected a data source, you can add dynamic links.

  1. Click the link icon images/confluence/download/thumbnails/1081316247/widget_rich_text_add_link.png to add a link to the text box.
    → The Set Link dialog is displayed.

  2. In the Link URL field, enter a URL.

    You can add placeholders to the link from the selected data source or filter parameters, e.g. https://yourdomain.com/${[0].payload.deviceId}.

  3. Use the Open link in a new tab checkbox to either open the link in a new tab or in the currently displayed tab.

  4. Click the Save button to add the link.

Adding images

If you have selected a data source, you can add device images, Base64 images, images from a URL, or images from a file to the Rich Text widget.

  1. Click the image icon images/confluence/download/thumbnails/1081316247/icon_upload_image.png to upload an image from a source as specified above.

    images/confluence/download/attachments/1081316247/widget_rich_text_image_upload.png
    • Device Image

      1. In the Value drop-down list, select a parameter path.

        The base64 image string must be added to a property in a General or Details information block.

      2. In the Max Height field, enter the height of the image in pixels.

      3. In the Max Width field, enter the width of the image in pixels.

      4. Click the Add button to add the device image to the widget.

    • Base 64 Image

      1. In the Value drop-down list, select a parameter path, e.g. [0].features.general.properties.base64image.

        The base64 image string must be added to a property in a General or Details information block.

      2. In the Max Height field, enter the height of the image in pixels.

      3. In the Max Width field, enter the width of the image in pixels.

      4. Click the Add button to add the Base64 image to the widget.

    • From URL

      1. In the URL field, add either a project-specific URL with placeholders or an external link.

      2. In the Max Height field, enter the height of the image in pixels.

      3. In the Max Width field, enter the width of the image in pixels.

      4. Click the Add button to add the image from the URL to the widget.

    • From File

      1. Click the From File field to upload a file.

      2. Select a file.

      3. In the Max Height field, enter the height of the image in pixels.

      4. In the Max Width field, enter the width of the image in pixels.

      5. Click the Add button to add the file to the widget.