Advertisement
emiller42

Test Form with Singles

Oct 18th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.53 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <form>
  3.     <label>test form with singles</label>
  4.     <fieldset autoRun="true">
  5.         <input type="dropdown" token="host">
  6.             <label>Choose host</label>
  7.             <prefix>host="</prefix>
  8.             <suffix>"</suffix>
  9.             <choice value="*">All</choice>
  10.             <default>*</default>
  11.             <populatingSearch fieldForValue="host" fieldForLabel="host">| metadata type=hosts index=_internal | dedup host | table host | sort host</populatingSearch>
  12.         </input>
  13.         <input type="dropdown" token="sourcetype">
  14.             <label>Choose Sourcetype</label>
  15.             <prefix>sourcetype="</prefix>
  16.             <suffix>"</suffix>
  17.             <choice value="*">All</choice>
  18.             <default>*</default>
  19.             <populatingSearch fieldForValue="sourcetype" fieldForLabel="sourcetype">| metadata type=sourcetypes index=_internal | dedup sourcetype | table sourcetype | sort sourcetype</populatingSearch>
  20.         </input>
  21.         <input type="time">
  22.             <default>Last 4 hours</default>
  23.         </input>
  24.     </fieldset>
  25.     <searchTemplate>index=_internal $host$ $sourcetype$</searchTemplate>
  26.     <row>
  27.         <single>
  28.             <title> Earliest Event</title>
  29.             <searchPostProcess> | stats earliest(_time) as earliest | fieldformat earliest=strftime(earliest, "%c")</searchPostProcess>
  30.         </single>
  31.         <single>
  32.             <title>Latest Event</title>
  33.             <searchPostProcess> | stats latest(_time) as latest | fieldformat latest=strftime(latest, "%c")</searchPostProcess>
  34.         </single>
  35.     </row>
  36. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement