Widget

Widgets allow you to display metrics in the standard view of the SAYMON UI.

Widgets are a part of entity’s client data.

Widget Model

Field Type Description

id

String

Widget’s ID.

type

String

Widget’s type.

parameters

Object

A set of widget’s parameters. Depends on Widget Type.

Widget Types

SAYMON provides 10 types of widgets, each having its own set of parameters. Below you can find the names of widgets' types (shown as a header) along with a set of parameters for each of the widgets.

Widget settings described below are defined in the parameters field.

counter

Counter widget displays the text and numeric values from the Data table.

Counter Widget
Field Type Description

bindPeriod

String

Type of the displayed metric interval.

Available options:

  • present – count from present moment backwards,

  • calendar – count from the specified calendar period.

customAvgPeriod

Object

When you set the periodAvg field to custom, you can specify the time period in this field.

customAvgPeriod.from

Integer

A starting timestamp for the custom metric time interval.

customAvgPeriod.to

Integer

An ending timestamp for the custom metric time interval.

dictionary

String | Object

Dictionary used to display metric values. To use a pre-defined dictionary, specify is name:

{
    "parameters": {
        ...
        "dictionary":"test"
    }
}

You can also define a unique dictionary for a specific widget:

"parameters": {
    ...
    "dictionary": {
        "0": "No data",
        "4": "Normal"
    }
}

entity

String

Entity in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

This field has the following format:

<object|link>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488:

"parameters": {
    "entity": "objects-659ce032cec144058ea7f488",
    ...
}

fontSize

Integer

The size of a font used for a multiline metric.

humanReadable

Boolean

Abbreviate the value if possible. Removes any leading and trailing zeroes and replaces large numbers with a suffix (for example, 1543000.82 turns into 1.54 M). Works only if toStringValue is set to false.

metric

String

The name of a metric displayed on the widget.

metricAvg

String

The type of transformation applied for metric values. You can specify a period for every transformation type, except current. This period can be customized with the bindPeriod, periodAvg, customAvgPeriod, and showBeforeTimes fields.

Available options:

  • current – current value,

  • min – minimum value,

  • avg – average value,

  • max – maximum value,

  • count – number of points,

  • zimsum – sum of all values,

  • dev – standard deviation.

metricCaption

String

The caption of the displayed metric. Leave blank to display the metric name as caption.

multiline

Boolean

Whether to use the multiline format to display metrics.

periodAvg

String

The size of a time interval on which metric values should be displayed. Available options: 1h, 1d, 1w, 1n, 3n, 1y, custom.

custom period must be specified in the customAvgPeriod field.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.

showBefore

Boolean

Whether to show metrics for a previous period.

showBeforeTimes

Integer

Period offset for the displayed metrics. The showBefore field must be set to true.

Uses value in the periodAvg field to specify the unit. For example, the following configuration will offset displayed metrics for 3 hours:

"parameters": {
    "periodAvg": "1h",
    "showBeforeTimes": "3",
    ...
}

showName

Boolean

Whether to show a metric’s caption or a metric’s name.

theme

String

Widget’s theme. Available options: minimal, car, train-station.

toStringValue

Boolean

Whether to display the value as it was received, including every digit.

For example, if this field is set to false, the value 14.428934061353705 will be shortened displayed as 14.429.

ring

Ring widget displays percentage values from the Data table.

Ring Widget
Field Type Description

bindPeriod

String

Type of the displayed metric interval.

Available options:

  • present – count from present moment backwards,

  • calendar – count from the specified calendar period.

customAvgPeriod

Object

When you set the periodAvg field to custom, you can specify the time period in this field.

customAvgPeriod.from

Integer

A starting timestamp for the custom metric time interval.

customAvgPeriod.to

Integer

An ending timestamp for the custom metric time interval.

entity

String

Entity in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

This field has the following format:

<object|link>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488:

"parameters": {
    "entity": "objects-659ce032cec144058ea7f488",
    ...
}

metric

String

The name of a metric displayed on the widget.

metricAvg

String

The type of transformation applied for metric values. You can specify a period for every transformation type, except current. This period can be customized with the bindPeriod, periodAvg, customAvgPeriod, and showBeforeTimes fields.

Available options:

  • current – current value,

  • min – minimum value,

  • avg – average value,

  • max – maximum value,

  • count – number of points,

  • zimsum – sum of all values,

  • dev – standard deviation.

metricCaption

String

The caption of the displayed metric. Leave blank to display the metric name as caption.

periodAvg

String

The size of a time interval on which metric values should be displayed. Available options: 1h, 1d, 1w, 1n, 3n, 1y, custom.

custom period must be specified in the customAvgPeriod field.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.

showBefore

Boolean

Whether to show metrics for a previous period.

showBeforeTimes

Integer

Period offset for the displayed metrics. The showBefore field must be set to true.

