I have successfully implemented hiding panels in a dashboard that I'm not using base searches. But, when I apply the same logic to a base search run dashboard, I'm not getting the expected results.
Any clues as to why this is?
In your base search query you can use the below code to set and unset tokens, based on which you can add depends to your panel that needs to be hidden
<done>
<condition match="'job.resultCount' >0">
<set token="show">true</set>
</condition>
<condition>
<unset token="show"/>
</condition>
</done>
Not sure what you mean by a "base search run dashboard".
A base search does not have to be in a displayable location. If you are getting inconsistent results when the base search is inside a panel, then move it outside the panel, and use a postprocessing search (doing nothing) with that as the base search. within the panel.
Hi DalJeanis,
I've actually had to remove the base search from my dashboard, that was the only way that this could work for me. Thanks for your input on this!
In your base search query you can use the below code to set and unset tokens, based on which you can add depends to your panel that needs to be hidden
<done>
<condition match="'job.resultCount' >0">
<set token="show">true</set>
</condition>
<condition>
<unset token="show"/>
</condition>
</done>
Hi Vijeta,
The above code isn't working for me. When I apply this to my search string it hides panels even if they have content. I've tried this with using the "done" tag, like you had specified, as well as using the "progress" tag, and still no luck. Please see my code below. Thanks!
<panel depends="$panel_show$">
<table>
<title>Top 5 Count of CPU Utilization > 80% by Host</title>
<search base="indexos">
<query>| where Percent_CPU_Load > 80
| stats count by host
| sort - count
| head 5</query>
<done>
<condition match="'job.resultCount' > 0">
<set token="panel_show">true</set>
</condition>
<condition>
<unset token="panel_show"></unset>
</condition>
</done>
</search>