Dashboards & Visualizations

How to only show the panel selected from a drop-down and keep the rest of the panels hidden?

kamal_jagga
Contributor

Hi,

I have a drop-down with a list of 10 panels. Each panel runs a different search. Now I want to show only the panel selected in the drop-down and keep rest of the panels hidden.

I am facing issue assigning tokens to each value of the drop-down.

Is this possible?

0 Karma
1 Solution

gyslainlatsa
Motivator

hi kamal_jagga,

try like this:

<form>
    <label>Display Dynamic Panel</label>
   <row>
      <panel>  
        <input type="dropdown" token="" searchWhenChanged="true">
          <choice value="1">Panel1</choice>
          <choice value="2">Panel2</choice>
          <choice value="3">Panel3</choice>
         <choice value="4">Panel4</choice>
          <choice value="5">Panel5</choice>
          <choice value="6">Panel6</choice>
         <choice value="7">Panel7</choice>
          <choice value="8">Panel8</choice>
          <choice value="9">Panel9</choice>
         <choice value="10">Panel10</choice>
          <default></default>

          <change>
            <condition value="1">
              <set token="new_search"> Search1</set>
            </condition>
            <condition value="2">
              <set token="new_search"> Search2 </set>
            </condition>
            <condition value="3">
              <set token="new_search">Search3 </set>
            </condition>
            <condition value="4">
              <set token="new_search"> search4 </set>
            </condition>
           <condition value="5">
              <set token="new_search">Search5 </set>
            </condition>
                    ----------------------------------------
                    -----------------------------------------
                    ----------------------------------------
           <condition value="10">
              <set token="new_search"> Search10 </set>
            </condition>
          </change>
        </input>

        <chart>
          <search>
            <query>$new_search$</query>
            <earliest>-4h@m</earliest>
            <latest>now</latest>
          </search>
          <option name="charting.chart">column</option>
        </chart>
      </panel>
    </row>
  </form>

View solution in original post

ranjith_kumar
Path Finder

Hi @gyslainlatsa

Similar to the above question i need a solution for the below. can you please help me out?

I have 15 sections starting from 1.1, 1.2, 1.3, 1.4 ..... 1.15. (This 15 sections im displaying in a dropdown). Each section contains around 10 panels. so 15x10=150 panels in a single dashboard. now i want to show only the selected Section panels in the dashboard remaining i want to hide it. how can i do it.

Thank you in advance.

Regards
Ranjith

0 Karma

gyslainlatsa
Motivator

hi kamal_jagga,

try like this:

<form>
    <label>Display Dynamic Panel</label>
   <row>
      <panel>  
        <input type="dropdown" token="" searchWhenChanged="true">
          <choice value="1">Panel1</choice>
          <choice value="2">Panel2</choice>
          <choice value="3">Panel3</choice>
         <choice value="4">Panel4</choice>
          <choice value="5">Panel5</choice>
          <choice value="6">Panel6</choice>
         <choice value="7">Panel7</choice>
          <choice value="8">Panel8</choice>
          <choice value="9">Panel9</choice>
         <choice value="10">Panel10</choice>
          <default></default>

          <change>
            <condition value="1">
              <set token="new_search"> Search1</set>
            </condition>
            <condition value="2">
              <set token="new_search"> Search2 </set>
            </condition>
            <condition value="3">
              <set token="new_search">Search3 </set>
            </condition>
            <condition value="4">
              <set token="new_search"> search4 </set>
            </condition>
           <condition value="5">
              <set token="new_search">Search5 </set>
            </condition>
                    ----------------------------------------
                    -----------------------------------------
                    ----------------------------------------
           <condition value="10">
              <set token="new_search"> Search10 </set>
            </condition>
          </change>
        </input>

        <chart>
          <search>
            <query>$new_search$</query>
            <earliest>-4h@m</earliest>
            <latest>now</latest>
          </search>
          <option name="charting.chart">column</option>
        </chart>
      </panel>
    </row>
  </form>

kamal_jagga
Contributor

Awesome. Works great. Thank you !!!

0 Karma

gyslainlatsa
Motivator

thanks, don't forget to vote

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...