Skip to main content
On this page

Kater CLI Present and share dashboard

kater dashboard save

Checks and saves a whole dashboard.yaml.

Give the file as JSON data, with the revision you opened. Kater then refuses the save when someone changed the dashboard after you opened it. Errors stop the save, and warnings do not.

Examples

Terminal window
# Keep the ad_reporting dashboard in a file
kater dashboard open --request-file ad_reporting.json --json > ad_reporting_open.json
# Make a request that only checks the dashboard as it is
jq '{namespace, file, expected_revision: .revision, dry_run: true}' ad_reporting_open.json > ad_reporting_check.json
# Check it, and save nothing
kater dashboard save --request-file ad_reporting_check.json
# Make a request that renames the Overview section to Summary, and save it
jq '{namespace, file: (.file | .sections.overview.label = "Summary"), expected_revision: .revision}' ad_reporting_open.json > ad_reporting_save.json
kater dashboard save --request-file ad_reporting_save.json

Arguments

ArgumentDescription
<path>Optional. In place of --request-file: the workspace, the query file or the chart file the request names.

Options

OptionDescription
--request-file <file>The workspace, the whole file and its revision, as JSON. Give - to read it from standard input. See The request.

It also takes the global options --json, --kater-root, --scope and --help.

The request

FieldWhat it holds
namespaceThe workspace, by its full path.
fileThe whole dashboard.yaml as data, as the file of kater dashboard open holds it.
expected_revisionOptional. The revision from kater dashboard open.
dry_runOptional. True checks the file and saves nothing.
include_inputsOptional, true when you leave it out. False answers faster, without the workspace’s filters.

When Kater refuses

  • The file has errors. The answer names them, and nothing is saved.
  • The dashboard changed after you opened it. Open it again, and try again.
  • You cannot change the workspace.
  • An editor has unsaved changes in dashboard.yaml.

The answer’s written says whether Kater saved the file.

See also