Dashboards & Visualizations

Dynamic Dashboard - Radio Button with Text Input fields

rarangarajanspl
Explorer

Hello All
I am new to Splunk and need to develop an interactive dash board. Would be great if anyone can help with this.

  1. My dash board should have couple of radio button; 1. Search by Input parameters 2. Seach by Output parameters
  2. By selection the option "Search by Input parameters", a. I want to display 5 text fields (which are input parameters) and a submit button b. Allow the user to key in the text fields and submit c. Display the results in a table format
  3. By selection the option "Search by Output`parameters", a. I want to display 5 text fields (which are output parameters) and a submit button b. Allow the user to key in the text fields and submit c. Display the results in a table format
Tags (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@rarangarajansplunk

Check below XML for managing filters on the selection of radio button. You can also manage Table view with same technic.

<form>
  <label>Radio Button Selection Example</label>
  <fieldset submitButton="true">
    <input type="radio" token="field1">
      <label>Select Parameter</label>
      <choice value="input">Search by Input parameters</choice>
      <choice value="output">Search by Output parameters</choice>
      <change>
        <condition value="input">
          <set token="tkninput">$value$</set>
          <unset token="tknoutput"></unset>
        </condition>
        <condition value="output">
          <unset token="tkninput"></unset>
          <set token="tknoutput">$value$</set>
        </condition>
        <condition>
          <unset token="tkninput"></unset>
          <unset token="tknoutput"></unset>
        </condition>
      </change>
    </input>
    <input type="text" token="input1" depends="$tkninput$">
      <label>Input Parameter 1</label>
    </input>
    <input type="text" token="input2" depends="$tkninput$">
      <label>Input Parameter 2</label>
    </input>
    <input type="text" token="input3" depends="$tkninput$">
      <label>Input Parameter 3</label>
    </input>
    <input type="text" token="input4" depends="$tkninput$">
      <label>Input Parameter 4</label>
    </input>
    <input type="text" token="input5" depends="$tkninput$">
      <label>Input Parameter 5</label>
    </input>
    <input type="text" token="output1" depends="$tknoutput$">
      <label>Output Parameter 1</label>
    </input>
    <input type="text" token="output2" depends="$tknoutput$">><label>Output Parameter 2</label>
    </input>
    <input type="text" token="output3" depends="$tknoutput$">><label>Input Parameter 3</label>
    </input>
    <input type="text" token="output4" depends="$tknoutput$">><label>Output Parameter 4</label>
    </input>
    <input type="text" token="output5" depends="$tknoutput$">><label>Output Parameter 5</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <html>
        $tkninput$ <br/>
        $tknoutput$
      </html>
    </panel>
  </row>
</form>

View solution in original post

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@rarangarajansplunk

Check below XML for managing filters on the selection of radio button. You can also manage Table view with same technic.

<form>
  <label>Radio Button Selection Example</label>
  <fieldset submitButton="true">
    <input type="radio" token="field1">
      <label>Select Parameter</label>
      <choice value="input">Search by Input parameters</choice>
      <choice value="output">Search by Output parameters</choice>
      <change>
        <condition value="input">
          <set token="tkninput">$value$</set>
          <unset token="tknoutput"></unset>
        </condition>
        <condition value="output">
          <unset token="tkninput"></unset>
          <set token="tknoutput">$value$</set>
        </condition>
        <condition>
          <unset token="tkninput"></unset>
          <unset token="tknoutput"></unset>
        </condition>
      </change>
    </input>
    <input type="text" token="input1" depends="$tkninput$">
      <label>Input Parameter 1</label>
    </input>
    <input type="text" token="input2" depends="$tkninput$">
      <label>Input Parameter 2</label>
    </input>
    <input type="text" token="input3" depends="$tkninput$">
      <label>Input Parameter 3</label>
    </input>
    <input type="text" token="input4" depends="$tkninput$">
      <label>Input Parameter 4</label>
    </input>
    <input type="text" token="input5" depends="$tkninput$">
      <label>Input Parameter 5</label>
    </input>
    <input type="text" token="output1" depends="$tknoutput$">
      <label>Output Parameter 1</label>
    </input>
    <input type="text" token="output2" depends="$tknoutput$">><label>Output Parameter 2</label>
    </input>
    <input type="text" token="output3" depends="$tknoutput$">><label>Input Parameter 3</label>
    </input>
    <input type="text" token="output4" depends="$tknoutput$">><label>Output Parameter 4</label>
    </input>
    <input type="text" token="output5" depends="$tknoutput$">><label>Output Parameter 5</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <html>
        $tkninput$ <br/>
        $tknoutput$
      </html>
    </panel>
  </row>
</form>
0 Karma

rarangarajanspl
Explorer

Hi Kamlesh
Please suggest on this
1. As soon as, i open the dash board, i see couple of option box and a submit button. Actually, i want to hide the submit button, once i open the dashboard.
2. I would like to see it, when i click the option box only. Until i click option box, i don't want to see the submit button.

0 Karma

rarangarajanspl
Explorer
0 Karma

rarangarajanspl
Explorer

Thank you very much! Very helpful

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...