Dashboards & Visualizations

How can I make the first tab autorun the first time?

julmarqu
Engager

I am following the instructions from here
https://www.splunk.com/blog/2015/03/30/making-a-dashboard-with-tabs-and-searches-that-run-when-click...

And while I have tabs working (and like the fact searches won't trigger until you click the appropriate tab), I have the issue of that first tab when you load the dashboard waiting in the "Search is waiting for input... " message forever. My tabs are a visual dashboard that requires no input, so I don't need my consumer to submit anything or press any button. If I click on a different tab and come back to the first one, the search then runs. How can I make it so the searches in the first tab run automatically when you load the dashboard?

Tags (1)
0 Karma
1 Solution

DalJeanis
Legend

You need to initialize your tokens - set desired tab token and unset the rest.

Add this right after your title.

 <init>
    <set token="siar">SIAR</set> 
    <unset token="psirt"/>
</init>

View solution in original post

0 Karma

DalJeanis
Legend

You need to initialize your tokens - set desired tab token and unset the rest.

Add this right after your title.

 <init>
    <set token="siar">SIAR</set> 
    <unset token="psirt"/>
</init>
0 Karma

kmugglet
Communicator

Hi,
I would check your token names, as the "Search is waiting for input... " is sometimes a symptom of a misspelled token in the search.

Is there something that's set in the 2nd tab that's used in the 1st?

HTH, Keith

0 Karma

julmarqu
Engager

I don't think this would be the case since I'm using only the tokens to have the tab feature work. Also the searches on both tabs are independent. see below

<form script="tabs.js" stylesheet="tabs.css">
  <label>TITLE</label>
  <row id="tabs">
    <panel>
      <html>
          <ul id="tabs" class="nav nav-tabs">
            <li class="active">
              <a href="#" class="toggle-tab" data-toggle="tab" data-elements="siar_summary" data-token="siar">SIAR</a>
            </li>
                <li>
                    <a href="#" class="toggle-tab" data-toggle="tab" data-elements="psirt_summary" data-token="psirt">PSIRT</a>
                </li>
              </ul>
          </html>
    </panel>
  </row>
  <row id="siar_summary">
    <panel>
      <title>SIAR</title>
      <table>
        <search>
          <query>index=idx-np $siar$ sourcetype=track_members trackFlexibleCompliant=False [search sourcetype=group_members_v5 groupId=1234 | fields deviceId] | stats count as Total | eval divisionName="Division A" | table divisionName,Total</query>
          <earliest>@d</earliest>
          <latest>now</latest>
        </search>
      </table>
    </panel>
  </row>
  <row id="psirt_summary">
    <panel>
      <title>PSIRT</title>
      <table>
        <search>
          <query>index=idx-np sourcetype=track_members trackFlexibleCompliant=False $psirt$ [search sourcetype=group_members_v5 groupId=5678 | fields deviceId] | stats count as Total | eval divisionName="Division B" | table divisionName,Total</query>
          <earliest>@d</earliest>
          <latest>now</latest>
        </search>
      </table>
    </panel>
  </row>
</form>
0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...