Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How to disable search run in js on page load?

$
0
0
Hi, I created a html-dashboard in which the user can choose a work station and then can click buttons for several machine faults. If a button is pressed, a search is started in js to write the fault, the time and if the fault is coming or going to a summary index. This is the js code from one button: mysearch1_K = new SearchManager({ id: "button1_K", autostart: "false", search: mvc.tokenSafe('| makeresults | eval Störung="Störung1" | eval action="kommend" | eval Arbeitsplatz=tostring("$form.Arbeitsplatz$") | table _time Störung action Arbeitsplatz | addinfo | collect index=summary' ) }); $(".button1_K").on("click", function (){ console.log(tokens.get("form.Arbeitsplatz")); //alert('Ausgeführt Störung 1 kommend'); console.log("Störung1 kommend"); //console.log(mysearch1_K.get("search")); mysearch1_K.startSearch(); $(this).prop("disabled", true); $(".button1_G").prop("disabled", false); }); This is the html "code":

Beschreibung Störung

You see that i have set the searchmanager property "autostart = false" in the code. But it runs every search (for 14 buttons like the code above) when loading the page. Did I miss something? Thanks!

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>