Please provide sample Simple XML for custom timerange dropdown. I do not want to allow users to select whatever timerange they please, like "All Time" Or "Year to Date".
<searchTemplate>index=_internal earliest=$earliest$ | head 10000</searchTemplate>
<fieldset autoRun="true" submitButton="false">
<input type="dropdown" token="earliest" searchWhenChanged="true">
<label>Select a time:</label>
<choice value="-4h@h">Last 4 hours</choice>
<choice value="-12h@h">Last 12 hours</choice>
<choice value="-24h@h">Last 24 hours</choice>
<default>-4h@h</default>
</input>
</fieldset>
<searchTemplate>index=_internal earliest=$earliest$ | head 10000</searchTemplate>
<fieldset autoRun="true" submitButton="false">
<input type="dropdown" token="earliest" searchWhenChanged="true">
<label>Select a time:</label>
<choice value="-4h@h">Last 4 hours</choice>
<choice value="-12h@h">Last 12 hours</choice>
<choice value="-24h@h">Last 24 hours</choice>
<default>-4h@h</default>
</input>
</fieldset>
Great Job!!!!
Can this be done without modifying the CSS or HTML in the back end? I would also like to have custom time ranges for a dashboard but without using advance XML.
yes 🙂 I will post an example in a moment unless someone beats me to it.