<?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: Adding time selector to dashboard panel on dbx query in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20120#M43703</link>
    <description>&lt;P&gt;Still nothing. Even when I copy this xml straight to a new blank dashboard nothing appears.&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2013 17:40:00 GMT</pubDate>
    <dc:creator>aaronkorn</dc:creator>
    <dc:date>2013-05-06T17:40:00Z</dc:date>
    <item>
      <title>Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20112#M43695</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We have a dashboard panel that does a query for a set of data for the last 7 days. Is there a way to place a dropdown time selector next to the dashboard panel and pass a variable to the dbx search query to change the time frame?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 12:41:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20112#M43695</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2013-04-30T12:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20113#M43696</link>
      <description>&lt;P&gt;Are you looking for a date range picker type solution, or a simple dropdown with some static time ranges?&lt;/P&gt;

&lt;P&gt;I've used Sideview Utils to define some static dropdowns which pass parameters to searches with succcess using the an example snippet like the one below&lt;/P&gt;

&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
...&lt;BR /&gt;
&lt;MODULE name="SideviewUtils" layoutpanel="appHeader"&gt;&lt;/MODULE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;&lt;MODULE name="Pulldown" layoutpanel="panel_row1_col1" autorun="True"&gt;&lt;BR /&gt;
    &lt;OBJECT&gt;&lt;PARAM name="name" /&gt;dropdown_timerange&lt;BR /&gt;
    &lt;PARAM name="label" /&gt;Time Range:  &lt;BR /&gt;
    &lt;PARAM name="staticFieldsToDisplay" /&gt;&lt;BR /&gt;
      &lt;LIST&gt;&lt;BR /&gt;
         &lt;PARAM name="label" /&gt;Last Day&lt;BR /&gt;
         &lt;PARAM name="value" /&gt;24&lt;BR /&gt;&lt;BR /&gt;
      &lt;/LIST&gt;&lt;BR /&gt;
      &lt;LIST&gt;&lt;BR /&gt;
         &lt;PARAM name="label" /&gt;Last Hour&lt;BR /&gt;
         &lt;PARAM name="value" /&gt;1&lt;BR /&gt;&lt;BR /&gt;
      &lt;/LIST&gt;&lt;BR /&gt;&lt;BR /&gt;
      &lt;LIST&gt;&lt;BR /&gt;
         &lt;PARAM name="label" /&gt;Last Week&lt;BR /&gt;
         &lt;PARAM name="value" /&gt;168&lt;BR /&gt;
      &lt;/LIST&gt;&lt;BR /&gt;&lt;BR /&gt;
      &lt;LIST&gt;&lt;BR /&gt;
         &lt;PARAM name="label" /&gt;Last Month&lt;BR /&gt;
         &lt;PARAM name="value" /&gt;744&lt;BR /&gt;&lt;BR /&gt;
      &lt;/LIST&gt;&lt;BR /&gt;&lt;BR /&gt;
       &lt;/OBJECT&gt;&lt;/MODULE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row1_col1" autoRun="True"&amp;gt;
      &amp;lt;param name="search"&amp;gt;| dbquery yourdb "select * from your_table where (sysdate-time_field)*24 between 1 and $dropdown_timerange$ &amp;lt;/param&amp;gt;
      &amp;lt;module name="SimpleResultsTable"&amp;gt;
        &amp;lt;param name="displayRowNumbers"&amp;gt;false&amp;lt;/param&amp;gt;
      &amp;lt;/module&amp;gt;
 &amp;lt;/module
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;

&lt;P&gt;...&lt;BR /&gt;
&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 13:38:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20113#M43696</guid>
      <dc:creator>jjdorn</dc:creator>
      <dc:date>2013-04-30T13:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20114#M43697</link>
      <description>&lt;P&gt;Thanks for the feedback. Is there a way to do this in the simplified xml view?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 17:48:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20114#M43697</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2013-04-30T17:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20115#M43698</link>
      <description>&lt;P&gt;Unfortunately I think Sideview is only usable in Advanced-XML, but perhaps someone else has a way of accomplishing the same task with native functionality in Simple-XML.&lt;/P&gt;

&lt;P&gt;If your dashboard isn't overly complex I'd really recommend taking the leap to the advanced XML code though.  Most stuff translates pretty easily, and while it is slightly more complicated you also gain quite a bit of flexibility as to what tools you have at your disposal, and how they can be utilized.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 18:00:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20115#M43698</guid>
      <dc:creator>jjdorn</dc:creator>
      <dc:date>2013-04-30T18:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20116#M43699</link>
      <description>&lt;P&gt;So I tried adding this to the advanced xml and got: &lt;/P&gt;

&lt;P&gt;Misconfigured view 'ESM_Test' - layoutPanel is not defined for module Pulldown&lt;/P&gt;

&lt;P&gt;Misconfigured view 'ESM_Test' - layoutPanel is not defined for module SideviewUtils&lt;/P&gt;

