Dashboards & Visualizations

could someone help me with Drilldown option

sravankaripe
Communicator

Hi 

I have a dashboard with 3 panels. 2nd and 3rd will be invisible by default

first panel have some data like show below 

app   |  fail    |   success 

----------------------------

A      |     10    |          20

B      |     30    |         40

------------------------------

if i click on A, corresponding panel (say 2nd(only)) should be visible.

if i click on B, corresponding panel (say 3nd(only)) should be visible.

could someone please help me with the condition I have do in <drilldown></drilldown> in first panel

 

Currently I am trying like this.

<panel id="first"> .......  </panel>

<panel depends="$second$"> ...... </panel>

<panel depends="$third$"> ...... </panel>

Labels (4)
0 Karma
1 Solution

niketn
Legend

@sravankaripe try the drilldown like below which sets the token for specific panel based on whether row with App =A is clicked or App=B is clicked.

 

        <drilldown>
          <unset token="showPanelA"></unset>
          <unset token="showPanelB"></unset>
          <eval token="showPanelA">case($row.app$=="A","true")</eval>
          <eval token="showPanelB">case($row.app$=="B","true")</eval>
        </drilldown>

 

Following is a run anywhere example based on details/sample data provided.

<dashboard>
  <label>Shop panel based on table row selected</label>
  <row>
    <panel>
      <title>Click on a Row to open respective Panel (showPanelA=$showPanelA$ | showPanelB=$showPanelB$)</title>
      <table>
        <search>
          <query>| makeresults
| eval data="A|10|20;B|30|40"
| makemv data delim=";"
| mvexpand data
| eval data=split(data,"|"), app=mvindex(data,0), fail=mvindex(data,1), success=mvindex(data,2)
| table app fail success</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">100</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="percentagesRow">false</option>
        <option name="refresh.display">progressbar</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <drilldown>
          <unset token="showPanelA"></unset>
          <unset token="showPanelB"></unset>
          <eval token="showPanelA">case($row.app$=="A","true")</eval>
          <eval token="showPanelB">case($row.app$=="B","true")</eval>
        </drilldown>
      </table>
    </panel>
  </row>
  <row>
    <panel depends="$showPanelA$">
      <html>Panel A</html>
    </panel>
    <panel depends="$showPanelB$">
      <html>Panel B</html>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@sravankaripe try the drilldown like below which sets the token for specific panel based on whether row with App =A is clicked or App=B is clicked.

 

        <drilldown>
          <unset token="showPanelA"></unset>
          <unset token="showPanelB"></unset>
          <eval token="showPanelA">case($row.app$=="A","true")</eval>
          <eval token="showPanelB">case($row.app$=="B","true")</eval>
        </drilldown>

 

Following is a run anywhere example based on details/sample data provided.

<dashboard>
  <label>Shop panel based on table row selected</label>
  <row>
    <panel>
      <title>Click on a Row to open respective Panel (showPanelA=$showPanelA$ | showPanelB=$showPanelB$)</title>
      <table>
        <search>
          <query>| makeresults
| eval data="A|10|20;B|30|40"
| makemv data delim=";"
| mvexpand data
| eval data=split(data,"|"), app=mvindex(data,0), fail=mvindex(data,1), success=mvindex(data,2)
| table app fail success</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">100</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="percentagesRow">false</option>
        <option name="refresh.display">progressbar</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <drilldown>
          <unset token="showPanelA"></unset>
          <unset token="showPanelB"></unset>
          <eval token="showPanelA">case($row.app$=="A","true")</eval>
          <eval token="showPanelB">case($row.app$=="B","true")</eval>
        </drilldown>
      </table>
    </panel>
  </row>
  <row>
    <panel depends="$showPanelA$">
      <html>Panel A</html>
    </panel>
    <panel depends="$showPanelB$">
      <html>Panel B</html>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...