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

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...