Dashboards & Visualizations

How can we include "Stop" button on custom app?

antonioformato
Explorer

Hi all,
using Splunk 6.1.1.

In custom app, how can I include stop/finalize buttons in my dashboards?

Thank you
Regards
AF

loggar
Explorer

convert dashboard to HTML...

put button somwhere in it ...

 <button class="btn btn-primary stop_search_btn">Stop</button>

and then add javascript code ...

$('.stop_search_btn').click(function() {
var mainSearch = mvc.Components.getInstance("search1");
mainSearch.finalize()
});

haripriyasarve1
Explorer

Thanks, I tried it worked for me.

0 Karma

DUThibault
Contributor

Can't we just add an <html> element to the <dashboard> instead of converting it to html? And, pardon my ignorance, how does one attach the Javascript to the button? I tried adding a <javascript> element after or inside the <button> without any success.

0 Karma

tormodbp
Path Finder

What is the purpose of this stop/finalize button?

Cheers,

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...