Dashboards & Visualizations

How do I open and hide different nested panels based on clicks?

devraj_p
Engager

Any help is highly appreciated...

I have a panel(1) which shows 3 different single values say a,b,c
When I click on a, it should open another panel(2) with 3 single values say d,e and f
and similarly, when I click on b, it should open another panel(3) with 3 single values say g,h,i and panel (4) with values j,k,l when c is clicked.
Further on clicking the value d or e or f, it opens 1 panel for each respectively, and same for remaining single values.

Summary.

Note: Every ( ) is 1 panel

.       (a                   b                 c)         Level 1 (Single Values) on clicking a,b,c respectively we get
.   (d e f)          (g h i)          (j k l)       Level 2 (Single Values) clicking the values respectively we get below tables 
(m) (n) (o)   (p) (q) (r)   (s) (t) (u)  Level 3 opens m if d is clicked, opens n if e is clicked, opens o if f is clicked, respectively (Here m,n,o, etc. are individual tables with Rows and Columns)

Also, a way to make the opened panels in levels 2 and 3 hide once again would be great.

Labels (4)
0 Karma

devraj_p
Engager

This worked out for me, Thanks a lot.

0 Karma

renjith_nair
Legend

Here is a sample with one level , you can easily build on top of it

<dashboard>
  <label>DrillDown</label>
  <row>
    <panel>
      <single>
        <search>
          <query>|makeresults|eval a="a"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">all</option>
        <option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="showSparkline">0</option>
        <drilldown>
          <set token="a">$click.value$</set>
          <unset token="b"></unset>
          <unset token="c"></unset>
        </drilldown>
      </single>
    </panel>
    <panel>
      <single>
        <search>
          <query>|makeresults|eval b="b"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">all</option>
        <drilldown>
          <set token="b">$click.value$</set>
          <unset token="c"></unset>
          <unset token="a"></unset>
        </drilldown>
      </single>
    </panel>
    <panel>
      <single>
        <search>
          <query>|makeresults|eval c="c"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">all</option>
        <drilldown>
          <set token="c">$click.value$</set>
          <unset token="b"></unset>
          <unset token="a"></unset>
        </drilldown>
      </single>
    </panel>
  </row>
  <row>
    <panel depends="$a$">
      <single>
        <search>
          <query>|makeresults|eval d="d"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">all</option>
        <drilldown>
          <set token="d">$click.value$</set>
          <unset token="e"></unset>
          <unset token="f"></unset>
        </drilldown>
      </single>
    </panel>
    <panel depends="$a$">
      <single>
        <search>
          <query>|makeresults|eval e="e"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">all</option>
        <drilldown>
          <set token="e">$click.value$</set>
          <unset token="d"></unset>
          <unset token="f"></unset>          
        </drilldown>
      </single>
    </panel>
    <panel depends="$a$">
      <single>
        <search>
          <query>|makeresults|eval f="f"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">all</option>
        <drilldown>
          <set token="f">$click.value$</set>
          <unset token="e"></unset>
          <unset token="d"></unset>          
        </drilldown>
      </single>
    </panel>
    <panel depends="$b$">
      <single>
        <search>
          <query>|makeresults|eval g="g"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </single>
    </panel>
    <panel depends="$b$">
      <single>
        <search>
          <query>|makeresults|eval h="h"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </single>
    </panel>
    <panel depends="$b$">
      <single>
        <search>
          <query>|makeresults|eval i="i"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </single>
    </panel>
  </row>
  <row>
    <panel depends="$d$">
      <table>
        <search>
          <query>index=_internal|stats count by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</dashboard>

 

---
What goes around comes around. If it helps, hit it with Karma 🙂
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...