Faceplate

This widget can be used to show value, quality and timestamp (VQT) of a dynamic object from the system. It will subscribe to the data changes of the specified object.

Clicking on the timestamp in the faceplate widget will toggle the value between the date (date and time the value was updated) and the age (time passed since value was last updated). If the timestamp shows the date, hovering over the value will display the age and vice versa.

Note: This is a preliminary version and a visual copy of the faceplate from DataStudio. It will be changed in the future but will always show the VQT.

Model

{
    "type": "faceplate",
    "actions": {},
    "dataSource": {},
    "path": "/System/Core/Examples/Demo Data/Process Data/DC4711",
    "toolbars": {}
}
Field Description

actions

Optional property to implement action pipelines for selected trigger events.

dataSource

Property used to retrieve data from the system

path

Path to designated object in the system. If the object path cannot be resolved, an error overlay will be displayed over the widget.

toolbars

Optional configuration to add, customise and hide toolbars. See the toolbars section below.

DataSource

If the dataSource property is defined as an object, then the message returned by the data is determined by whether the type property matches the widget type. If this is the case, then any matching model properties defined in the payload will be merged to the model. If the type defined in the payload does not match the widget type, then the path field is checked in the payload and merged into the model.

If the payload, when defined as an object, does not contain the type or the path field, or the payload is defined as an array, then no fields from the payload will be merged to the model.

Alternatively, if the payload is defined as a string, the content of the payload will be merged to the path property in the model.

DataSource Pipeline

DataSource Examples

The following sections provide examples of the message payload returned by the dataSource on the Faceplate widget and the expected merge behavior when applied to the widget model.

Message payload defined as an object where the type field matches the widget type

If the dataSource on the faceplate widget returns the following payload, where the type property matches the widget type, then any matching model properties will be applied to the model. In this example, the path, captionBar and layout properties will be merged to the model.

{
    "payload": {
        "type": "faceplate",
        "path": "/System/Core/Examples/Demo Data/Process Data/QC4711",
        "captionBar": {
            "hidden": false,
            "title": "Simulated Quality QC4711"
        },
        "layout": {
            "static": true,
            "w": 20,
            "h": 15,
            "x": 0,
            "y": 0
        }
    }
}

Message payload defined as an object, where the type field is not defined but the path is included

If the dataSource returns a payload where the type is not defined, the path property will be checked for in the payload and if defined, will be the only field from the payload which is merged to the model.

{
    "payload": {
        "path": "/System/Core/Examples/Demo Data/Process Data/QC4711",
        "captionBar": false,
        "options": {
            "backgroundColor": "darkorange"
        }
    }
}

Message payload, defined as an object, where both the type and path fields are not defined

If the message payload returned by the dataSource does not contain a type or path field, then no fields from the payload are merged with the model.

{
    "payload": {
        "captionBar": false,
        "actions": {
            "didRefresh": {
                "type": "notify"
            }
        }
    }
}

Actions

The actions property for the faceplate widget can be used to implement action pipelines for specific trigger events and action hooks. The faceplate widget only supports the general widget action hooks, which can be found here.

Receive messages (Send Topics)

The faceplate widget can receive messages from other widgets. This widget only supports the generic send topics refresh and update.

Toolbars

The faceplate widget supports multiple custom toolbars. For information on configuring custom toolbars, see the toolbars section in the widget documentation.

Tools

The following tools have a default implementation in the faceplate widget:

Icon Name Description

Refresh Btn

Refresh

Refreshes the widget datasource and displays the latest data in the widget

Spacer

This tool is used to specify the spacing between tools in the widget toolbar. It can be customised using the style and styleByTheme properties.