Dashboards & Visualizations

how to add a popup window within my dashboard?

sfatnass
Contributor

hi

i don't understand how to add a popup window within my dashboard.

what about requirement and the javascript splunk/share/splunk/search_mrsparkle/exposed/js/popup.js?

thx

0 Karma

rjthibod
Champion

I cannot speak to the popup.js file you referenced, but I do use popups via modal windows in my current app and my old app.

For a simple, technical walk-through of creating modal windows, I would recommend this write-up by the Hurricane Labs team. This is the link to part 1 in their 3 part series: https://www.hurricanelabs.com/blog/splunk-custom-modal-view-creation-part-1

If you want to see a somewhat unclean implementation of modal windows that are activated upon drilldown, you can look at my old code in the deprecated app: https://splunkbase.splunk.com/app/1800/. The SimpleXML dashboards show you how to add a modal window containing only text, and the window is triggered when the user clicks on a help icon. The HTML/JS dashboards show you how to do the same thing and how to create a modal window with user inputs that allow for flexible drilldowns to other dashboards.

For a much cleaner implementation in SimpleXML and JS extensions, I would recommend my new app: https://splunkbase.splunk.com/app/3171/. I use a modal window with user inputs and a table. The modal window is activated by a button, and the user can drilldown on data in the modal window's table to populate inputs in the dashboard.

0 Karma

rjthibod
Champion

One thing to consider when looking at the different examples is do you want to constantly instantiate a new window or do you want only one modal window object.

The first example from Hurricane Labs creates and destroys the window every time you trigger it.

The last example from my latest app instantiates the modal window a single time for each dashboard. This allows me to keep the user input fields and search results tables between activations without triggering new (unnecessary) searches.

0 Karma

cmerriman
Super Champion

this answers might help you

https://answers.splunk.com/answers/306274/drilldown-to-a-popup-impossible-in-simple-xml-but.html

I've never done it myself, sorry.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...