NUMBER#

The Number widget displays numbers, allowing Users to easily perceive and analyze data.

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 filled in manually from the keyboard;
  • “Mode” – a dropdown list where you need to select the query creation mode for the widget:
Name Description
Builder Mode Allows you to build a query from separate blocks. Each block (Table Join, 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 dropdown list with all available database tables.

Additional Fields Available for Configuration Only in Builder Mode#

Table Join#

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

To compare two tables for subsequent joining, 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 join only 2 tables, you must fill in the fields:

  1. “Column” from the dropdown list;
  2. “Operator” from the dropdown list;
  3. “Column 2” from the dropdown list;

For example,

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

If you need to delete a table join, 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 dropdown list;
  2. “Operator” from the dropdown list;
  3. “Value” manually from the keyboard;

For example,

If you need to combine several conditions into one, for example, ((robots.is_deleted = 0) AND (robots.id > 13)), you need to 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 parentheses, 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 data columns that need to be extracted from the database. They determine which data will be returned in the query results.

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

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

For example,

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

Group By#

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 rows of data, you need to fill in the column field from the dropdown 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 dropdown 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 results 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 Number Dashboard will be built.

To display the Dashboard on the panel, click the "OK" button.

To delete all filled data, click the "Cancel" button.

Example:

To display the number of Jobs on the Number Dashboard, you need to enter the corresponding data in the "Widget Settings" window:

Builder Mode (Example)#

You need to fill in the fields:

Tables *

jobs

Filters

Column
jobs.is_deleted = 0

Widget Rows

Column Row Name
jobs.id COUNT

Row Count

1000

Advanced Mode (Example)#

You need to fill in the field:

SQL

SELECT
	count(jobs.id) AS count
FROM
	jobs
WHERE
	jobs.is_deleted=0
LIMIT 1000