TABLE#

The Table widget displays a table. Each cell can contain text or a number.

Starting Widget Configuration#

To configure the widget, click on the edit icon .

A pop-up window “Widget Settings” will open:

Fill in the necessary fields to configure the widget.

General Fields#

  • **“Widget Name * – a text field that is filled in manually from the keyboard;
  • “Mode” – a drop-down list where you need to select the mode for creating a query for the widget:
Name Description
Builder Mode Allows you to assemble a query from individual blocks. Each block (Table Merging, Filters, Widget Rows, Group By, Sort, Row Count) has the option to configure the necessary commands for working with data, arithmetic and logical commands, comparison operators.
Advanced Mode

Allows you to manually enter a query in the SQL field:

  • “Tables” – a drop-down list with all available database tables;

Additional Fields Available for Configuration Only in Builder Mode#

Table Merging#

Table merging is necessary to extract data from several related tables and form more complete and informative results.

To compare two tables for subsequent merging, the following operators are used:

Name Description
= Returns rows from both tables where the values in the specified columns are equal.
!= Returns rows from both tables where the values in the specified columns are not equal.
> Returns rows where the value in the specified column from the first table is greater than the value in the specified column from the second table.
< Returns rows where the value in the specified column from the first table is less than the value in the specified column from the second table.

If you need to merge only 2 tables, you must fill in the fields:

  1. “Column” from the drop-down list;
  2. “Operator” from the drop-down list;
  3. “Column 2” from the drop-down list;

For example,

If you need to merge more than two tables, you must click the button , after which you fill in the necessary fields.

If you need to delete the table merging, you must click the button .

Filters#

Filters allow you to set conditions for the selected data using comparison operators and logical operators.

To set one condition, you need to fill in the fields:

  1. “Column” from the drop-down list;
  2. “Operator” from the drop-down list;
  3. “Value” manually from the keyboard;

For example,

If you need to combine several conditions into one whole, for example, ((robots.is_deleted = 0) AND (robots.id > 13)), you must use logical operators. To do this, select the desired operator by clicking on the icon to change it to OR, or to change it to AND. Then click the button , after which fill in the necessary fields:

If you need to set a complex condition for the Filter, including several brackets, you must click the button , after which fill in the necessary fields.

If you need to delete a condition, you must click the button .

Widget Rows#

Widget rows are used to specify the columns of data that need to be extracted from the database. They determine what data will be returned in the query results.

To configure Widget Rows, you need to fill in the fields:

  1. “Column” from the drop-down list;
  2. “Operator” from the drop-down list;
  3. “Row Name” manually from the keyboard;

For example,

If you need to display additional data in the legend, you should click the button .

Group By #

A field for configuring the process of merging rows of data with the same values in a specific column (or columns) into a single set, allowing aggregate operations to be performed on these groups. To merge data rows, you need to fill in the column field from the drop-down list;

Sorting#

Fields for configuring the process of ordering data in the resulting set in a specific order based on the values in one or more columns. To sort in ascending order, you need to enter “ASC” in the “Sort By” field. To sort in descending order, enter “DESC”. Then you need to fill in the “Column” field from the drop-down list;

Row Count#

The field is filled in manually from the keyboard or using the counter . This field allows you to limit the number of records returned in the query result for building the Dashboard.

Testing#

To ensure that the query is set up correctly, you need to click the button , after which a table with data will appear, based on which the Table Dashboard will be built.

To display the Dashboard on the panel, you should click the “OK” button.

To delete all filled data, you should click the “Cancel” button.

Example:

To output information about Robots on the Table Dashboard, you need to enter the data in the corresponding fields in the "Widget Settings" window:

Builder Mode (Example)#

You need to fill in the fields:

Tables *

robots

Widget Rows

ColumnRow Name
robots.guidid
robots.namename
robots.createdcreated
robots.updatedupdated
robots.descriptiondescription
robots.local_robot_namelocal_name

Group By

robots.updated

Sorting

Column Sort By
robots.created ASC

Row Count

10

Advanced Mode (Example)#

You need to fill in the field:

SQL

SELECT
    robots.guid AS id,
    robots.name AS name,
    robots.created AS created,
    robots.updated AS updated,
    robots.description AS description,
    robots.local_robot_name AS local_name
FROM
    robots
GROUP BY robots.updated
ORDER BY robots.created ASC;
LIMIT 10