All Apps and Add-ons

Include stop/pause button in views?

nlapier2
Path Finder

Hello,

I am looking for a way to have a stop/pause button for some of my views. What I mean is that a user who felt like a search in the view was taking too long could press a button which would stop/pause a search (and all the postprocess searches downstream) and leave the results thus far up. I was thinking I would put the button right next to my search button. The search button would start a fresh search as expected, while the other button would be able to stop or pause the search and leave the results that had already been retrieved up as I've specified. Any help with this would be much appreciated.

P.S. As far as my attempts thus far go, I've tinkered around with a few Sideview modules such as Gate, but to no avail. I was looking through the documentation and wondering whether the CustomBehavior module might be the only way to do something like this.

1 Solution

sideview
SplunkTrust
SplunkTrust

One thing you can do is use the SearchControls module, but then configure it to not show any of its other buttons and sections, and to show only the Play/Pause button...

<module name="SearchControls">
  <param name="sections">jobControls</param>
  <param name="jobControls">pause</param>
</module>

SearchControls gets a whole docs page in Sideview Utils - under "Advanced Modules". You can learn more about how to turn on/off all its buttons there.

Navigate within the Sideview Utils app to "Module Documentation > Advanced Modules > The SearchControls module".

Granted, the play/pause button wont look very much like the green submit button, but if you're handy with CSS and cooking up images you can soon fix that.

(and by the way, the Gate module can prevent pushes, and thus indirectly prevent searches from getting dispatched, but it has no functionality to pause running jobs, which is quite different)

View solution in original post

sideview
SplunkTrust
SplunkTrust

One thing you can do is use the SearchControls module, but then configure it to not show any of its other buttons and sections, and to show only the Play/Pause button...

<module name="SearchControls">
  <param name="sections">jobControls</param>
  <param name="jobControls">pause</param>
</module>

SearchControls gets a whole docs page in Sideview Utils - under "Advanced Modules". You can learn more about how to turn on/off all its buttons there.

Navigate within the Sideview Utils app to "Module Documentation > Advanced Modules > The SearchControls module".

Granted, the play/pause button wont look very much like the green submit button, but if you're handy with CSS and cooking up images you can soon fix that.

(and by the way, the Gate module can prevent pushes, and thus indirectly prevent searches from getting dispatched, but it has no functionality to pause running jobs, which is quite different)

nlapier2
Path Finder

Exactly what I was looking for. Thank you!

0 Karma

damonmanni
Path Finder

What file do I add this code to? I don't know if it should be the .xml, or .css file(s) under the app?

Also, does this require a restart or is there a way to reload?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...