I have a backend datasource working pretty well for my building automation system. Now I’m interested in exploring a little more and making it a little more advanced. I have been studying this API document to try to imagine the possibilities but there aren’t any descriptions for the methods. Here’s what I’ve learned so far. A few of them are documented in the tutorial and examples, but I’ll include them anyway, for completeness.
- setConfigEditor() sets the component that configures the datasource itself - for example, URL to the server
- SetQueryEditor() sets the component that configure each query added to your panels
- SetMetadataInspector() looks like it’s used for displaying statistics in the stats page of the query inspector, but if you don’t provide one it gives you a generic table
- SetQueryEditorHelp() is probably what it sounds like
These are listed in the source is deprecated, so I’ll ignore them
These have the word ‘explore’ in them so I think they are specifically support for the explorer, but I’m not sure what ‘field’ means here.
Similarly, these all have “control” in them and I’m inferring that they mean angular controls, meaning you can ignore them if you’re building a React based datasource:
- SetConfigCtrl() - an angular datasource configuration component
- SetQueryCtrl() - an angular style query editor component
but also in the *Ctrl category is this:
which is a small mystery. This Document tells you how to enable annotations but it doesn’t mention how this function is used. A few datasources use it but they are all angular. If you want to provide a custom annotation “query control” does it have to be angular?
Lots of assumptions here … if somebody can clear up any of them for me I would be appreciative.