Bosch IoT Insights

Table widget

Using the Table widget, data can be displayed in a table.

Example

images/confluence/download/attachments/2602607114/widget_table_example_2020_08_04-version-1-modificationdate-1671533509000-api-v2.png

Proceed as follows

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

    images/confluence/download/attachments/2602607114/widget_table_configuration-version-1-modificationdate-1675333749000-api-v2.png
  2. Configure the settings as described below.

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

To create this widget, the following settings are mandatory to be configured:

  • Data Source

All other settings are optional.

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 Layout behavior drop-down list, decide how the size of the widget should be adapted in the dashboard.

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

    For a dynamic title, you can add placeholders with the ${...} notation. Possible placeholder sources are filterParams (if a filter widget exists on the dashboard, e.g. ${filterParams.paramName}) or data from the data source (if source is specified, e.g. ${[0].payload.value}), insights (user context), dashboardName or widgetId.

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.

  2. In the Lazy Loading drop-down list, select whether you want to enable or disable lazy loading.

    Lazy loading is enabled by default. That way, widgets are only loaded when they are visible on screen. This prevents slower loading of the dashboard and performance issues.

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-version-1-modificationdate-1616506558000-api-v2.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-version-1-modificationdate-1616506558000-api-v2.png .

  2. For Caching, add the Duration in seconds to load existing cache entries that match your parameters during that time frame.

    The default cache time of 30 minutes is set automatically.

  3. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh-version-1-modificationdate-1602594207000-api-v2.png to open a preview.

  4. 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-version-1-modificationdate-1616506558000-api-v2.png and select the Filter Panel.

  2. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh-version-1-modificationdate-1602594207000-api-v2.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 Filter field, add a filter to narrow down the search results. Placeholders are also supported.

  9. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh-version-1-modificationdate-1602594207000-api-v2.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-version-1-modificationdate-1616506558000-api-v2.png and select the Filter Panel.

  5. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh-version-1-modificationdate-1602594207000-api-v2.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-version-1-modificationdate-1602594207000-api-v2.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. In the Type drop-down list, select the type of authorization.

  4. Click the Set Configuration button to set up the selected authorization.

    1. For Basic Auth:

      1. In the Username field, enter the username.

      2. In the Password field, enter the password.

    2. For OAuth 2.0

      1. In the Grant Type drop-down list, select the type of credentials.

      2. Enter the Access Token URL.

      3. Enter the Client ID.

      4. Enter the Client Secret.

      5. If you selected Password Credentials as Grant Type, also enter the Username and the Password .

    3. For OAuth 2.0 (On-behalf grant type)

      1. In the Grant Type drop-down list, select Azure AD On-Behalf.

      2. Configure the scopes of your application API as described in External data source: on-behalf-of (OBO) flow.

  5. 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.

      • relativeTimestamp: Calculates a relative time according to the current time. It offers a way to dynamically change the time range with the use of the Filter Panel widget, e.g. gt{$filterParams.dateTime.from | relativeTimestamp}

      • addTime:<insert number in milliseconds>: Calculates the relative time according to the given time from insights.timestamp and using the number from addTime, e.g. gt{insights.timestamp | addTime:-300000}. This modifier is designed for static usage so that a Filter Panel widget is not required. A positive number is also allowed if relevant.

      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 and randomly generated sequences (UUID v4, alphanumeric or hex string) can be referenced.

  6. 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.

      • relativeTimestamp: Calculates a relative time according to the current time. It offers a way to dynamically change the time range with the use of the Filter Panel widget, e.g. gt{$filterParams.dateTime.from | relativeTimestamp}

      • addTime:<insert number in milliseconds>: Calculates the relative time according to the given time from insights.timestamp and using the number from addTime, e.g. gt{insights.timestamp | addTime:-300000}. This modifier is designed for static usage so that a Filter Panel widget is not required. A positive number is also allowed if relevant.

      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 and randomly generated sequences (UUID v4, alphanumeric or hex string) can be referenced.

  7. 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.

      • relativeTimestamp: Calculates a relative time according to the current time. It offers a way to dynamically change the time range with the use of the Filter Panel widget, e.g. gt{$filterParams.dateTime.from | relativeTimestamp}

      • addTime:<insert number in milliseconds>: Calculates the relative time according to the given time from insights.timestamp and using the number from addTime, e.g. gt{insights.timestamp | addTime:-300000}. This modifier is designed for static usage so that a Filter Panel widget is not required. A positive number is also allowed if relevant.

      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 and randomly generated sequences (UUID v4, alphanumeric or hex string) can be referenced.

  8. In the Duration in seconds field under Caching, specify the caching duration in seconds.

  9. Click the Source data preview icon images/confluence/download/thumbnails/1083888325/icon_widget_refresh-version-1-modificationdate-1602594207000-api-v2.png to open a preview.

  10. Click the Save Data Source button.

