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!

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...

Join Us at the Builder Bar at .conf24 – Empowering Innovation and Collaboration

What is the Builder Bar? The Builder Bar is more than just a place; it's a hub of creativity, collaboration, ...

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...