Dashboards & Visualizations

Easy way to hide annotations based on token?

aohls
Contributor

I had annotations I wanted to control with a Yes or No dropdown. It mostly works, unsetting the token doesn't seem to clear the token correctly as the annotations remain. 

 

 

<search depends=$showToken$ id="base">
<query>search.....</query>
</search>
...
<input type="dropdown" token="showToken" searchWhenChanged="true">
<label>...</label>
<choice value="yes">Yes</choice>
<choice value="no">No</choice>
<change>
<condition match="$value$ == &quot;yes&quot;">
<set token="showToken">true</set>
</condition>
<condition match="$value$ == &quot;no&quot;">
<unset token="showToken"></unset>
</condition>
</change>

 

is there a better way to accomplish this easily? I saw an older post that said using javascript could work but I need to do this through only XML at this time.

Labels (3)
0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...