&lt;P&gt;found an invalid value for layoutPanel - 'None'&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2013 19:25:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20116#M43699</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2013-05-01T19:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20117#M43700</link>
      <description>&lt;P&gt;First question would be, do you have the SideView Utils app installed?&lt;/P&gt;

&lt;P&gt;If not that's probably the root issue since the Pulldown tag is sideview specific.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 14:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20117#M43700</guid>
      <dc:creator>jjdorn</dc:creator>
      <dc:date>2013-05-02T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20118#M43701</link>
      <description>&lt;P&gt;yes it is installed.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 17:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20118#M43701</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2013-05-02T17:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20119#M43702</link>
      <description>&lt;P&gt;I think posting your XML would be helpful because I'm not sure where you're getting the error.&lt;/P&gt;

&lt;P&gt;Here is a stripped down basic example of a dropdown with 4 options, which are used to drive the output of a SQL query against an Oracle database named "mydb".  Try this out on your system and see if helps&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;
&lt;VIEW template="dashboard.html"&gt;

  &lt;MODULE name="SideviewUtils" layoutpanel="appHeader"&gt;&lt;/MODULE&gt;

  &lt;MODULE name="Pulldown" layoutpanel="panel_row1_col1" autorun="True"&gt;
    &lt;OBJECT&gt;&lt;PARAM name="name" /&gt;pulldown_time_range
    &lt;PARAM name="label" /&gt;Time Range (Hours):  
    &lt;PARAM name="staticFieldsToDisplay" /&gt;
      &lt;LIST&gt;
         &lt;PARAM name="label" /&gt;Last Hour
         &lt;PARAM name="value" /&gt;1              
      &lt;/LIST&gt;  
      &lt;LIST&gt;
         &lt;PARAM name="label" /&gt;Last Day
         &lt;PARAM name="value" /&gt;24    
      &lt;/LIST&gt;
      &lt;LIST&gt;
         &lt;PARAM name="label" /&gt;Last Week
         &lt;PARAM name="value" /&gt;168
      &lt;/LIST&gt;              
      &lt;LIST&gt;
         &lt;PARAM name="label" /&gt;Last Month
         &lt;PARAM name="value" /&gt;744              
      &lt;/LIST&gt;          
      
    &lt;MODULE name="Search" layoutpanel="panel_row2_col1" autorun="True"&gt;
        &lt;PARAM name="search" /&gt;| dbquery mydb "select to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') current_ts, $pulldown_time_range$ pulldown_time_range_hours, to_char(sysdate-($pulldown_time_range$/24), 'YYYY-MM-DD HH24:MI:SS') pulldown_ts from dual"
       &lt;MODULE name="SimpleResultsTable"&gt;
          &lt;PARAM name="displayRowNumbers" /&gt;false
       &lt;/MODULE&gt;
    &lt;/MODULE&gt;        
  &lt;/OBJECT&gt;&lt;/MODULE&gt;

&lt;/VIEW&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 May 2013 17:42:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20119#M43702</guid>
      <dc:creator>jjdorn</dc:creator>
      <dc:date>2013-05-02T17:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20120#M43703</link>
      <description>&lt;P&gt;Still nothing. Even when I copy this xml straight to a new blank dashboard nothing appears.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 17:40:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20120#M43703</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2013-05-06T17:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20121#M43704</link>
      <description>&lt;P&gt;Are you creating a "dashboard" or a "view"?&lt;/P&gt;

&lt;P&gt;This XML will only work in a view.  If you try pasting it into a dashboard and then save it all you will get is a blank screen because the syntax is not simple-XML formatted.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 17:47:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20121#M43704</guid>
      <dc:creator>jjdorn</dc:creator>
      <dc:date>2013-05-06T17:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20122#M43705</link>
      <description>&lt;P&gt;AaronKorn, I do see a problem in the pasted syntax now that I look closer.  For some reason the code tags are taking the capital "P" out of the "layoutPanel" tag and that will definately cause it to not work right since its case sensitive.&lt;/P&gt;

&lt;P&gt;Change all of the "layoutpanel" text to be "layoutPanel" and try it again as a view.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 19:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20122#M43705</guid>
      <dc:creator>jjdorn</dc:creator>
      <dc:date>2013-05-06T19:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20123#M43706</link>
      <description>&lt;P&gt;Got it working. Thanks for all your help!&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2013 13:23:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20123#M43706</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2013-05-07T13:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time selector to dashboard panel on dbx query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20124#M43707</link>
      <description>&lt;P&gt;Cool, glad to be of help.  Sorry for the confusion with the capitalization.  It looks right when I edit the text above, but then goes to all lower case when I come back to review the page.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2013 13:33:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Adding-time-selector-to-dashboard-panel-on-dbx-query/m-p/20124#M43707</guid>
      <dc:creator>jjdorn</dc:creator>
      <dc:date>2013-05-07T13:33:49Z</dc:date>
    </item>
  </channel>
</rss>

