1. Home
  2. Docs
  3. IIoTNext Platform
  4. Dashboards
  5. Aliases

Aliases

Aliases

Introduction

Alias is a reference to a single entity or group of entities that are used in the widgets. An alias may be static or dynamic. To create a dashboard, you first need to create aliases to define the data from which the entities will be used. Aliases can be as easy as referring to a single device or as complicated as creating a complex search query for specific assets from a list.

In this tutorial, aliases will be used on a system according to the scheme shown below and all devices have “temperature” generated values coming to them:

Alias types

Single entity

This alias allows choosing a single entity. It can be a device, asset, entity views, tenants, customers, dashboards, data converters, scheduler events, blob entities, or current customer. In the example, an alias was created that filters one device, which in this case is Boiler-1a.

Let’s learn how to add a Single entity alias:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select a Single entity filter type. From the Type drop-down menu, select the Device and enter the name of the needed device (start typing it and it will be found automatically).
  5. After configuring the alias, click the “Add” button in the lower right corner.
  6. We can now see that a new alias has been added. Click “Save” in the lower right corner of the dialog box.

Let’s use an added alias in a widget:

  1. Click the “Add new widget” icon in the centre of the screen.
  2. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  3. Input data source: Entity type, select alias name from the list, and add telemetry.
  4. Click the “Add” button in the lower right corner of the dialog box.
  5. Widget with alias that filters one device has been added.
  6. Don’t forget to save all the changes by clicking on the big orange checkmark in the lower right corner of the screen.

Entity list

This alias allows choosing several entities manually without entering a query, which can be devices, assets, entity views, tenants, customers, dashboards, data converters, scheduler events, blob entities, or customers. In this example, an alias was created that filters a list of multiple devices.

Let’s learn how to add an Entity list alias:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select an Entity list filter type. From the Type drop-down menu, select the Device and input the names of the individual devices (start typing it and it will be found automatically).
  5. After configuring the alias, click the “Add” button in the lower right corner.
  6. We can now see that a new alias has been added. Click “Save” in the lower right corner of the dialog box.

Now let’s use the added alias in a widget:

  1. Click the “Add new widget” icon in the centre of the screen.
  2. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  3. Input data source: Entity type, select the name of the created alias from the list, and add telemetry.
  4. Click the “Add” button in the lower right corner of the dialog box.
  5. Widget with alias that filters a list of several devices, which in this case are Boiler-123 and Boiler-1a, has been added.
  6. Don’t forget to save all the changes by clicking on the big orange checkmark in the lower right corner of the screen

Entity name

This alias allows choosing one or more entity names that begin with an entered query, which can be devices, assets, entity views, tenants, customers, dashboards, data converters, scheduler events, blob entities, or customers. In this example, an alias was created to filter devices that start with “Boiler”.

Let’s learn how to add an Entity name alias:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select the filter type Entity name. From the Type drop-down menu, select the Device and enter a name, or just the beginning of the name, by which devices will be filtered.
  5. After configuring the alias, click the “Add” button in the lower right corner.
  6. We can now see that a new alias has been added. Click “Save” in the lower right corner of the dialog box.

Now let’s use the added alias in a widget:

  1. Click the “Add new widget” icon in the centre of the screen.
  2. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  3. Input data source: Entity type, select the name of the created alias from the list, and add telemetry.
  4. Click the “Add” button in the lower right corner of the dialog box.
  5. Widget with alias that filters devices, which names start with ‘Boiler’, has been added.
  6. Don’t forget to save all the changes by clicking on the big orange checkmark in the lower right corner of the screen.

Entity from dashboard state

This alias allows choosing entity(-ies) from dashboard state which can be a device, asset, entity view, tenant, customer, dashboard, data converter, scheduler event, blob entity or current customer. It is used for filtering data for other dashboard states. For example, if the Time-series widget is created on a root dashboard state with several entities displayed on it, and you’d like to create a dashboard state which will display a widget with the entity you clicked on, you need to use this alias.

The following example uses an alias after creating an alias for group entities.

Let’s learn how to add an Entity from dashboard state alias:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select an Entity from the dashboard state filter type.
  5. Click “Add” in the lower right corner of the dialog box.
  6. After adding both aliases, click “Save” in the lower right corner of the dialog box.

Now let’s use an added alias in a widget and add a state to see how this alias works:

  1. Click the “Add new widget” icon in the centre of the screen.
  2. In the opened widget bundles selection, click “Cards system”. There select the Entity table widget.
  3. Input data source: Entity type, Entity list alias and add telemetry. Click “Add” in the lower right corner to add a widget.
  4. After adding the widget, click the layers icon in the top left corner of the dashboard to create a new state. In the opened dialog window, click a “+” icon to add a new state.
  5. Enter state’s name and click “Add”.
  6. Now you see a list with two states: root one, and the one that has been just created. Click “Save” in the lower right of the dialog.

 

Time to add an action to a root dashboard widget and perform it using an Entity from dashboard state alias on the widget in the created state:

  1. In the root dashboard state, enter widget Edit mode by clicking the “pencil” icon in the upper right corner of it to enter an Edit mode of the widget.
  2. Move to the Action cell and click a “+” icon to add a new action.
  3. In the Add widget dialog, select an action source that is responsible for each entity separately (action cell button, on row click etc.)
  4. Enter the name of the action.
  5. If necessary, select the icon representing the button to perform the action.
  6. Select the Navigate to new dashboard state action type and set the newly created state as a target dashboard state. Click “Add” to add a new action to the widget.
  7. After successfully adding the action, click the big orange tick mark in the upper right of the screen to apply the changes.
  8. Then, go to the created state by selecting it from the drop-down menu by clicking the layers icon in the upper right corner.
  9. Click the “Add new widget” icon in the centre of the screen. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  10. Input data source: Entity type and Select the Entity from dashboard state alias. Click “Add” in the lower right corner.
  11. After adding the widget, click a big tick icon in the lower right corner of the screen to save all applied changes.

