Batch Table

This widget shows batch (BPR) headers in a tabular view. The widget derives from Time Period Table and contains Table and Time Period Pickers.

Model

{
    "type": "batchtable",
    "actions": {},
    "dataSource": {
        "type": "fetch",
        "path": "PATH TO BATCH OWNING OBJECT",
        "filter": {},
        "project": {},
        "sort": {},
        "skip": 0,
        "limit": 1000
    },
    "endtime": "2020-10-01T10:00:00:000Z",
    "maxDuration": "1h",
    "starttime": "2020-10-01T00:00:00:000Z",
    "table": {},
    "toolbars": {}
}
Field Description

actions

In addition to the default lifecycle actions, the batch table widget support additional action hooks.

dataSource

Optional data source from which the data and model for the widget can be loaded from.

endtime

End time can be assigned to initialize the Time Pickers

maxDuration

This property can be used to configure the maximum length of the time period in which data can be collected.

starttime

Initial start time can be assigned to initialize the Time Pickers

table

This can be used to directly access other widgets that are contained within the batch table widget. See the Table widget for details.

toolbars

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

Actions

Additional hooks:

  • onSelect: Invoked when row is selected.

onSelect action

{
    "table": {
        "actions": {
            "onSelect": []
        }
    }
}

The widget will pass this object as message payload into the pipeline.

{
    "batchid": "Batch_1601472379000",
    "duration": "00:01:50",
    "endtime": 1601472499000,
    "entryid": "c1c393ac-0320-11eb-80f1-e15ed41ae343",
    "starttime": 1601472389000
}

DataSource

If the dataSource property is defined as an object, the message returned from the data is usually determined by the type property. For further information, see the DataSource section in the widget documentation. If the type field in the dataSource does not match the widget type, then, the data, starttime and endtime fields are checked in the payload and merged into the model. If none of these fields are defined, the payload will be assigned to the data property if the message topic is not "selectRows". See the Table widget.

Toolbars

The batch table widget can have one or more custom toolbars. By default, the batch table has a toolbar on the top of the widget. In addition, the table contained within the widget has two toolbars, one at the top and one at the bottom of the widget. To add custom toolbars to the widget, see the toolbars section in the widget documentation.

Tools

The following tools have a default implementation in the batch table widget:

Icon Name Description

Filter Btn

Filter

Shows/hides the filter field in each column of the batch table.

Page Control

Page Control

This tool can be used to navigate between pages and to change the number of rows in the batch table.

Refresh Btn

Refresh

Refreshes the widget datasource

Search Btn

Search

Shows/hides the search input box. Used to search for table entries.

Spacer

This tool is used to specify the alignment of tools in the widget toolbar.

Selected Rows Indicator

Selected Rows Indicator

When the options.multi property is set to true, this indicates the number of rows selected.

Time Period Btn

Time Period

Configuration for the time period to retrieve data to populate the batch table.

Visible Rows Indicator

Visible Rows Indicator

Indicates the number of rows visible in the batch table.