HI splunk403,
there is a way you can selectively show or hide panels based on the drop down selection.
Take this run everywhere dashboard to see how the panels change based on the drop down section:
<form>
<label>Show panels dynamically based on drop down selection</label>
<description>https://answers.splunk.com/answers/513020/how-to-produce-a-dynamic-number-of-panels-in-a-das-2.html</description>
<search id="internal_data">
<query>index=_internal earliest=-1h@h latest=now | table _time, source, sourcetype, host</query>
</search>
<fieldset submitButton="false">
<input type="dropdown" token="category" searchWhenChanged="true">
<label>select panel to show:</label>
<choice value="1">Panel1</choice>
<choice value="2">Panel2</choice>
<choice value="3">Panel3</choice>
<default>1</default>
<change>
<condition value="1">
<unset token="panel2"></unset>
<unset token="panel3"></unset>
<set token="panel1"></set>
</condition>
<condition value="2">
<unset token="panel1"></unset>
<unset token="panel3"></unset>
<set token="panel2"></set>
</condition>
<condition value="3">
<unset token="panel1"></unset>
<unset token="panel2"></unset>
<set token="panel3"></set>
</condition>
</change>
</input>
</fieldset>
<row depends="$panel1$">
<panel>
<title>Panel 1</title>
<chart>
<search base="internal_data">
<query>|stats count by host</query>
</search>
<option name="charting.chart">column</option>
</chart>
</panel>
</row>
<row depends="$panel2$">
<panel>
<title>Panel 2</title>
<chart>
<search base="internal_data">
<query>|stats count by source</query>
</search>
<option name="charting.chart">column</option>
</chart>
</panel>
</row>
<row depends="$panel3$">
<panel>
<title>Panel 3</title>
<chart>
<search base="internal_data">
<query>|stats count by sourcetype</query>
</search>
<option name="charting.chart">pie</option>
</chart>
<chart>
<search base="internal_data">
<query>|stats count by host</query>
</search>
<option name="charting.chart">column</option>
</chart>
</panel>
</row>
</form>
Hope this helps ...
cheers, MuS
... View more