Squirro Widget SDK#

Custom widgets are implemented as Backbone.js views.

The template for a new widget.js file is as follows:

return Widgets.Base.extend({
    // Class properties and methods here
});

Where Base should be changed depending on the type of widget being customised.

The SDK supports loading multiple HTML files, but it also offers special handling for the widget.html file. Simply adding this file to the custom widget will ensure its being displayed. No support is offered, however, for refreshing custom templates due to dashboard interactions, and is instead left to the developer to handle manually.

The Custom Widget SDK provides access to some external JavaScript libraries. Loading of custom scripts is currently not fully supported, but will be added in a future Squirro release.

Loaded Libraries#

The following libraries are loaded by default and available in the global context in a custom widget.

Library

Variable

jQuery

$, jQuery or this.$() to query inside the current widget only

Bootstrap

Through jQuery

Highcharts.js

Highcharts

The list of shipped extendible widgets follows in the next pages.