<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Time range in form search in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105919#M5976</link>
    <description>&lt;P&gt;Yes.&lt;BR /&gt;
If your dashboard is in advanced XML (you can convert it by adding  ?showsource=1 to the end of your dashboard link, e.g  &lt;CODE&gt;/en-US/app/search/dashboard_live?showsource=1&lt;/CODE&gt; This will display a page with a box that contains the converted simple xml in advanced xml)&lt;/P&gt;

&lt;P&gt;You can then use the code;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;module name="HiddenSearch" layoutPanel="panel_row1_col1" autoRun="True"&amp;gt;
        &amp;lt;module name="TimeRangePicker"&amp;gt;    
        &amp;lt;param name="label"&amp;gt;Select Time Range: &amp;lt;/param&amp;gt;
          &amp;lt;param name="searchWhenChanged"&amp;gt;True&amp;lt;/param&amp;gt;
          &amp;lt;param name="selected"&amp;gt;Last 4 hours&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you enclose all searches you want to inherit the time from this module by closing the module after them then as the user changes the selected time range it will update all searches.&lt;/P&gt;

&lt;P&gt;To define the time ranges (other than default) you can edit times.conf (or create your own in the appname/local directory. See the following link for more detail;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/admin/Timesconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/admin/Timesconf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2011 12:08:53 GMT</pubDate>
    <dc:creator>Drainy</dc:creator>
    <dc:date>2011-11-08T12:08:53Z</dc:date>
    <item>
      <title>Time range in form search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105918#M5975</link>
      <description>&lt;P&gt;Is there a way to add time range in a form search, eg. specify start time and end time? right now i have a drop down list with a few options. But we would like to let user specify a time range as what they wish to see.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2011 05:14:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105918#M5975</guid>
      <dc:creator>xiaoyuew</dc:creator>
      <dc:date>2011-11-08T05:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Time range in form search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105919#M5976</link>
      <description>&lt;P&gt;Yes.&lt;BR /&gt;
If your dashboard is in advanced XML (you can convert it by adding  ?showsource=1 to the end of your dashboard link, e.g  &lt;CODE&gt;/en-US/app/search/dashboard_live?showsource=1&lt;/CODE&gt; This will display a page with a box that contains the converted simple xml in advanced xml)&lt;/P&gt;

&lt;P&gt;You can then use the code;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;module name="HiddenSearch" layoutPanel="panel_row1_col1" autoRun="True"&amp;gt;
        &amp;lt;module name="TimeRangePicker"&amp;gt;    
        &amp;lt;param name="label"&amp;gt;Select Time Range: &amp;lt;/param&amp;gt;
          &amp;lt;param name="searchWhenChanged"&amp;gt;True&amp;lt;/param&amp;gt;
          &amp;lt;param name="selected"&amp;gt;Last 4 hours&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you enclose all searches you want to inherit the time from this module by closing the module after them then as the user changes the selected time range it will update all searches.&lt;/P&gt;

&lt;P&gt;To define the time ranges (other than default) you can edit times.conf (or create your own in the appname/local directory. See the following link for more detail;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/admin/Timesconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/admin/Timesconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2011 12:08:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105919#M5976</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2011-11-08T12:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Time range in form search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105920#M5977</link>
      <description>&lt;P&gt;In addition to Draineh's answer, this can also be done in simple XML. Just use &lt;CODE&gt;&amp;lt;input type="time"/&amp;gt;&lt;/CODE&gt;. Complete example below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Example search form&amp;lt;/label&amp;gt;

  &amp;lt;searchTemplate&amp;gt;sourcetype="example" someparam="$someparam$"&amp;lt;/searchTemplate&amp;gt;

  &amp;lt;fieldset&amp;gt;
    &amp;lt;input type="text" token="someparam"&amp;gt;
      &amp;lt;label&amp;gt;Value to filter someparam on&amp;lt;/label&amp;gt;
      &amp;lt;seed&amp;gt;*&amp;lt;/seed&amp;gt;
    &amp;lt;/input&amp;gt;

    &amp;lt;input type="time"/&amp;gt;
  &amp;lt;/fieldset&amp;gt;

  &amp;lt;row&amp;gt;
    &amp;lt;table&amp;gt;
      &amp;lt;title&amp;gt;Search results&amp;lt;/title&amp;gt;
      &amp;lt;fields&amp;gt;_time, someparam, _raw&amp;lt;/fields&amp;gt;
      &amp;lt;option name="showPager"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;option name="count"&amp;gt;30&amp;lt;/option&amp;gt;
      &amp;lt;option name="displayRowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Nov 2011 15:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105920#M5977</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-11-08T15:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Time range in form search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105921#M5978</link>
      <description>&lt;P&gt;Thanks, Ayn.&lt;/P&gt;

&lt;P&gt;What if I only want to have 3 options in the dropdown list, instead of the 10 choices we have by default? say i only want last 4 hours, last 24 hours and last 7 days.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2011 21:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105921#M5978</guid>
      <dc:creator>xiaoyuew</dc:creator>
      <dc:date>2011-11-08T21:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Time range in form search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105922#M5979</link>
      <description>&lt;P&gt;I understand that there is an option for that which is to change the configuration in the times.conf.However, we don't want to do that. We just want this form to have fewer drop down options.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2011 22:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Time-range-in-form-search/m-p/105922#M5979</guid>
      <dc:creator>xiaoyuew</dc:creator>
      <dc:date>2011-11-08T22:01:40Z</dc:date>
    </item>
  </channel>
</rss>

