I have created inside an HTML tag a popup with the modal class.
However, I'm interested in showing a Report (saved search) on that popup.
I'm not sure how to add such a report inside the HTML tag.
<div class="modal popup-body $tokShowModel$" id="myModal"> <div class="modal-header popup-header"> <h3>Show a report</h3> <div> <a id="anchorCloseModalWindow" class="btn btn-primary btn-position">x</a> </div> </div> <div class="modal-body"> <h1>Report comes here<h1> </div> </div>
@saulcruzmendez, one simple approach would be to convert your saved search to scheduled search and enable Embedded Report (learn about the best practices to enable this).
Then you can add the iframe code to your existing Modal Pop-up. Here is a sample code:
<row> <panel> <html> <div class="modal popup-body $tokShowModel$" id="myModal"> <div class="modal-header popup-header"> <h3>Show a report</h3> <div> <a id="anchorCloseModalWindow" class="btn btn-primary btn-position">x</a> </div> </div> <div class="modal-body"> <h1>Splunkd Error embedded as modal pop-up</h1> <div> <iframe height="400" width="480" frameborder="0" src="embedded_report_rest_uri_generated_after_converting_your_report_to_embedded_report"></iframe> </div> </div> </div> </html> </panel> </row>
Do try out and confirm.
These links are pretty good documented:
@saulcruzmendez Go ahead and accept your own answer posted above. The reason why I had suggested Embedded Dashboards was to keep the complexity lower. However, if you are comfortable with Simple XML Extensions, you can try the following Splunk .Conf session by @jconger where Example 10 deals with
Event Handler + Token + Table Cell Render + Modal + Splunk Web Framework to generate a chart as Modal pop-up exactly the same way as your requirement.
@niketnilay Thank you for the link! I'll for sure watch the video session. I appreciate the help!