Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard: New EmbeddedDashboard runtime component #78916

Merged
merged 17 commits into from
Jan 25, 2024
Merged

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Nov 30, 2023

Problem
App plugins and other grafana features would like to embedd / preview a dashboard in a drawer without leaving the page the user is on.

  • Adds a new EmbeddedDashboard component to runtime package
  • Adds e2e test for this component
  • Restrict panel menu to only Explore
  • Support setting initial state (time range and variable state)
  • Support callback for changes to "internal url state" (even when url state is disabled)

Copy link
Contributor

github-actions bot commented Jan 4, 2024

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale Issue with no recent activity label Jan 4, 2024
Copy link
Contributor

This pull request has been automatically closed because it has not had any further activity in the last 2 weeks. Thank you for your contributions!

@github-actions github-actions bot closed this Jan 18, 2024
@torkelo torkelo changed the title Dashboard embedding exploration Dashboard: New EmbeddedDashboard runtime component Jan 19, 2024
@torkelo torkelo reopened this Jan 19, 2024
@grafana-pr-automation grafana-pr-automation bot requested review from a team and leventebalogh and removed request for a team January 23, 2024 08:36
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 23, 2024 10:05
@torkelo torkelo marked this pull request as ready for review January 23, 2024 10:15
@torkelo torkelo requested review from a team as code owners January 23, 2024 10:15
@torkelo torkelo requested review from oscarkilhed and kaydelaney and removed request for a team January 23, 2024 10:15
Copy link
Member

@dprokop dprokop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, awesome progress on this.

@@ -82,7 +82,7 @@ export class SupportSnapshotService extends StateManagerBase<SupportSnapshotStat

if (!panel.isAngularPlugin()) {
try {
const oldModel = new DashboardModel(snapshot);
const oldModel = new DashboardModel(snapshot, { isEmbedded: true });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why's that isEmbedded meta passed here, is it used anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dprokop yes, when we create the DashboardScene inside createDashboardSceneFromDashboardModel we take the meta object from DashboardModel.meta

@@ -82,7 +82,7 @@ export class SupportSnapshotService extends StateManagerBase<SupportSnapshotStat

if (!panel.isAngularPlugin()) {
try {
const oldModel = new DashboardModel(snapshot);
const oldModel = new DashboardModel(snapshot, { isEmbedded: true });
const dash = createDashboardSceneFromDashboardModel(oldModel);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noticed one panel (Data from panel above) is not showing data in the snapshot preview, not sure if it's related to the changes in this PR:

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dprokop that looks to be unrelated, a bug in SceneQueryRunner.getResultStream , testing a fix now

@grafana-pr-automation grafana-pr-automation bot removed the request for review from a team January 23, 2024 12:59
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 23, 2024 16:49
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 24, 2024 09:03
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 24, 2024 09:41
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 24, 2024 18:32
@torkelo torkelo merged commit e08700c into main Jan 25, 2024
17 checks passed
@torkelo torkelo deleted the embedding-dashboards branch January 25, 2024 06:32
@grafana-delivery-bot grafana-delivery-bot bot modified the milestones: 10.3.x, 10.4.x Jan 25, 2024
rwwiv pushed a commit that referenced this pull request Jan 25, 2024
* Embedding dashboards exploratino

* Update

* Update

* Added e2e test

* Update

* initial state, and onStateChange, only explore panel menu action and other fixes and tests

* fix e2e spec

* Fix url

* fixing test
Ukochka pushed a commit that referenced this pull request Feb 14, 2024
* Embedding dashboards exploratino

* Update

* Update

* Added e2e test

* Update

* initial state, and onStateChange, only explore panel menu action and other fixes and tests

* fix e2e spec

* Fix url

* fixing test
@aangelisc aangelisc modified the milestones: 10.4.x, 10.4.0 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend stale Issue with no recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants