This SDK allows to integrate Squirro into any web enabled framework, and works especially well with modern development libraries like React.js. It allows embedding Squirro dashboards, both in desktop and mobile environments.
a Squirro instance, to serve the dashboards and data
How does it work
The SDK exposes a jQuery extension, which can be used to load dashboards. Sample usage basically falls down to calling the jQuery method, passing options containing the Squirro instance URL, the project and dashboard ids, and authentication. The last is done either via Squirro token, or over SSO. Additional setup is required to set up the SSO component.
// $domElement is a jQuery element
tenant: '', // Required if non-SSO authentication
userId: '', // Required if non-SSO authentication
token: '', // Required if non-SSO authentication
Squirro SDK comes prebundled with jQuery, which can potentially cause conflicts if a much different version of jQuery is used already in the embedding environment. Such conflicts are however rare, and it is planned to support conditional loading of jQuery in the future.
Squirro requires Highcharts 6.1 to be loaded separately, if Highcharts based widgets are to be functional. The package is obtainable easily via a number of public repositories, but it can also be loaded locally.
Squirro SDK is available on npm package manager, under @squirro/sdk
Squirro SDK integrates well into the React framework. On top of being available on npm, which is what React uses as well, it plays well with React component state, and integrating jQuery extensions into React is a well known and tested technique. Consider the example below for a sample of the bidirectional communication achievable with this close form of integration.