Data Transformation

With the data transformation activated, you can select entries from arrays in arrays or a specific range of arrays.

Also refer to the JMESPath documentation.

Open the Data Transformation pane to activate the data transformation to JMES.

  1. Activate the toggle switch.

  2. In the Filter field, add a string to filter the data, e.g. [0] to display only the first item or [?contains(thingId,'yourThingName')] to filter by contains in the thingId property.

  3. Click the Transformed data preview icon images/confluence/download/thumbnails/1081316247/icon_widget_refresh-version-1-modificationdate-1675069110000-api-v2.png to open a preview.
    → The data transformation is activated for the widget.

If you selected more than one data source, the Data Aggregator pane is displayed.

  1. Activate the toggle switch.

  2. In the Data Aggregator drop-down list, select an aggregation method with which each entry of the same index is merged is merged into one result.

  3. Activate the Merge Properties checkbox to merge the properties of the index.

  4. In the Filter field, add a string to filter the data, e.g. [0] to display only the first item or [?contains(thingId,'yourThingName')] to filter by contains in the thingId property.

  5. Click the Transformed data preview icon images/confluence/download/thumbnails/1081316247/icon_widget_refresh-version-1-modificationdate-1675069110000-api-v2.png to open a preview.
    → The data transformation is activated for the widget.

Table Settings

