Dashboards & Visualizations

Stop the panels to start searching without using submit button??

chitreshakumar
Communicator

I have one input which is interconnected to other inputs .When I change the values of the input I want the inputs to be populated and not the panel search without using my submit button.
For example : If we select the input as sport .Out of different options I select soccer then only players belonging to soccer should display in input .But not the stats panel of that sport until I select all other the inputs and then click on submit button.

0 Karma
1 Solution

mayurr98
Super Champion

Here is a blog entry that outlines a method for putting panels into tabs: http://blogs.splunk.com/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-clicked/

This method allows you to control the searches within the tabs such that they do not execute until you click the tab.

Let me know if this helps!

View solution in original post

0 Karma

elliotproebstel
Champion

I don't think you need to use searchWhenChanged to get the second input dropdown to populate. Here's some run-anywhere code that I drafted up to demonstrate:

<form>
  <label>test_dash</label>
  <fieldset submitButton="true">
    <input type="dropdown" token="tok1" searchWhenChanged="false">
      <label>tok1</label>
      <fieldForLabel>host</fieldForLabel>
      <fieldForValue>host</fieldForValue>
      <search>
        <query>index=_internal | head 500 | stats count by host</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
    </input>
    <input type="dropdown" token="tok2">
      <label>tok2</label>
      <fieldForLabel>sourcetype</fieldForLabel>
      <fieldForValue>sourcetype</fieldForValue>
      <search>
        <query>index=_internal "$tok1$" | stats count by sourcetype</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
    </input>
  </fieldset>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal "$tok2$" | stats count</query>
          <earliest>-60m@m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </single>
    </panel>
  </row>
</form>
0 Karma

chitreshakumar
Communicator

Thanks for your answer.But there is one input named group.When I select the group only those people belonging to particular group shows up .For which I have added some code.
I want that dynamic nature to remain in the inputs .If there is any way to stop panels to search please suggest

0 Karma

elliotproebstel
Champion

Any chance you can post the XML of your dashboard? I thought I understood what your challenge was, but it seems like maybe there is a nuance to your XML that I'm not getting. If you could share it, I'd be happy to look.

0 Karma

chitreshakumar
Communicator
<fieldset submitButton="true" autoRun="false">
      <input type="time" token="time" searchWhenChanged="false">
        <label>Time Range</label>
        <default>
          <earliest>@mon</earliest>
          <latest>now</latest>
        </default>
      </input>
       <input type="multiselect" token="name" searchWhenChanged="true">
        <label>Name</label>
        <search base="base_search">
          <query>search $exclude_name$| stats sum(count) as count by name  | eventstats sum(count) as total | </query>
        </search>
        <fieldForLabel>label</fieldForLabel>
        <fieldForValue>value</fieldForValue>
        <default>*</default>
        <choice value="*">All</choice>
        <prefix>(</prefix>
        <suffix>)</suffix>
        <valuePrefix>name="</valuePrefix>
        <valueSuffix>"</valueSuffix>
        <delimiter> OR </delimiter>
      </input>
      <input type="multiselect" token="person" searchWhenChanged="false">
        <label>Person Name</label>
        <search base="base_search">
          <query>search $name$ $exclude_name$ | stats sum(count) as count by person| eval label=person | eval value=person | sort by person</query>
        </search>
        <fieldForLabel>label</fieldForLabel>
        <fieldForValue>value</fieldForValue>
        <default>*</default>
        <choice value="*">All</choice>
        <prefix>(</prefix>
        <suffix>)</suffix>
        <valuePrefix>person = "</valuePrefix>
        <valueSuffix>"</valueSuffix>
        <delimiter> OR </delimiter>
      </input>
0 Karma

mayurr98
Super Champion

Here is a blog entry that outlines a method for putting panels into tabs: http://blogs.splunk.com/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-clicked/

This method allows you to control the searches within the tabs such that they do not execute until you click the tab.

Let me know if this helps!

0 Karma

chitreshakumar
Communicator

I don't want to create a new tab .I just want to stop the search unless I click on submit button.

Since one of my inputs "searchwhenchanged=true" so that other inputs can populate according to the first inputs.Not all the panels .How to stop that?

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...