Skip to main content

Dashboards

Dashboards are stored per user, not per namespace, so config upload and config transfer do not carry them. Two dedicated commands do.

Copy dashboards from one user to others​

ewx-cli config dashboards SRC_NAMESPACE SRC_USER [DASHBOARD_NAMES]...

Copies the named dashboards of SRC_USER (an email address) to other users. With no dashboard names, all of that user's dashboards are copied. Where they go depends on the options:

OptionRecipients
noneevery user of the destination namespace
--user <email> (repeatable)the listed users
--user-file <path>the users listed one per line in the file
--group <name or ID>every eligible member of a permission group on the destination namespace
--dest-namespace <project/namespace>another namespace; default is the source namespace
# two dashboards to everyone on the same namespace
ewx-cli config dashboards demo/enrx_org_001 user@example.org "Dashboard_1" "Dashboard_2"

# the same two to the members of a permission group
ewx-cli config dashboards demo/enrx_org_001 user@example.org "Dashboard_1" "Dashboard_2" --group field_techs

# all of a user's dashboards to one user on another namespace
ewx-cli config dashboards demo/enrx_org_001 user@example.org --dest-namespace demo/enrx_org_002 --user other@example.org

--group resolves the group on the destination namespace, skips members that are not eligible users such as service accounts, and aborts if the group is missing, ambiguous or empty. It cannot be combined with --user or --user-file.

If a recipient already has a dashboard with the same name you are asked whether to update it. Recipients without any dashboards or user properties get them set up. Recipients need to reload the dashboards page, or log out and in, to see the result.

Upload a dashboard file​

ewx-cli config upload_dashboards ./configs/dashboards/vee_dashboards.json --dest-namespace demo/enrx_org_001

Uploads a dashboard JSON file, for example one shipped with the standard-packages, to every user of the namespace. --user, --user-file and --group narrow the recipients exactly as above.

Widgets that reference a flow by ID carry a string replacement (vee_flow_id, billing_flow_id) that ships empty. Pass --src-namespace so the CLI fills it by matching flow names between source and destination, or set it in the console afterwards. Until then those widgets render without data.

Superset dashboards on a datasource classifier​

A datasource classifier configuration can carry a dashboards block, listing the Superset dashboards that open on a datasource of that classifier. Unlike the per-user dashboards above, this block travels with the configuration: config upload writes it through the MDM API v2 on newly created as well as on already existing classifiers, and config download includes it, so the dashboards round-trip with the rest of the configuration.

Each entry needs a dashboardUuid; displayName and rlsClause are optional and are only sent when set:

{
"dashboards": [
{
"dashboardUuid": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"displayName": "Meter detail",
"rlsClause": "datasource_id = '{{ url_param(\'datasource_id\') }}'"
}
]
}
An upload replaces the stored dashboards

The block declares the classifier's complete dashboard set. An upload replaces whatever is stored with what the block contains: an empty block clears the dashboards, and a configuration that omits the block leaves the stored dashboards untouched. Re-uploading an older configuration can therefore remove dashboards that were attached since through the console — download the current configuration first if you are not sure.