Hi all
I am trying to create a hidden panel that shows when a value from a table is clicked but then stop showing when clicked again. I've added the existing test XML here. Could someone please help?
Thanks
<dashboard version="1">
<label>DrillDown</label>
<row>
<panel>
<table>
<search>
<query>index=_*|stats count by sourcetype</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<drilldown>
<set token="tok_sourcetype">$click.value$</set>
<set token="show_panel">true</set>
</drilldown>
</table>
</panel>
</row>
<row>
<panel depends="$show_panel$">
<chart>
<search>
<query>index=_* sourcetype=$tok_sourcetype$|timechart count</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<option name="charting.chart">line</option>
<option name="charting.drilldown">all</option>
<drilldown>
<unset token="show_panel"></unset>
</drilldown>
</chart>
</panel>
</row>
</dashboard>
<dashboard version="1">
<label>DrillDown</label>
<row>
<panel>
<table>
<search>
<query>index=_*|stats count by sourcetype</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<drilldown>
<set token="tok_sourcetype">$click.value$</set>
<eval token="show_panel">if($show_panel$="true",null(),"true")</eval>
</drilldown>
</table>
</panel>
</row>
<row>
<panel depends="$show_panel$">
<chart>
<search>
<query>index=_* sourcetype=$tok_sourcetype$|timechart count</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<option name="charting.chart">line</option>
<option name="charting.drilldown">all</option>
</chart>
</panel>
</row>
</dashboard>
<dashboard version="1">
<label>DrillDown</label>
<row>
<panel>
<table>
<search>
<query>index=_*|stats count by sourcetype</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<drilldown>
<set token="tok_sourcetype">$click.value$</set>
<eval token="show_panel">if($show_panel$="true",null(),"true")</eval>
</drilldown>
</table>
</panel>
</row>
<row>
<panel depends="$show_panel$">
<chart>
<search>
<query>index=_* sourcetype=$tok_sourcetype$|timechart count</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<option name="charting.chart">line</option>
<option name="charting.drilldown">all</option>
</chart>
</panel>
</row>
</dashboard>
Just to clarify, what is it that you would click the second time in order to hide the panel?
You could have a "Reset" button or something at the top which could unset the token?
🌟 Did this answer help you? If so, please consider:
Your feedback encourages the volunteers in this community to continue contributing