Versions Compared

Key

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

...

...

...

...


Excerpt

TheĀ squirro_widget comand line tool, part of the Toolbox, is used to manage custom widgets on a Squirro cluster. Starting with Squirro release 2.4.5 you can use the squirro_asset tool to upload and list custom widgets consistently with other types of custom code "assets".

...

Code Block
languagepowershell
squirro_widget ^
    --token SQUIRRO_TOKEN ^
    --cluster https://next.squirro.net  ^
    list

Note that the lines have been wrapped with the circumflex (^) at the end of each line. On Mac and Linux you will need to use backslash (\) instead.

Arguments

The following table lists all the arguments.

...

Code Block
languagepowershell
squirro_widget ^
    --token SQUIRRO_TOKEN ^
    --cluster https://next.squirro.net  ^
    list

Note that the lines have been wrapped with the circumflex (^) at the end of each line. On Mac and Linux you will need to use backslash (\) instead.

Upload

The upload command uploads a custom widget from the local disk and uploads it to the Squirro cluster. This command takes additional options beyond the default arguments.

ArgumentMandatoryDescription
--configYes

A JSON representation of the configuration for the widget. The following keys are possible:

KeyDescription
directoryThe local directory in which the widget is stored - relative to the current working directory. The directory is also used to determine the widget name. That name is used for deduplication, any older widgets with the same name are overwritten.
titleThe name of the widget. This is the name shown to users when they add the widget to a dashboard.
baseWidget

The name of the base widget from which this one inherits. This drives the configuration options that are displayed to the user when adding the widget to a dashboard.

See the list of Base Widgets for possible values here.

authorThe author of the widget
descriptionA short description of why the widget is needed or what it does


An example:

Code Block
languagepowershell
squirro_widget ^
    --cluster https://next.squirro.net ^
    --token $TOKEN ^
    upload ^
    --config '{"directory": "clock", "title": "Clock", "baseWidget": "Base", "author": "Developer Name", "description": "Displays a clock"}'