Skip to content

[Dashboards] Export source (serializable state) of a dashboard#217904

Closed
nickpeihl wants to merge 4 commits intoelastic:mainfrom
nickpeihl:content-source-package
Closed

[Dashboards] Export source (serializable state) of a dashboard#217904
nickpeihl wants to merge 4 commits intoelastic:mainfrom
nickpeihl:content-source-package

Conversation

@nickpeihl
Copy link
Copy Markdown
Contributor

Fixes #192913
WIP
Blocked by #217109

Summary

Adds a flyout that can export the serializable state (JSON source) of a dashboard.

localhost_5701_app_dashboards

Since the flyout uses the dashboardApi.getSerializedState method, it is not necessary to save a dashboard before exporting the source. The state can be copied and pasted into the request body of the Dashboard HTTP API, e.g.

POST kbn:/api/dashboards/dashboard
{
  "attributes": ...,
  "references": ...
}

TODO

  • Wire into the upcoming export menu
  • Remove the current changes to the dashboard top nav as this is just a demo

This PR also adds a re-useable @kbn/content-management-content-source package that other plugins may use to show their content source.

@elasticmachine
Copy link
Copy Markdown
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!

@nickpeihl
Copy link
Copy Markdown
Contributor Author

Superceded by #221780

@nickpeihl nickpeihl closed this May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dashboards as code] Add show source UX

2 participants