Open terrypacker opened 7 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:
Export Data Points, 'eventDetectors' is a JSON key with no 'handlers' key output inside them
Export Event Handlers with 'eventTypes' as the link to data point (or any VO) XID and Detector XID
Export Event Detectors can be exported but no link to handlers is made (Not a visible option in UI)
Import Data Points with 'eventDetectors' that may include 'handlers' and XID list of handlers
Import Event Handlers with 'eventTypes' or 'eventType' that link to data point (or any VO) XID and Detector XID
Import Event Detectors containing the key 'handlers' which are the XIDs of existing handlers.
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.
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.