Displays the properties of a work session in a details box.
Configuration
Design View
In the visual editor, you can find the Work Session Details icon under the Work Sessions component palette group.
You can drag the widget into the grid and then configure the following sub-elements according to your needs:
Property: the property whose label and current value must be rendered as a widget row.
Composite Part: the widget part combining multiple properties.
Code View
Template Syntax
Below you can find some examples of how to use the component within a template.
<work-session-details-widget title="Work Session Details"> <property name="name"></property> <property name="date"></property> <property name="duration"></property> <property name="metrics.Recipe Energy.CURRENT" label="Energy [kWh]" filter="divBy1000_2dec"></property> </work-session-details-widget>
Component Reference
Here is a comprehensive list of all the elements and properties that can be used to configure the component.
Work Session Details <work-session-details-widget> | |
---|---|
PROPERTIES | |
Column Span | The number of columns the widget must span its sub-elements (default 1).
Type: INTEGER | single | Optional [columns]="2" |
CSS Class | The name(s) of the CSS class used to customize the widget layout.
Type: STRING | single | Optional class="my-custom-class" |
Layout | The layout used to display properties in the widget:
TABLE: Displays one column for the label and another for the property value. ALTERNATE_ROWS: Displays a gray row for the label and a white row for the property value. Type: ENUM | single | Optional | Values: TABLE ALTERNATE_ROWS layout="ALTERNATE_ROWS" |
Title | The title displayed on the top part of the widget box.
Type: STRING | single | Optional [title]="'Details'" |
Visibility Condition | The expression that allows you to reduce the visibility of the element.
Type: STRING | single | Optional *ngIf="getUser().organizationId != null" |
SUB-ELEMENTS | |
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. multiple | optional <composite-part> <property name="name"></property> <property name="duration"></property> </composite-part> |
Property <property> | |
---|---|
PROPERTIES | |
Filter | The name of the filter used to transform and display values.
Type: FILTER | multiple | Optional filter="fooBarFilter" |
Label | The property alternative label.
Type: STRING | single | Optional label="Temperature" |
Name | The property whose value must be loaded by the widget.
Type: PROPERTY | single | Mandatory name="serialNumber" |
Show Label | The flag indicated whether the label is visible.
Type: BOOLEAN | single | Optional | Values: true false [showLabel]="true" |
Visibility Condition | The expression that allows you to reduce the visibility of the element.
Type: STRING | single | Optional *ngIf="getUser().organizationId != null" |
Composite Part <composite-part> | |||||
---|---|---|---|---|---|
PROPERTIES | |||||
Filter | The filter applied on the composite-part to transform or display its value.
Type: FILTER | single | Optional filter="fooBarFilter" |
||||
Label | The label displayed by the widget.
Type: STRING | single | Optional label="fooBar" |
||||
Name | The composite-part name.
Type: STRING | single | Optional name="fooBar" |
||||
Show Label | The flag indicated whether the label is visible.
Type: BOOLEAN | single | Optional | Values: true false [showLabel]="true" |
||||
Visibility Condition | The expression that allows you to reduce the visibility of the element.
Type: STRING | single | Optional *ngIf="getUser().organizationId != null" |
||||
SUB-ELEMENTS | |||||
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.