Organizing Indicators¶
This section describes the user actions in the Indicator Manager UI for organizing Indicator definitions in groups.
After application startup the Indicator Explorer is empty, sowing only the root Database node.
Create a group¶
Description | Illustration |
---|---|
Right-click the root node and select “Add New Group” to create a new group. A new empty group is created below the clicked node. |
|
You may see this Information dialog telling to switch “Show Empty Groups" to see the newly created group. | |
Right-click a node and select “Show empty Groups” | |
The new group is visible. |
Rename a group¶
Description | Illustration |
---|---|
Right-click a group and select “Rename” (or select the group and press F2) to edit the name of the group. | |
Change the name and press Enter to confirm the new name. Press Esc to cancel the rename action. Note: the groups must have unique names at any given level in the tree. |
Show empty groups¶
The explorer will by default only show groups with content. This will mean new
(empty) groups will not be immediately visible when created.
Description | Illustration |
---|---|
Right-click a node and select “Show empty Groups” | |
The new group is visible |
Delete groups¶
Description | Illustration |
---|---|
Right-click a group node and select “Delete” to delete the group and everything in it (i.e. the entire branch of the explorer tree including sub-groups and indicators will also be deleted). Alternatively select the node and press “Del” |
Copy or Move groups¶
Groups (entire branches in the tree) can be moved and copied between groups using keyboard and/or the mouse.
Right-click a group and select “Copy” to mark the entire branch of the tree for copying to another location. To move the branch select “Cut”. Alternatively select the group and use shortcut keys Ctrl+C and Ctrl+X respectively.
Right-click the target group and select “Paste” to copy or insert the branch. Alternatively select the target node and press keys Ctrl+V to paste the branch.
The group/branch is inserted at the location.
The mouse can also be used to move groups/branches around. Simply select a group with left-mouse click and drag it while holding down the moose. When the target group is highlighted, release the mouse.
and the group/branch is moved.
Note:
holding down the Ctrl-key will copy the group/branch instead of moving it.
Define an indicator¶
The steps to define an indicator are:
- Create the Indicator in a group
- Edit the indicator
- Give it a name
- Assign a script
- Assign arguments
- Calculate
- Save the indicator
Create an Indicator¶
Description | Illustration |
---|---|
To start definition of a new indicator, right-click a group node and select “Add New Indicator”. | |
This will open an empty Indicator view with details to be filled. The same dialog is used for editing an existing indicator |
Define details of a simple indicator¶
Description | Illustration |
---|---|
Give it a name and optionally a description. The name must be unique within the group. |
|
Drag a script from the Script Explorer in the Script Manager to specify the script to use ith the indicator | |
The path of the script is shown. And the list of parameters is populated based upon detail information from the script. |
|
Each parameter has a name, description and type. Depending on the type the user may define the input to use. For simple types like integer, float, double, string, boolean the value is ususally a constant while more complex types may use object references. Specify the values to use and click the Calculate button to evaluate the script with the parameters. |
|
The value is calculated | |
Press the Save button to store the Indicator definition (script reference, parameter list and calculated value). The Indicator name appears in the Indicator Explorer. |
|
Once created the indicator can be re-calculated. Right-click and choose “Calculate” (or select the indicator in the Explorer and press F5). This will update the indicator with the calculated value. |
|
When an Indicator is selected in the Explorer the properties can be seen in the Properties Control – including the latest calculated value |
Define details of a more complex indicator¶
If the parameters of a script are more complex than simple types, e.g. a data series, the parameter definition can be supplied with drag/drop from the relevant Explorer.
Create a new indicator and drag a script that takes a data series as input.
The populated parameter list shows the parameter (in this case named “dataseries”) with a type of IDataseries.
This represents an entity in the time series manager.
The value type can in this cas be either “Entity id” or “Entity descriptor”. In both cases the Value displayed is the path of the value/object, but in the database the specification is different.
For “Entity id” the Indicator holds the ID of the object, i.e. a guid. For “Entity descriptor” the database holds the path of the entity. The ID is constant in case the entity changes name, but will change if the object is deleted and re-creted with the same name. The path identifies the entity by name and location. The value type to use will depend upon the nature of the referred entity in order not to break the Indicator definition.
To specify the data series to use, simply drag/drop it from the Time series Explorer into the Value field of the Indicator.
The Value displays the path of the entity.
Too complex scripts¶
Not all scripts can be used for indicators. The return values of the script must be a simple type representing a number (integer, float, double).
The figures below illustrate the behavior if an ineligible script is being used.
Script AddToSeries takes 2 arguments: a data series and a number. It runs a tool to add the number to the value of a series. It returns the new dataseries of type IDataseries.
An attempt to use the script for an indicator definition will result in an error dialog informing that only scripts retuning a number can be used.
If a valid script is being used for the definition of an indicator, and this script then later is modified in the Script Manager to return other than a number a similar erro will occur when attempting to calculate the indicator.
If for instance AverageOfSeries returns something the than the average number evaluation of it will display this pop-up.