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:

  1. Create a javascript file (ex. my_datasource.js)
  2. Implement the datasource schema
  3. Specify datasource settings
  4. Implement the datasource model
  5. Host the javascript file on a file server or upload it to github
  6. 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

Complete and Continue  
Discussion

0 comments