This widget prints out the paginated list of things visible by the user and for the current context.
Items can be searched and sorted depending on the properties.
Metrics are computed for the current page only, so it is not possible to sort nor search by their values.
By enabling the "Bulk Controls", the widget allows selecting multiple thing and perform bulk operations, including:
- Manage Tags: select/deselect and edit tags.
- Execute Command: for each identified thing-definition, select a command with bulk support to execute.
- Update Firmware: select a firmware and apply it to the selected thing.
When placed in a Location details template, and the Actions Enabled flag is selected the widget allows, according to user permissions, to create new things in that location.
code_blocksDesign View
In the template editor, you can find the Thing List icon under the Things component palette group.
You can drag the widget into the grid and then configure the following sub-elements according to your needs:
Metric: the metric whose label and current value must be rendered as a widget row.
Below are references to the properties that can be configured for this widget.
For more details on how to manage metrics, you can refer to this article.
Property: the property whose label and current value must be rendered as a widget row.
Below are references to the properties that can be configured for this widget.
For more details on how to manage properties, you can refer to this article.
Composite Part: the widget part combining multiple properties and metrics.
Below are references to the properties that can be configured for this widget.
For more details on how to manage composite parts, you can refer to this article.
code_blocksCode View
Template Syntax
Below you can find some examples of how to use the component within a template.
Example 1
Thing list displaying simple properties.
<thing-list-widget-v2 [title]="'Things'"> <property name="serialNumber"></property> <property name="properties.activationDate" filter="millisToDate"></property> <property name="serviceLevel" filter="serviceLevel"></property> <property name="properties.status" filter="statusBadge"></property> </thing-list-widget-v2>
Example 2
List of things with complex properties and initial sorting.
<thing-list-widget-v2 [pageSize]="10" [sort]="['serialNumber','DESC','properties.activationDate','ASC']"> <property [name]="'serialNumber'"></property> <property [name]="'properties.activationDate'"></property> <composite-part [label]="'Composite Column'" [filter]="'compositeValueFilter'" [sortingCriteria]="'properties.v1,DESC|properties.v2,DESC'" > <property [name]="'properties.v1'"></property> <property [name]="'properties.v2'"></property> </composite-part> </thing-list-widget-v2>
Component Reference
Here is a comprehensive list of all the elements and properties that can be used to configure the component.
Thing List <thing-list-widget-v2> | |
---|---|
PROPERTIES | |
Actions Enabled | The boolean flag indicating whether actions (e.g. Add button) are enabled on the widget. Type: BOOLEAN | Optional | Values: true
false
[enableActions]="true" |
Advanced Search Always Open | If selected the advanced search is always open when entering the page, an cannot be closed. Type: BOOLEAN | Optional | Values: true
false
[advancedSearchAlwaysOpen]="true" |
Block Column Span | The number of columns on which to span the properties displayed in each list block (default 1). Type: INTEGER | Optional | Default: 1 [blockColumns]="2" |
Bulk Controls Enabled | The boolean flag indicating whether bulk selection and buttons (e.g. Tagging, Firmware Update) are enabled on the widget. Type: BOOLEAN | Optional | Values: true
false
[bulkControlsEnabled]="true" |
Controls Enabled | The boolean flag indicating whether controls (e.g. Search, Export) are enabled on the widget. Type: BOOLEAN | Optional | Values: true
false
[controlsEnabled]="true" |
CSS Class | The name(s) of the CSS class used to customize the widget layout. Type: STRING | Optional class="my-custom-class" |
Empty Message | The blank message to be displayed in the widget in case no item was found. To manage translations, you can define a label and use the key as the value of the property. Type: STRING | Optional emptyMessage="No customer found" |
Include Assigned | The boolean flag (true, false) indicating whether the list must include also ASSIGNED things. Type: BOOLEAN | Optional | Values: true
false
[includeAssigned]="true" |
Include Unassigned | The boolean flag indicating whether the list must include also UNASSIGNED things. Type: BOOLEAN | Optional | Values: true
false
[includeUnassigned]="true" |
Initial Sorting | The array of property names and criteria to use for sorting (e.g. ['name','asc','serialNumber','desc']). Type: SORT_PROPERTIES | Optional sort="['name','asc','serialNumber','desc']" |
Page Size | The number of items to load on each page. Type: INTEGER | Optional | Default: 50 [pageSize]="100" |
Query | The array of conditions filtering out items. For instance: [query]='[{'property': 'connectionStatus', 'predicate': 'eq', 'value': '1'}]' Predicates: eq, beginsWith, like, notLike, isEmpty, isNotEmpty, gt, gte, lt, lte. Type: QUERY | Optional query="[{'property': 'connectionStatus', 'predicate': 'eq', 'value': '1'}, {...}]" |
Query Variable | The id of the page's <things-filter-field> used for searching. Type: STRING | Optional queryFieldRef="query-1" |
Search Fields | The array of fields used to filter out the objects when searching by a generic key. For instance: [searchFields]='['name', 'serialNumber', 'customer.name', 'customer.code']' Type: PROPERTY_ARRAY | Optional searchFields="['name', 'serialNumber']" |
Title | The title displayed on the top part of the widget box. Type: STRING | Optional [title]="'Details'" |
SUB-ELEMENTS | |
Metric | The metric whose label and current value must be rendered as a widget row. Multiple | Optional <metric name="Temperature"></metric> |
Property | The property whose label and current value must be rendered as a widget row. Multiple | Optional <property name="serialNumber"></property> |
Composite Part | The widget part combining multiple properties and metrics. Multiple | Optional <composite-part> <metric name="Temperature"></metric> <metric name="Humidity"></metric> <property name="properties.type"></property> </composite-part> |
Metric <metric> | |
---|---|
PROPERTIES | |
Column CSS Class | The name(s) of the column CSS class used to customize the table column. Type: COLUMN_CSS | Optional columnClass="my-column-custom-class" |
Filter | The name of the filter used to transform and display values. Type: FILTER | Multiple value | Optional filter="fooBarFilter" |
Label | The metric alternative label. Type: STRING | Optional label="Temperature" |
Name | The metric whose value(s) must be loaded by the widget. Type: METRIC | Required name="Temperature" |
Show Header | The flag indicated whether the header is visible. Type: BOOLEAN | Optional | Values: true
false
[showHeader]="true" |
Unit | The unit of measurement to be displayed along the value. Type: STRING | Optional unit="°C" |
Visibility Condition | The expression that allows you to reduce the visibility of the element. Type: STRING | Optional *ngIf="getUser().organizationId != null" |
Property <property> | |
---|---|
PROPERTIES | |
Column CSS Class | The name(s) of the column CSS class used to customize the table column. Type: COLUMN_CSS | Optional columnClass="my-column-custom-class" |
Description | The property description. Type: STRING | Optional description="fooBar" |
Filter | The name of the filter used to transform and display values. Type: FILTER | Multiple value | Optional filter="fooBarFilter" |
Label | The property alternative label. Type: STRING | Optional label="Temperature" |
Name | The property whose value must be loaded by the widget. Type: PROPERTY | Required name="serialNumber" |
Show Header | The flag indicated whether the header is visible. Type: BOOLEAN | Optional | Values: true
false
[showHeader]="true" |
Visibility Condition | The expression that allows you to reduce the visibility of the element. Type: STRING | Optional *ngIf="getUser().organizationId != null" |
Composite Part <composite-part> | |||||
---|---|---|---|---|---|
PROPERTIES | |||||
Column CSS Class | The name(s) of the column CSS class used to customize the table column. Type: COLUMN_CSS | Optional columnClass="my-column-custom-class" |
||||
Description | The composite-part description. Type: STRING | Optional description="fooBar" |
||||
Filter | The filter applied on the composite-part to transform or display its value. Type: FILTER | Optional filter="fooBarFilter" |
||||
Label | The label displayed by the widget. Type: STRING | Optional label="fooBar" |
||||
Name | The composite-part name. Type: STRING | Optional name="fooBar" |
||||
Show Header | The flag indicated whether the header is visible. Type: BOOLEAN | Optional | Values: true
false
[showHeader]="true" |
||||
Sorting Criteria | The comma seprated list of property names and criteria to use for sorting the list column associated to this composite-part (e.g. properties.p1,ASC,properties.p2,DESC). Type: STRING | Optional sortingCriteria="properties.p1,ASC,properties.p2,DESC" |
||||
Visibility Condition | The expression that allows you to reduce the visibility of the element. Type: STRING | Optional *ngIf="getUser().organizationId != null" |
||||
SUB-ELEMENTS | |||||
Metric | The metric whose value must be loaded within the composite-part. Multiple | Optional <metric name="Temperature"></metric>
|
||||
Property | The property whose value must be loaded within the composite-part. Multiple | Optional <property name="serialNumber"></property>
|
Comments
0 comments
Please sign in to leave a comment.