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
DashboardDataSourceBehaviour: Handle loading library panel #86980
Conversation
This PR must be merged before a backport PR will be created. |
1 similar comment
This PR must be merged before a backport PR will be created. |
@@ -83,7 +83,7 @@ export class LibraryVizPanel extends SceneObjectBase<LibraryVizPanelState> { | |||
|
|||
private async loadLibraryPanelFromPanelModel() { | |||
let vizPanel = this.state.panel!; | |||
|
|||
await new Promise((f) => setTimeout(f, 1000)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await new Promise((f) => setTimeout(f, 1000)); |
Was here to simulate slow loading time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌🏾 great job, @dprokop , the code looks great, I also gave a quick test locally, works as expected.
* DashboardDataSourceBehaviour: Handle loading library panel * Remove timeout * FIx test (cherry picked from commit 67968df)
Fixes #86966
https://raintank-corp.slack.com/archives/C03MCTKAJA0/p1714062157912579
The problem was that LibraryVizPanel loads source panel asynchroniously and can only set internal VizPanel's SceneQueryRunner when the panel is resolved. The behavior did not account for that throwing early as it couldn't find the corresponding query runner that indicates readiness for dashboard query execution.