Custom Datasources
Should you need to create a custom datasource, it is a straightforward task involving javascript development. The high level steps involved are as follows:
- Create a javascript file (ex. my_datasource.js)
- Implement the datasource schema
- Specify datasource settings
- Implement the datasource model
- Host the javascript file on a file server or upload it to github
- Link the custom datasource to the portal within the ClearBlade developers console
Custom Datasources Schema
All custom datasources must contain a call to freeboard.loadDatasourcePlugin, passing in the datasource schema.
All custom widgets must contain a call to freeboard.loadWidgetPlugin, passing in the widget schema.
type_name
- A unique reference that will be used locally in the portal
display_name
- The name that appears in the list of available datasources
settings
- An array of user editable settings
- See next slide
newInstance
- An initialization function that generates an instance of the widget
0 comments