Web Components for Insights Hub and Industrial IoT
Rule View
Warning
The Rule View supports only Rules for asset instances and is deprecated since July 2022. Use instead the components Rule Table and Rule Wizard with latest feature enhancements supporting Rules for Asset Types.
The Rule View displays rules of a specific asset and allows users to create new rules using a wizard, activate / deactivate or delete rules.
A triggered rule is marked in the overview table with the color of the configured severity.
Examples¶
Rule Overview¶
Rule Wizard¶
Interface¶
Models¶
IDataModel
interface IDataModel {
// forces reload of data, e.g. re-loading the rules
refresh(): void;
}
IViewModel
interface IViewModel {
refresh(): void;
}
Remarks¶
- The number of rules which can be activated simultaneously is limited and depends on the selected plan size.
To enhance the rule limit further "Rules Quota Upgrade" packages can be purchased in the Store. For latest information refer the IoT Value Plan product sheets or contact customer support. - In case the limit is exceeded you cannot create any further rule and will see the following warning message.
- The rule engine triggers only in case of state changes. If values are still violated the rules are not triggered again.
Example
A rule has been created to monitor a value greater 90.
Now the value changes from 89 to 91 - means a state change happens - and the rule will be triggered and perform the configured actions.
Next the value changes from 91 to 100 - here no state change happens, due to the rule is already violated - and the rule won't be triggered again.
Roles¶
mdsp:core:tsm.full-access
(for full access like create and delete)mdsp:core:tsm.read-only
(read only)
Snippets¶
Refresh the Rule View¶
The data model of the Rule View can be refreshed to get the latest list of rules, for example to update the view cyclically.
ruleViewComp.model.refresh();
Overwrite asset id in table headers with asset name¶
With the snippet below, you can format the table header and the columns, for example, to replace the asset id with an asset name or to show text in different languages.
document.querySelector('mdsp-rule-view').tableFormatters = {
columnFormatters: {
"assetId": {
header: function(value){
return "Asset Name";
},
value: function(value){
return "DUMMY_REPLACE_ASSET_NAME";
}
},
}
}
Except where otherwise noted, content on this site is licensed under the Development License Agreement.