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
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...