Versions Compared

Key

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

...

FileTypeExplanation
widget.jsJavaScriptThe executable code of the widget. This file is loaded when the widget is used on a dashboard.
widget.css86053650CSSStyling of the widget. This file must exist even when no styles are used for the widget.
widget.htmlHTMLTemplate 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:

Code Block
languagebash
[widget]
title=
author=
description=


config.jsProperties PageThe 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
JS
JS

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
CSS

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
HTML

HTML

The HTML file widget.html is treated as a template file. The underscore.js template method is used for this.

...