Open the Table Settings pane to configure the table view.

  1. Deactivate the Show table header checkbox to hide the table header in the widget.

    If you have created query templates, the data will be taken for the table header.

  2. Activate the Show horizontal grid lines checkbox to add grid lines after each row.

  3. Activate the Show vertical grid lines checkbox to add grid lines after each column.

  4. Activate the Enable hovering in table rows checkbox to enable hovering in the table.

  5. Activate the Enable batch processing checkbox to add one or more batch buttons to the table which trigger actions for multiple rows.

    1. To select an icon different to the default one, click the Select Icon button.

    2. In the Button Name field, enter text that shall be displayed on the button.

    3. Select an HTTP Method.

    4. In the Request URL field, enter the Request URL to the third-party system.

    5. In the Type drop-down list, select the type of authorization.
      Click the Set Configuration button to set up the selected authorization.

      1. For Basic Auth:

        1. In the Username field, enter the username.

        2. In the Password field, enter the password.

      2. For OAuth 2.0

        1. In the Grant Type drop-down list, select the type of credentials.

        2. Enter the Access Token URL.

        3. Enter the Client ID.

        4. Enter the Client Secret.

        5. If you selected Password Credentials as Grant Type, also enter the Username and the Password.

      3. For OAuth 2.0 Bearer Token, enter the token.

    6. In the Body pane, select a Type.

    7. Enter the request body.

      The Body pane is not available for the GET and DELETE HTTP methods.

    8. In the Headers pane, enter a Key and a Value.

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

      When editing the REST request, the header information has to be provided.

    10. Click the + Add Header button to add another row.

      To remove a row, click the the Remove icon images/confluence/download/thumbnails/2602607114/icon_remove_garbage_can-version-1-modificationdate-1690270151000-api-v2.png .

    11. 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.

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

    12. Activate the Trigger URLs on Response switch to open a specific URL depending on the response code, e.g. 404.

      1. In the Custom Trigger pane, enter a response code in the Response Code field.

      2. In the Trigger URL field, enter a URL that will be opened for the response code you entered in the Response Code field.

      3. In the Action drop-down list, select whether the link shall be opened in the same tab or in a new tab.

      4. Click the Add Trigger button to add a trigger for another response code.

      5. Repeat the steps a to c to configure the trigger.

      6. In the Default Trigger URL pane, configure a URL that will be triggered if no other trigger matches.

      7. In the Trigger URL field, enter a URL that will be opened.

      8. In the Action drop-down list, select whether the link shall be opened in the same tab, opened in a new tab, or copied to clipboard.

    13. Activate the Disable on specific condition switch to disable the button if the configured conditions apply.

      1. In the Property Path field, enter a property path where a condition shall be set.

      2. In the Value field, enter any value at which the button shall be disabled.

        This field can be left empty or set to undefined to disable the button if there is no value available.

        To add another button, click the Add Button button.

  6. Deactivate the Add zebra-striping to any table row checkbox to display every row in the same color.

  7. Activate the Set fixed column width checkbox to prevent the column width from adjusting when the content changes.

  8. Activate the Show global table filter checkbox to add a search field to the table with which you can search all columns.

  9. Activate the Custom column definition checkbox to define your own table heading.

    1. In the Column Name field, enter a name for the column.

    2. Click the EN drop-down list and select Add DE: German to add the German equivalent for the label.

    3. In the Type drop-down list, select a type for the content visualization.

    4. In the Test Parameters pane, enter filter parameters to test it.

      This pane can be used if a filter widget is configured for the dashboard.

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

    5. Configure the column depending on the type you selected as described in the Column definition section.

    6. Open the Data type handling & formatting pane to configure the handling of the displayed value regarding the data type as described in the Data type handling & formatting section.

    7. Open the Tooltip pane to configure a tooltip for this column.

      1. In the Text field, enter the tooltip text.

        You can also add placeholders, e.g. ThingId: ${[i].thingId} to the tooltip.

    8. In the Background color pane, configure the background color of the column.

      • If you activate the Static checkbox:

        1. In the drop-down list next to the Color field, select one of the following options:

          • Value
            Click the color square to select another color or enter a color code.

          • Data Source
            Select a parameter path from the drop-down list.

          • User Context
            Select user information to be displayed, e.g., User ID, User Email, or the time zone.

          • Filter Widget
            Select the Filter widget you added to the dashboard.

      • If you activate the Range checkbox:

        1. In the drop-down list next to the Default Color field, select one of the following options:

          • Value
            Click the color square to select another color or enter a color code.

          • Data Source
            Select a parameter path from the drop-down list.

          • User Context
            Select user information to be displayed, e.g., User ID, User Email, or the time zone.

          • Filter Widget
            Select the Filter widget you added to the dashboard.

        2. Click the Add range button to set a range in which a specific color shall be displayed.

          At the moment, a range cannot be defined for the Rich Text, Hyperlink, and Action Button types.

        3. In the drop-down list next to the Color field, select one of the following options:

          • Value
            Click the color square to select another color or enter a color code.

          • Data Source
            Select a parameter path from the drop-down list.

          • User Context
            Select user information to be displayed, e.g., User ID, User Email, or the time zone.

          • Filter Widget
            Select the Filter widget you added to the dashboard.

        4. If you selected Number in step 1, add values to the From and To fields to which the color applies.

        5. If you selected String in step 1, set a dynamic background color with regular expressions to have the color of the row depend on the result of the regular expressions.

        6. If you selected Date/Time in step 1, add values to the From and To fields to which the color applies.

    9. Open the Additional options pane to configure more column settings.

      1. Activate the Visible by default checkbox to have the column be displayed in the table by default.

        If this checkbox is deactivated, the column is hidden in the table. If you want to display the respective column or hide other columns, click the Select columns drop-down list and activate or deactivate the respective columns.

        The Select columns drop-down list is only available if you define custom columns.

      2. Activate the Hide column name in table header checkbox to not display the column name in the table.

      3. Activate the Fixed horizontally checkbox to have this column always displayed when scrolling horizontally.

        The column cannot be hidden.

      4. Activate the Minimal column width in px checkbox to manually set the minimal column width to avoid word breaks in the column. Add the value in pixels to the Value field.

    10. Click the Add Column button to add another column to the table.

  10. Activate the Show column filter checkbox to filter each column using the added filter icon.

  11. In the Entries per page field, specify the number of rows that shall be displayed per page.

    The number you define will be the first entry in the Settings drop-down list above the table.

  12. In the Table height in rows field, specify the number of rows to set the height of the table.

    The number cannot be higher than the number specified in the Entries per page field.

  13. In the Column used for sorting drop-down list, select the column for the initial sorting.

  14. In the Sorting order drop-down list, select the way the column selected above shall be sorted.

  15. In the Footer content field, select a footer content to add the summary or average of all numerical values for a column.

    Non-numerical values will be ignored.


