-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
EmbedPanel: Add a postMessage to embedded panel #86012
base: main
Are you sure you want to change the base?
Conversation
…PanelPage, DashboardPanel, and PanelStateWrapper, which handle the creation of panels. In GrafanaRoute, the receiveMessage function takes a panelId as input, which is used to update the queryParams passed to SoloPanelPage, consequently updating the displayed panel. In PanelStateWrapper, on the other hand, the receiveMessage is designed to receive an array of key/value objects representing the variables to be updated for re-rendering the panel. All updates are performed using functions already present in Grafana.
I want to add lables abount changelog and milestone but i can't. Any advice? Thanks! |
Hi @Mochi009, I've added the required label and the milestone. Please could you remove the changes to the |
Thanks @aangelisc. Can you help me with the other test that is blocked right now? |
Hi @Mochi009, Apologies for the delay. There are a couple failures preventing this from being mergeable.
Thanks! |
Thanks @aangelisc. I fix problems with any type and lint. I also sync my repository with grafana main branch. |
Unblocked the Drone |
@Mochi009 since you're not a member of the Grafana team, you don't have auth for interacting with enterprise content, so anything with |
Hi @baldm0mma. I'm working on that error. I will update you when i make a fix for it. Thanks! |
@baldm0mma i fix lint bug but i have problems with betterer-frontend and verify-i18n |
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 or ping for review. Thank you for your contributions! |
@aangelisc do you have any news? Thanks! |
What is this feature?
In Grafana, embed a panel is a massive feature but it's not possible to interact with it. With this implementation of a postMessage, the time for the update of a panel in an iframe is much shorter.
Why do we need this feature?
This feature helps to minimize the time to update an embed panel using a postMessage instead of reloading all panel.
Who is this feature for?
All user that use grafana for the embedding can use it.
This functionality has been added within the files GrafanaRoute, SoloPanelPage, DashboardPanel, and PanelStateWrapper, which handle the creation of panels. In GrafanaRoute, the receiveMessage function takes a panelId as input, which is used to update the queryParams passed to SoloPanelPage, consequently updating the displayed panel. In PanelStateWrapper, on the other hand, the receiveMessage is designed to receive an array of key/value objects representing the variables to be updated for re-rendering the panel. All updates are performed using functions already present in Grafana.
This new functionality is helpfull when someone wants to update the variables the displayed panel uses. Instead of reloading all of its content, just the API for new data is triggered to display the new panel with new data.