Scenario: I have integrated the Kibana dashboard using iframe. Kibana dashboard shows the list of PDFs with ids. The user clicks on the link in the Kibana dashboard and it passes id to the web app. After receiving the id, the web app triggers the API call to fetch the PDF and then the web app opens the PDF in the popup.
My Approach:-
- I have added my web apps link in the URL template of Kibana.
- After clicking the link it opens my webpage in the same iframe and I have added a condition to detect the params.
- After receiving the params in my web app (inside the iframe), I pass the params to window.top.location.href of the same web app. So now I have the params in my browser URL.
- From browser URL I get the params by activatedRoute.queryParamMap and triggers the web the API call.
- After the success response from the API call, I can open a popup.
The problem here, the Kibana dashboard loads again after clicking on the link and I lose my applied filter. How can I open the link from the Kibana dashboard without losing its state?
I just want to open a PDF after clicking on the link in the Kibana dashboard keeping the same filters and the state. Kibana allows opening the link on the same page(target=_self) or in the new tab(target=_blank). I want to open in the same tab.