MangoAutomation / ma-dashboards

Mango Module for creating custom HTML5 Dashboards using AngularJS
Other
6 stars 7 forks source link

UI Improvements in Script Validation for Items that use UNCHANGED #307

Open terrypacker opened 4 years ago

terrypacker commented 4 years ago

Some scripts can return the special value of UNCHANGED to indicate not to do something.

The way to correctly validate these is to ensure the resultDataType is set to BOOLEAN in the MangoJavaScriptModel when validating Email Handlers and Point Links otherwise no result will be returned as none is expected.

The result will be an Alphanumeric point value that contains the translated words for the translation eventHandlers.script.successUnchanged. See the attached for how a Meta Point displays this result:

image

terrypacker commented 4 years ago

Left TODO:

The data type is set on the backend to ensure the result will be returned. The UI should not display an empty script result though, which will happen if there is no return statement on the script.

terrypacker commented 4 years ago

We need to handle the situation where no value is returned during validation but the validate tool still display an empty result.