Dashboards & Visualizations

How to only show drilldown panels on matching dropdown page?

michaeler
Communicator

My dashboard has about 45 panels split between 8 pages using a dropdown. I am adding drilldowns that open panels that are hidden until a user clicks on a chart or table. My issue is that when I'm on a certain page and click on a visualization and the hidden panel appears, it remains displayed when I switch to a different page.

I can't copy and paste my code so here's a snippet of what I have:

<form>
  <label>My Dashboard</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="type" searchWhenChanged="true">
      <label>Select Page</label>
      <choice value="A">A</choice>
      .......same for B-G.......
      <choice value="H">H</choice>
      <change>
        <condition value="A">
          <set token="A_panel">true</set>
          <unset token="B_panel"></unset>
           ......unset C-H......
        </condition>
        <condition value="B">
          <set token="B">true</set>
          <unset token="A_panel"></unset>
          ......unset C-H......
        </condition>
        <condition>
          .....Repeat for C-H.....
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel depends="$A_panel$">
      <title>Panel A1</title>
      <table>
        <search>
          <query>| index=* App=* Status="Down" | table App A B C </query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
        <option name="drilldown">cell</option>
        <drilldown>
          <set token="show_panel_A1">true</set>
          <set token="selected_app">$click.value$</set>
          <eval token="drilldown.earliest">case($click.name2$=="30 Days", "-30d", $click.name2$=="60 Days", "-60d")
          <eval token="drilldown.latest">case($click.name2$=="30 Days", "now", $click.name2$=="60 Days", "-30d")
        <drilldown>
      </table>
    </panel>
  </row>
  <row>
    <panel depends="$show_panel_A1$">
      <title>Count for $selected_app$</title>
      <chart>
        <search>
          <query>| index=* App=* Status="Down" earliest=$drilldown.earliest$ latest=$drilldown.latest$ | search App="$selected_app$" | timechart count by App </query>
        </search>
      </chart>
    </panel>
  </row>

I've tried adding the <unset token> for other drilldown panels under <drilldown> and <condition value=""> sections but the panels don't hide again after I select a different drilldown or move pages.

Labels (5)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try putting the depends on the rows

  <row depends="$A_panel$">
    <panel>

  <row depends="$A_panel$">
    <panel depends="$show_panel_A1$">

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Try putting the depends on the rows

  <row depends="$A_panel$">
    <panel>

  <row depends="$A_panel$">
    <panel depends="$show_panel_A1$">

michaeler
Communicator

I was certain I tried this already and received an error about redefining 'depends' but I tried it again anyways it it worked! 

I'm glad the answer is simple and easy to implement but disappointed I didn't try this already...

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...