Versions Compared

Key

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

...

Excerpt

The squirro_asset tool can be used to manage all Squirro code artefacts called custom assets. Assets are Pipelets, Custom Widgets, and Custom Dashboard Loaders.

Table of Contents

Table of Contents
outlinetrue

squirro_assets tool

Starting with the 2.4.5 Squirro release, you can use the squirro_asset tools to manage all the custom "code artifacts" in Squirro server systems such as Dashboard Loaders, Dashboard Widgets, or Pipelets.

The first parameter is the type of asset: dashboard_loader, widget, or pipelet, and if at any time you are unsure of what parameters are allowed, you can request help by adding the --help parameter.

Code Block
languagetext
> squirro_asset --help
usage: squirro_asset [-h] [--verbose] [--log-file LOG_FILE] [--version]
                     {widget,pipelet,dashboard_loader} ...

Squirro asset management tool

positional arguments:
  {widget,pipelet,dashboard_loader}
                        asset type help
    widget              Manage custom widgets
    pipelet             Manage custom pipelets
    dashboard_loader    Manage custom dashboard_loader

General Options:
  -h, --help            Show this help message and exit.
  --verbose, -v         Show additional information.
  --log-file LOG_FILE   Log file on disk.
  --version             show program's version number and exit

...

You can upload new or modified dashboard loaders using the upload command, for example:

Code Block
languagetext
> squirro_asset dashboard_loader upload --folder <dashboard-loader-folder> --token <token> --cluster <cluster-url>

...

You can list all dashboard loaders using the same parameters as for upload except --folder:

Code Block
languagetext
> squirro_asset dashboard_loader upload --token <token> --cluster <cluster-url>
[
    {
        "hash": "ec43609e-c5c6-11e6-ac8a-80e65013fba6",
        "name": "name-1",
        "title": "title-1",
        "directory": "/var/lib/squirro/topic/assets/dashboard_loader/tenant",
        "resources": {
            "css": [
                "mycss.css"
            ]
        }
    },
    {
        "directory": "/var/lib/squirro/topic/assets/dashboard_loader/tenant",
        "hash": "bed8e082-c395-11e6-94ff-000c29dfbc49",
        "name": "name-2",
        "resources": {
            "html": [
                "main.html"
            ]
        },
        "title": "title-2"
    }
]

...