Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

The reference shows the full usage of the custom dashboard loaders for Squirro dashboards.

 In this reference the command line utility squirro_asset and it's usage for uploading custom loaders to a Squirro cluster is explained. Then each  Each of the main components of a custom dashboard loader has its own section: JavaScript, CSS, HTML.

Table of Contents

Table of Contents
outlinetrue
excludeTable of Contents

Files

On the local disk a Squirro custom dashboard loader is a folder. That folder contains a number of files that all have their purpose.

FileTypeExplanation
loader.jsJavaScriptThe executable code of the dashboard loader. This file is loaded together with the dashboard.

Managing Loaders (squirro_asset)

The Toolbox comes with a command line utility squirro_asset which along other things is used to manage custom widgets dashboard loaders on a Squirro installation.

The full reference of this command can squirro_asset can be found in the separate section squirro_asset Command Line Reference.

JavaScript

Custom dashboard loaders are implemented as JavaScript objects, deriving from the Loaders.Base class. The Loaders object is automatically exposed in the scope of the custom dashboard loader.

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

Code Block
languagejs
titleloader.js
return Loaders.Base.extend({
    // Class properties and methods here
});

Base Loaders

This example extends from the Loaders.Base base class. At the moment it is the only loader class available.

API

The JavaScript API, including all properties and methods to be overwritten, is documented in the Custom Widgets API.