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!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...