Dashboards & Visualizations
Highlighted

Drilldown to hidden/show panels not showing based

Explorer

Hi People,

I am trying to create a drill down into a set of hidden/show panels in another page from my Splunk dashboard,
however, when I drill down from specific panel on my dashboard, the hidden/show panels which should be shown is not showing,
it is passed through the form option in the drilldown url, even though the form is updating in the drilldown the panel is not showing,

Here is some code from the drilldown

<drilldown target="_blank">
      <link>
        <![CDATA[/app/*/island_branches_wip__drilldown_lbil_dashboard?form.tkntime.earliest=$earliest$&form.tkntime.latest=$latest$&form.type=Island+UK]]>
      </link>
    </drilldown>

so what should happen is the Island+UK part of the form should pass into the form of the second dashboard displaying the panel that depends on that part of the form, but its not automatically showing

here is some code from the second dashboard

<input type="dropdown" token="type" searchWhenChanged="true">
  <label>Island Branch Type Search</label>
  <default>*</default>
  <choice value="Island Island">Island+Island</choice>
  <choice value="Island UK">Island+UK</choice>
  <choice value="UK Island">UK+Island</choice>
  <change>
    <condition value="Island Island">
      <set token="show_islandisland"></set>
      <unset token="show_islanduk"></unset>
      <unset token="show_ukisland"></unset>
    </condition>
    <condition value="Island UK">
      <unset token="show_islandisland"></unset>
      <set token="show_islanduk"></set>
      <unset token="show_ukisland"></unset>
    </condition>
    <condition value="UK Island">
      <unset token="show_islandisland"></unset>
      <unset token="show_islanduk"></unset>
      <set token="show_ukisland"></set>
    </condition>
  </change>

and then each panel would have this line of code depending on what it depends on

<panel depends="$show_islanduk$">

I just want to drill down from the first dashboard and show the contents of the panel that should be displayed upon clicking,

Any help would be greatly appreciated, I hope this makes sense

0 Karma
Highlighted

Re: Drilldown to hidden/show panels not showing based

Path Finder

In your input form you are using the element to trigger setting the tokens. While this works great on a single form/dashboard, it doesn't work when pulling the values of the form in from a url because there is no CHANGE event to trigger the condition. The page is simply loaded with the values set. However, you CAN do what you're looking for, if I understand it correctly.

First of all, if you also want to be able to manipulate the panels from the dropdown on dashboard2, then keep everything that you have in place on the second dashboard. That should all work fine.

But to do what you're asking to pull the values essentially from a URL you need to change what you're doing with dashboard1.

Instead of passing just passing the value of the TYPE field, you also need to pass the token you want set into the second dashboard to have them influence the show/hide condition of the panels. These should be added to the URL for the drilldown from dashboard1.

<dashboard>
  <label>Dashboard1</label>
  <row>
    <panel>
      <table>
        <search>
          <query></query>
          <earliest>-60s</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">cell</option>
        <option name="refresh.display">progressbar</option>
        <drilldown>
          <link target="_blank">/app/*/island_branches_wip__drilldown_lbil_dashboard?form.tkntime.earliest=$earliest$&form.tkntime.latest=$latest$&form.type=Island+Island&show_islandisland=true</link>
        </drilldown>
      </table>
    </panel>
  </row>
</dashboard>

In the above xml, you'll notice that I added "&show_islandisland=true" to the URL. I set the value to true, but that isn't really what matters. You could set that to anything you want and it will work. But the presence of that token in the URL will cause the panel that depends on that token to appear.

In the example Dashboard1 above, you could change the URL to call Dashboard2 below with any of the following to get the appropriate panel.

<link target="_blank">/app/*/island_branches_wip__drilldown_lbil_dashboard?form.tkntime.earliest=$earliest$&form.tkntime.latest=$latest$&form.type=Island+Island&show_islandisland=true</link>
<link target="_blank">/app/*/island_branches_wip__drilldown_lbil_dashboard?form.tkntime.earliest=$earliest$&form.tkntime.latest=$latest$&form.type=UK+Island&show_ukisland=true</link>
<link target="_blank">/app/*/island_branches_wip__drilldown_lbil_dashboard?form.tkntime.earliest=$earliest$&form.tkntime.latest=$latest$&form.type=Island+UK&show_islanduk=true</link>

.

<form>
  <label>Dashboard2</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="type" searchWhenChanged="true">
      <label>Island Branch Type Search</label>
      <default>*</default>
      <choice value="Island Island">Island+Island</choice>
      <choice value="Island UK">Island+UK</choice>
      <choice value="UK Island">UK+Island</choice>
      <change>
        <condition value="Island Island">
          <set token="show_islandisland"></set>
          <unset token="show_islanduk"></unset>
          <unset token="show_ukisland"></unset>
        </condition>
        <condition value="Island UK">
          <unset token="show_islandisland"></unset>
          <set token="show_islanduk"></set>
          <unset token="show_ukisland"></unset>
        </condition>
        <condition value="UK Island">
          <unset token="show_islandisland"></unset>
          <unset token="show_islanduk"></unset>
          <set token="show_ukisland"></set>
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel depends="$show_islanduk$">
      <event>
        <search>
          <query>|your queryhere</query>
          <earliest>-1m</earliest>
          <latest>now</latest>
        </search>
      </event>
    </panel>
    <panel depends="$show_islandisland$">
      <event>
        <search>
          <query>|your queryhere</query>
          <earliest>-1m</earliest>
          <latest>now</latest>
        </search>
      </event>
    </panel>
    <panel depends="$show_ukisland$">
      <event>
        <search>
          <query>|your queryhere</query>
          <earliest>-1m</earliest>
          <latest>now</latest>
        </search>
      </event>
    </panel>
  </row>
</form>

View solution in original post

0 Karma
Highlighted

Re: Drilldown to hidden/show panels not showing based

Explorer

Legend mate! thanks for that
so i forgot to pass the token to the dashboard, so it had no idea what to do with the form type, makes sense!

Will keep this in mind going forward 🙂 thanks!

0 Karma
Highlighted

Re: Drilldown to hidden/show panels not showing based

SplunkTrust
SplunkTrust

@ssjabid,

Minor correction - when you set the token "type" from the first dashboard , you should set the "value" of the choice, not label.

Change &form.type=Island+UK to &form.type=Island UK

or

swap the choice value & label in second dashboard from

<choice value="Island UK">Island+UK</choice> to <choice value="Island+UK">Island UK</choice> and also for all other values.

0 Karma