Uses value in the periodAvg field to specify the unit. For example, the following configuration will offset displayed metrics for 3 hours:

"parameters": {
    "periodAvg": "1h",
    "showBeforeTimes": "3",
    ...
}

showName

Boolean

Whether to show a metric’s caption or a metric’s name.

percent-bar

Percent bar (or level) displays percentage values from the Data table.

Percent Bar
Field Type Description

bindPeriod

String

Type of the displayed metric interval.

Available options:

  • present – count from present moment backwards,

  • calendar – count from the specified calendar period.

customAvgPeriod

Object

When you set the periodAvg field to custom, you can specify the time period in this field.

customAvgPeriod.from

Integer

A starting timestamp for the custom metric time interval.

customAvgPeriod.to

Integer

An ending timestamp for the custom metric time interval.

entity

String

Entity in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

This field has the following format:

<object|link>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488:

"parameters": {
    "entity": "objects-659ce032cec144058ea7f488",
    ...
}

metric

String

The name of a metric displayed on the widget.

metricAvg

String

The type of transformation applied for metric values. You can specify a period for every transformation type, except current. This period can be customized with the bindPeriod, periodAvg, customAvgPeriod, and showBeforeTimes fields.

Available options:

  • current – current value,

  • min – minimum value,

  • avg – average value,

  • max – maximum value,

  • count – number of points,

  • zimsum – sum of all values,

  • dev – standard deviation.

metricCaption

String

The caption of the displayed metric. Leave blank to display the metric name as caption.

periodAvg

String

The size of a time interval on which metric values should be displayed. Available options: 1h, 1d, 1w, 1n, 3n, 1y, custom.

custom period must be specified in the customAvgPeriod field.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.

showBefore

Boolean

Whether to show metrics for a previous period.

showBeforeTimes

Integer

Period offset for the displayed metrics. The showBefore field must be set to true.

Uses value in the periodAvg field to specify the unit. For example, the following configuration will offset displayed metrics for 3 hours:

"parameters": {
    "periodAvg": "1h",
    "showBeforeTimes": "3",
    ...
}

showName

Boolean

Whether to show a metric’s caption or a metric’s name.

pie

Pie chart widget allows to choose and compare several metrics from one object or several metrics with the same names from several objects.

Pie Chart Widget
Field Type Description

bindPeriod

String

Type of the displayed metric interval.

Available options:

  • present – count from present moment backwards,

  • calendar – count from the specified calendar period.

colors

Array<String>

An array of colors used for metrics of the pie widget.

Default – not set, colors are picked from the list of default pie chart colors set in the web application configuration.

customAvgPeriod

Object

When you set the periodAvg field to custom, you can specify the time period in this field.

customAvgPeriod.from

Integer

A starting timestamp for the custom metric time interval.

customAvgPeriod.to

Integer

An ending timestamp for the custom metric time interval.

entity

Array<String>

Entity or a list of entities in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

Entity is defined with the following format:

<objects|links>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488 and a link with the ID 659cdffbcec144058ea7f44c:

"parameters": {
    "entity": [
        "objects-659ce032cec144058ea7f488",
        "links-659cdffbcec144058ea7f44c",
    ]
    ...
}

innerRadius

Integer

The radius of an inner circle.

legend

Boolean

Whether to display a widget’s legend.

metric

Array<String>

An array of metrics that should be displayed on the pie widget.

metricAvg

String

The type of transformation applied for metric values. You can specify a period for every transformation type, except current. This period can be customized with the bindPeriod, periodAvg, customAvgPeriod, and showBeforeTimes fields.

Available options:

  • current – current value,

  • min – minimum value,

  • avg – average value,

  • max – maximum value,

  • count – number of points,

  • zimsum – sum of all values,

  • dev – standard deviation.

metricCaption

String

The caption of the displayed metric. Leave blank to display the metric name as caption.

periodAvg

String

The size of a time interval on which metric values should be displayed. Available options: 1h, 1d, 1w, 1n, 3n, 1y, custom.

custom period must be specified in the customAvgPeriod field.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.

sectorLabel

String

The type of a label used for pie widget metrics. Available options: none, percent, value, entity.

sectorLabelColor

String

The color of a section label.

showBefore

Boolean

Whether to show metrics for a previous period.

showBeforeTimes

Integer

Period offset for the displayed metrics. The showBefore field must be set to true.

Uses value in the periodAvg field to specify the unit. For example, the following configuration will offset displayed metrics for 3 hours:

"parameters": {
    "periodAvg": "1h",
    "showBeforeTimes": "3",
    ...
}

showName

Boolean

Whether to show a metric’s caption or a metric’s name.

radar

Radar widget allows you to display and compare metrics of multiple entities.

Radar Widget
Field Type Description

bindPeriod

String

Type of the displayed metric interval.

