Dashboard variables
Dashboard variables allow you to create flexible and reusable dashboards. Instead of being limited to only seeing hard-coded 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.
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 where viewers 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 which 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 add one variable per dashboard at this time.
- Navigate to a dashboard or create a new one.
- Ensure you are in edit mode. To edit a dashboard click the Editbutton at the top of the dashboard.
- Click Add dashboard variable next to the dashboard title.
- Configure the following settings in the Add dashboard variable window:
- Objects:
Either select an existing collection from the drop down list, or click Add collection to create a new collection. The objects in the collection are the possible options for the dashboard variable. See Collections.You can view and edit collections for a workspace, by clicking on Objects on the left nav bar of that workspace, then on the edit
button next to the collection you wish to edit. - 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.- 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.
- Allow multiple selection:
- Objects:
- Click Add. The variable is enabled for the dashboard and the dropdown field displays next to the title.
- Configure the individual tiles on the dashboard to use the dashboard variable, as described below.
Using variables in a tile
Once you’ve created a dashboard variable, you can then make use of it in your tiles.
Configuring a tile with a variable
- Ensure you are in edit mode. To edit a dashboard click the Editbutton at the top of the dashboard.
- Either add a new tile by clicking the on an empty space then selecting Data , or edit an existing tile by clicking Edit on a tile you want to configure a variable for.
- On the Objects tab, select the collection with the variable icon which indicates this collection is used for the dashboard variable drop down list.
If you are editing a tile that was created before a dashboard variable was configured, you must deselect the current collection and then select the collection with the variable icon
- Continue with the tile configuration as normal.
- Click Save. The tile is now updated automatically whenever you change the variable at the top of your dashboard!
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.