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!

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 ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...