...
File | Type | Explanation | |||||
---|---|---|---|---|---|---|---|
widget.js | JavaScript | The executable code of the widget. This file is loaded when the widget is used on a dashboard. | |||||
widget.css | 86053650CSS | Styling of the widget. This file must exist even when no styles are used for the widget. | |||||
widget.html | HTML | Template for the HTML code of the widget. Even if no custom template is used, this file must exist. | |||||
widget.ini | Config | This file keeps track of the widget metadata. The properties must be filled out. Format:
| |||||
config.js | Properties Page | The definition for the properties page used to configure the widget via the frontend |
...
As of Squirro 3.0.0 you can now manage and edit custom widgets in the Squirro UI. Please refer to this guide Managing Widgets in the Squirro UI.
Anchor | ||||
---|---|---|---|---|
|
JavaScript
Custom widgets are implemented as Backbone.js views. Despite this, no prior experience with the Backbone.js framework is required.
...
See the section External JavaScript Libraries for how to use additional libraries.
Anchor | ||||
---|---|---|---|---|
|
CSS
The widget.css
file contains Cascading Style Sheet instructions for styling of the dashboard.
...
The CSS declarations from custom widgets are applied in sequence, by the widgets position in the dashboard (top-left to bottom-right). This can be meaningful when !important
clauses are used, as the latest CSS definition one will override the former.
Anchor | ||||
---|---|---|---|---|
|
HTML
The HTML file widget.html
is treated as a template file. The underscore.js template method is used for this.
...