MangoAutomation / ma-core-public

Mango Automation Core public code
Other
79 stars 50 forks source link

Event Detectors - Review Linking to Data Points #919

Open terrypacker opened 7 years ago

terrypacker commented 7 years ago

Currently Event Detectors are linked to a point via the dataPointID column in the database. This may not be necessary and would allow re-using event detectors across multiple data points.

If we were to remove the data point reference in the detector and change the data point to reference its detectors this would be achievable.

Also note that the JSON export of Event Detectors does not deal with the source ID member so you cannot export them and know what data point they belong to.

terrypacker commented 6 years ago

As per #1096 I'm adding an important review of the state of the JSON export:

Just to confirm the JSON options for this are:

This should potentially be put into a help file/page somewhere.

NOTE: I believe that currently the import/export of only EventDetectors would fail since the sourceId of the AbstractEventDetector does not get exported.

NOTE: The Event Detector Importer will need some work when we define new types of Detectors as it will fail if a dataPointXID key is not found.