Dashboard variables

Dashboard variables allow you to create flexible and reusable dashboards. Instead of being limited to only seeing hard-coding tile objects, variables allow dashboard viewers to switch between objects on the fly. Variables can also be used with shared dashboards.

Getting started

Watch the video below to see how variables work.

Loom video thumbnail

Use case examples

The following examples detail some of the ways you can use dashboard variables to your streamline your SquaredUp experience.

Create a template dashboard for pipelines

You could create a dashboard with a variable called Pipeline, where viewers of the dashboard select the specific pipeline data they are interested in by changing the dashboard variable.

Create a filterable dashboard for microservices

You could create a dashboard with a variable called Service, where the dashboard displays information about all your microservices by default. Viewers of that dashboard could then filter to a specific microservice by changing the dashboard variable.

Creating variables

Variables are created when in edit mode on a dashboard. You can only create one variable per dashboard at this time.

  1. Navigate to a dashboard or create a new one.
  2. Select Edit from the dashboard menu.
  3. Click Add dashboard variable
    next to the dashboard title.
  4. Configure the following settings in the Add dashboard variable window:
    1. Name:
      Enter a name for the variable. For example, Pipeline.
    2. Objects:
      Either select an existing collection or click Add collection to create a new one. The objects in the collection are the possible options for the dashboard variable.
    3. Default value:
      Select one of the following:
      • All objects: The dashboard defaults to selecting the objects in the specified collection whenever the dashboard is loaded.
      • None: The dashboard displays no objects when loaded .
        When a dashboard with no default is loaded, you're prompted to pick a variable from the dashboard variable dropdown. If only one object exists in the selection, the dashboard will default to it regardless of this setting.
    4. Allow multiple selection:
      Allows the selection of multiple objects in the dashboard variable dropdown. This is enabled by default when Default value is set to All objects but can be manually toggled if the Default value is None.
      Add dashboard variable
  5. Click Add. The variable is enabled for the dashboard and the dropdown field displays next to the title.
    Dashboard variable dropdown

Using variables in a tile

Once you’ve created a dashboard variable, you can then make use of it in your tiles.

When editing a tile to a dashboard with a variable configured, the dashboard variable dropdown also displays in the tile editor, allowing you to override the available objects.

By default, new tiles inherit their Collection from the dashboard variable.

Tile dashboard variable selector

Configuring a tile with a variable

  1. Open the tile editor by either:
    • Click Edit
      on a dashboard then click Edit
      on a tile you want to configure a variable for.
    • On your dashboard, click add tile
      on an empty space then select Data
      to create a new tile.
  2. On the Objects tab, when you’re creating a new tile on a dashboard that has a variable configured, the collections are automatically selected for you.

    If you are editing a tile that was added to a dashboard prior a variable being configured, you must deselect the collection and then reselect the collection with the variable icon

  3. Continue with the tile configuration as normal.
  4. Click Save. The tile is now updated automatically whenever you change the variable at the top of your dashboard!
    Dashboard variables

    When creating dashboards and tiles it’s possible to enable monitoring or publish the data as a KPI, which runs in the background without needing to view a dashboard.

    Because of this, Monitoring and KPI are only available when the dashboard variable has a default value.

    This also means that monitoring uses the default value (e.g. all objects) when calculating the latest health state.

Was this article helpful?


Have more questions or facing an issue?