Dashboards & Visualizations

How to arrange the text inputs on my dashboard form?

HeinzWaescher
Motivator

Hi,

there are 4 text inputs in my form dashboard:

input1 input2 input3 input4

Is it possible to rearrange them (force a "new line" after input2)?

input1 input2
input3 input4
Tags (3)
0 Karma
1 Solution

somesoni2
Revered Legend

Try something like this

<form>
  <label>InputsIntwoRows</label> 
  <fieldset autoRun="false" submitButton="true">
    <input type="time">
      <default>
        <earliestTime>-24h@h</earliestTime>
        <latestTime>now</latestTime>
      </default>
    </input>
    <input type="dropdown" token="varIndex" id="field1">
      <label>Index :</label>
      <default>clm_stage</default>
      <populatingSearch fieldForValue="index" fieldForLabel="index">
        <![CDATA[| eventcount summarize=false index=* | dedup index ]]>
      </populatingSearch>
    </input>   
    <input type="dropdown" token="varSourceType" id="field2">
      <label>Source Type :</label>
      <default>*</default>
      <choice value="*">All</choice>
      <populatingSearch fieldForValue="sourcetype" fieldForLabel="sourcetype">
        <![CDATA[index=$varIndex$| stats count by sourcetype | fields sourcetype]]>
      </populatingSearch>
    </input>
     <html>
<br></br>   
      <br></br> 
      <br></br> 
      <br></br> 
       <br></br> 
    </html>
    <input type="dropdown" token="varSource" id="field3">
      <label>Source/File :</label>
      <default>*</default>
      <choice value="*">All</choice>
      <populatingSearch fieldForValue="source" fieldForLabel="source">
        <![CDATA[ index=$varIndex$ sourcetype=$varSourceType$| stats count by source | fields source | eval source=replace(source,"\\x5c","\\\\") ]]>
      </populatingSearch>
    </input>    
    <input type="text" token="varFilter">
      <label>Additional Filter (use '*' for exceptions, 'logEntryType=Summary' for transactions):</label>
      <default>logEntryType=Summary</default>
    </input>
  </fieldset>
  <row>
    <table>
      <title>Date</title>
      <searchString>index=$varIndex$ sourcetype=$varSourceType$ source=$varSource$ $varFilter$ |timechart count</searchString>
      <earliestTime>$earliest$</earliestTime>
      <latestTime>$latest$</latestTime>
      <option name="wrap">false</option>
      <option name="rowNumbers">false</option>
      <option name="dataOverlayMode">none</option>
      <option name="drilldown">none</option>
      <option name="count">5</option>
    </table>
  </row>
</form>

View solution in original post

somesoni2
Revered Legend

Try something like this

<form>
  <label>InputsIntwoRows</label> 
  <fieldset autoRun="false" submitButton="true">
    <input type="time">
      <default>
        <earliestTime>-24h@h</earliestTime>
        <latestTime>now</latestTime>
      </default>
    </input>
    <input type="dropdown" token="varIndex" id="field1">
      <label>Index :</label>
      <default>clm_stage</default>
      <populatingSearch fieldForValue="index" fieldForLabel="index">
        <![CDATA[| eventcount summarize=false index=* | dedup index ]]>
      </populatingSearch>
    </input>   
    <input type="dropdown" token="varSourceType" id="field2">
      <label>Source Type :</label>
      <default>*</default>
      <choice value="*">All</choice>
      <populatingSearch fieldForValue="sourcetype" fieldForLabel="sourcetype">
        <![CDATA[index=$varIndex$| stats count by sourcetype | fields sourcetype]]>
      </populatingSearch>
    </input>
     <html>
<br></br>   
      <br></br> 
      <br></br> 
      <br></br> 
       <br></br> 
    </html>
    <input type="dropdown" token="varSource" id="field3">
      <label>Source/File :</label>
      <default>*</default>
      <choice value="*">All</choice>
      <populatingSearch fieldForValue="source" fieldForLabel="source">
        <![CDATA[ index=$varIndex$ sourcetype=$varSourceType$| stats count by source | fields source | eval source=replace(source,"\\x5c","\\\\") ]]>
      </populatingSearch>
    </input>    
    <input type="text" token="varFilter">
      <label>Additional Filter (use '*' for exceptions, 'logEntryType=Summary' for transactions):</label>
      <default>logEntryType=Summary</default>
    </input>
  </fieldset>
  <row>
    <table>
      <title>Date</title>
      <searchString>index=$varIndex$ sourcetype=$varSourceType$ source=$varSource$ $varFilter$ |timechart count</searchString>
      <earliestTime>$earliest$</earliestTime>
      <latestTime>$latest$</latestTime>
      <option name="wrap">false</option>
      <option name="rowNumbers">false</option>
      <option name="dataOverlayMode">none</option>
      <option name="drilldown">none</option>
      <option name="count">5</option>
    </table>
  </row>
</form>

Kawtar
Path Finder

Thanks (y)

0 Karma

HeinzWaescher
Motivator

Thanks a lot!

Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...