By clicking a button opposite the needed entity, you will be transitioned to an inner state that shows a widget with the entity from the dashboard’s state details.

Asset type

This alias allows choosing assets of entered type (and, if needed) names of which begin with an entered query. This alias filters asset of type ‘field’ and with name starting with ‘Build’.

Let’s learn how to add an Asset type alias and use it in a widget:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select a Asset type filter type.
  5. Select asset type from the drop-down menu and enter the beginning of the asset name. Click “Add” in the lower right corner of the dialog box.
  6. After the alias has been added, click “Save” in the lower right corner of the dialog box.
  7. Click the “Add new widget” icon in the centre of the screen.
  8. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  9. Input data source: Entity type, Asset type alias and click “Add” in the lower right corner to add a widget.
  10. After adding the widget, click a big tick icon in the lower right corner of the screen to save all applied changes.

Device type

This alias allows choosing devices of entered type (and, if needed) names of which begin with an entered query. This alias filters device of type ‘Device’.

Let’s learn how to add a Device types alias and use it in a widget:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select a Device types filter type.
  5. Choose previously created device type from the drop-down menu and click “Add” in the lower right corner of the dialog box.
  6. After the alias has been added, click “Save” in the lower right corner of the dialog box.
  7. Click the “Add new widget” icon in the centre of the screen.
  8. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  9. Input data source: Entity type, Device types alias and add telemetry. Click “Add” in the lower right corner to add a widget.
  10. After adding the widget, click a big tick icon in the lower right corner of the screen to save all applied changes.

Entity view type

This alias allows choosing entity views of entered type (and, if needed) names of which begin with an entered query. An entity views called ‘Boiler 1a type’ and ‘Boiler 1b type’ was created with a type ‘newentity’ which provides access to ‘Temperature’ timeseries from Boiler-1a and Boiler-1b. This alias filters entity Views of type ‘newentity’ and with name starting with ‘boiler’.

Let’s learn how to add an Entity view type alias and use it in a widget:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select an Entity view types filter type.
  5. Choose the previously created entity view type from the drop-down menu and enter the beginning of an entity view name. Click “Add” in the lower right corner of the dialog box.
  6. After the alias has been added, click “Save” in the lower right corner of the dialog box.
  7. Click the “Add new widget” icon in the center of the screen.
  8. From the drop-down Select widget menu, select a Cards bundle. In the cell “Latest values”, pick a Entities table widget.
  9. Select the Entity view type alias and add telemetry. Click “Add” in the lower right corner to add a widget.
  10. After adding the widget, click a big tick icon in the lower right corner of the screen to save all applied changes.

Api Usage State

There is an API Usage layout in the main menu of the TB platform. API Usage shows full statistics on the platform. Api Usage State alias allows fetching only the data you need from the user dashboard statistics.

Let’s learn how to add an API Usage State alias and use it in a widget:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select an Api Usage State filter type.
  5. After the alias has been added, click “Save” in the lower right corner of the dialog box.
  6. Click the “Add new widget” icon in the centre of the screen.
  7. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  8. Input data source: Entity type, Api Usage State alias and add telemetry that fetches statistics from an API usage state. Click “Add” in the lower right corner to add a widget.
  9. After adding the widget, click a big tick icon in the lower right corner of the screen to save all applied changes.

Relations query

This alias allows choosing entities which are related to specified originator up to specified level and in specified direction.

In the example alias filters entities that have any relation from Asset ‘District A’ up to relation level 2.

Let’s learn how to add a Relations query alias and use it in a widget:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select a Relations query filter type.
  5. Select the Asset type and choose an asset. Set direction to “From” and max relation level 2.
  6. Click “Add” in the lower right corner of the dialog box.
  7. After the alias has been added, click “Save” in the lower right corner of the dialog box.
  8. Click the “Add new widget” icon in the center of the screen.
  9. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  10. Input data source: Entity type, Relations query alias and add telemetry. Click “Add” in the lower right corner to add a widget.
  11. After adding the widget, click a big tick icon in the lower right corner of the screen to save all applied changes.

Asset search query

This alias allows choosing assets of a specified type which are related to the specified originator up to a specified level and in a specified direction. This alias filters assets with types ‘field’ that have  relation ‘contains’ to Asset ‘District – 1’ with relation level 2.

Let’s learn how to add an Asset search query alias and use it in a widget:

  1. Enter dashboard editing mode.
  2. In the upper right corner of the window, click the “Entity alias” icon.
  3. In the opened Entity aliases window, click the “Add alias” button on the left side of the dialog box.
  4. In the opened dialog Add alias, enter a name for the alias, select an Asset search query filter type.
  5. Select the Asset type and choose an asset. Set direction to “To” and max relation level 2. Input asset type.
  6. Click “Add” in the lower right corner of the dialog box.
  7. After the alias has been added, click “Save” in the lower right corner of the dialog box.
  8. Click the “Add new widget” icon in the centre of the screen.
  9. In the opened widget bundles selection, click “Cards system”. There select the Entities table widget.
  10. Input data source: Entity type, Asset search query alias and add telemetry. Click “Add” in the lower right corner to add a widget.
  11. After adding the widget, click a big tick icon in the lower right corner of the screen to save all applied changes.

How can we help?