I have the following (simplified) dynamic dashboard.
You can see the query beeing performed in html.
I want the sourcetype selection is optional on this dashboard. But as it is the $sourcetype$ token is not resolved until I make a selection in the sourcetype. Setting a default sourcetype to empty doesn't work, because that will make an invalid search and also because the empty selection stays when I select an index.
How can I clear the (invalid) sourcetype selections, when I select an index?
You could use a token forwarder like this:
Don't use the sourcetype token in your search directly. Instead, build a new token with the help of a token forwarder. In the Javascript function that actually sets the new forwarded token's value you can easily provide a default value.
For possible alternatives also look at token change event handlers and token filters, documented on the same page as forwarders.
You could use a token forwarder like this:
Don't use the sourcetype token in your search directly. Instead, build a new token with the help of a token forwarder. In the Javascript function that actually sets the new forwarded token's value you can easily provide a default value.
For possible alternatives also look at token change event handlers and token filters, documented on the same page as forwarders.
Did you notice that I use simple XML?
But I need to convert my dashboard to html to do it?
It seems like a complex task for a simple goal..
You don't have to convert your dashboard to HTML, you only need to include a script like this:
<form script="myscript.js"
In that script you can then use the technique I described.
Oh! Great. I had no idea you could do that!
I would also really really like to know, how I can make the user experience of my dashboard, more like the full search page.
i'd still like an answer to this question ...