Column definition

  • If you selected JSON Property in the Type drop-down list:

    1. In the Value drop-down list, select or enter the iterator.

  • If you selected Hyperlink in the Type drop-down list:

    1. In the URL field, enter a URL or a file link.

      As opening a file link is considered a potential security risk, it is restricted by modern web clients.

      Therefore, in order to open this link from the widget later on, you can copy it from the dialog which appears when the link is clicked, and then paste it into your file explorer.

      Make sure that the link is trustable and correct before using it.

    2. In the Hyperlink Display Text field, enter the text that shall be displayed for the hyperlink.

    3. In the Action drop-down list, select whether the hyperlink shall be opened in the same tab, opened in a new tab, or copied to clipboard.

  • If you selected Action Button in the Type drop-down list:

    1. In the Button Name field, enter a name for your Action Button.

    2. Define a REST Request by following the steps indicated in the REST Request Button Options section.

  • If you selected Image in the Type drop-down list:

    1. For the Source, activate one of the radio buttons.

    2. Select either a value in the Value drop-down list or enter a URL in the URL field for the source.

    3. For the Size, enter values for the Max Height and the Max Width fields for the image in pixels.

  • If you selected Rich Text in the Type drop-down list.

    1. Enter the text to be displayed in the text box.

    2. Format the text as desired.

    3. Insert ${ to add references to data paths. A drop-down list with all possible references is displayed.

      images/confluence/download/attachments/2602607114/widget_table_rich_text-version-1-modificationdate-1671533509000-api-v2.png

Data type handling & formatting

  1. In the General handling section, select a data type in Type drop-down list.

  2. Select the Multiple values (array) checkbox to have all values of an array displayed in a table row.

  3. In the Array value separator drop-down list, specify how the values in that table row shall be separated from each other, e.g. line break, comma, or list based.

  4. In the drop-down list next to the Prefix field, select one of the following options:

    • Value
      Enter any value as a prefix, e.g., €.

    • Data Source
      Select a parameter path from the drop-down list.

    • User Context
      Select user information to be displayed as prefix, e.g., User ID, User Email, or the time zone.

    • Filter Widget
      Select the Filter widget you added to the dashboard.

  5. In the drop-down list next to the Suffix field, select one of the following options:

    • Value
      Enter any value as a suffix, e.g., %.

    • Data Source
      Select a parameter path from the drop-down list.

    • User Context
      Select user information to be displayed as suffix, e.g., User ID, User Email, or the time zone.

    • Filter Widget
      Select the Filter widget you added to the dashboard.

  6. Activate the Hide value (no text) checkbox to hide the value and only display the background color.

  7. In the Type-specific options pane, define settings depending on the data type you selected.

    1. If you selected Boolean in step 1, define the following:

      1. In the Enter text to be shown instead of "true" field, enter a value that is displayed instead of true.

      2. In the Enter text to be shown instead of "false" field, enter a value that is displayed instead of false.

    2. If you selected Number in step 1, define the following:

      1. Activate the Thousands separator checkbox to format numbers.

      2. Select the number of Decimal Digits for behind the comma.

    3. If you selected String in step 1, activate the Wrap text checkbox to add line breaks.

    4. If you selected Date/Time in step 1, define the following:

      1. Activate the Disable time zone conversion (Date and time is shown as UTC) checkbox to use UTC.

      2. In the Time format drop-down list, select a format in which date and time shall be displayed.

    5. If you selected JSON in step 1, define the following:

      1. Activate the Autoformat checkbox to automatically indent the formatting of the JSON.

      2. Activate the Show in popover checkbox to activate the inline view which provides the first 50 characters of the JSON in form of a hyperlink.

      3. In the Maximum lines of JSON editor field, define the number rows to be displayed before scrolling is necessary.

To delete the column, click the Delete button.