Available options:

  • present – count from present moment backwards,

  • calendar – count from the specified calendar period.

customAvgPeriod

Object

When you set the periodAvg field to custom, you can specify the time period in this field.

customAvgPeriod.from

Integer

A starting timestamp for the custom metric time interval.

customAvgPeriod.to

Integer

An ending timestamp for the custom metric time interval.

entity

Array<String>

Entity or a list of entities in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

Entity is defined with the following format:

<objects|links>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488 and a link with the ID 659cdffbcec144058ea7f44c:

"parameters": {
    "entity": [
        "objects-659ce032cec144058ea7f488",
        "links-659cdffbcec144058ea7f44c",
    ]
    ...
}

legend

Boolean

Whether to display a widget’s legend.

metric

Array<String>

An array of metrics that should be displayed on the radar widget.

metricAvg

String

The type of transformation applied for metric values. You can specify a period for every transformation type, except current. This period can be customized with the bindPeriod, periodAvg, customAvgPeriod, and showBeforeTimes fields.

Available options:

  • current – current value,

  • min – minimum value,

  • avg – average value,

  • max – maximum value,

  • count – number of points,

  • zimsum – sum of all values,

  • dev – standard deviation.

metricCaption

String

The caption of the displayed metric. Leave blank to display the metric name as caption.

periodAvg

String

The size of a time interval on which metric values should be displayed. Available options: 1h, 1d, 1w, 1n, 3n, 1y, custom.

custom period must be specified in the customAvgPeriod field.

custom period must be specified in the customAvgPeriod field.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.

showBefore

Boolean

Whether to show metrics for a previous period.

showBeforeTimes

Integer

Period offset for the displayed metrics. The showBefore field must be set to true.

Uses value in the periodAvg field to specify the unit. For example, the following configuration will offset displayed metrics for 3 hours:

"parameters": {
    "periodAvg": "1h",
    "showBeforeTimes": "3",
    ...
}

showName

Boolean

Whether to show a metric’s caption or a metric’s name.

chart

Chart widget allows you to plot a graph based on a specified metric.

Chart Widget
Field Type Description

chartType

String

The type of a char. Available types: lines, bars.

downsample

Integer

The size of an interval used for downsampling.

duration

Integer

The length of a period on which metrics are displayed. Should be specified in milliseconds.

entity

String

Entity in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

This field has the following format:

<object|link>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488:

"parameters": {
    "entity": "objects-659ce032cec144058ea7f488",
    ...
}

legend

Boolean

Whether to show a legend on the widget.

metric

String

A metric (of several metrics) displayed on the chart widget. The metrics should be specified as a mathematical formula.

movingAverage

Boolean

Whether to use a moving average on a chart.

movingAveragePeriod

Integer

The length of an interval on which a moving average should be calculated.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.

graph

Graph widget displays the relations of object’s child entities.

Graph Widget
Field Type Description

depth

Integer

The depth of a graph.

entity

String

Entity in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

This field has the following format:

<object|link>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488:

"parameters": {
    "entity": "objects-659ce032cec144058ea7f488",
    ...
}

graphType

String

The type of a graph. Available types: block, blockVert, mindMap, force.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.scale

Integer

The scale of a graph.

position.translation

Array<Integer>

The coordinates of a graph inside the widget.

position.width

Integer

Widget’s width.

section

Section widget allows you to display a section from an end view

Section Widget
Field Type Description

entity

String

Entity in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

This field has the following format:

<object|link>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488:

"parameters": {
    "entity": "objects-659ce032cec144058ea7f488",
    ...
}

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.

section

String

The type of a section displayed inside the widget. Available types: stat, properties, documents, state-history, operations-history.

operation-widget

Operation widget is a button that performs a specified operation.

Button Widget
Field Type Description

color

String

The color of a button displayed on the widget.

entity

String

Entity in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

This field has the following format:

<object|link>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488:

"parameters": {
    "entity": "objects-659ce032cec144058ea7f488",
    ...
}

operation

String

The ID of an operation. This operation will be executed after the user clicks the button on the widget.

operationCaption

String

Operation’s caption.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.

iframe

Iframe widget allows to embed content from other resources to the system web interface.

IFrame Widget
Field Type Description

entity

String

Entity in which to search for the metric displayed on the widget. Leave empty to search the specified metric in the object to which the widget is attached.

This field has the following format:

<object|link>-<id>

For example, the widget with the following configuration will search for metrics in an object with the ID 659ce032cec144058ea7f488:

"parameters": {
    "entity": "objects-659ce032cec144058ea7f488",
    ...
}

src

String

URL of the page shown in an iframe.

type

String

MIME type of the media shown in an iframe.

position

Object

Widget’s transform in standard and detailed views.

position.height

Integer

Widget’s height.

position.width

Integer

Widget’s width.