<?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 Timerange preset not changing. in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Timerange-preset-not-changing/m-p/144924#M8773</link>
    <description>&lt;P&gt;I have created a time range picker in javascript with django bindings and it is rendering fine on the page except that it doesn't update with the preset value i have selected at start. It defaults to "all time" which  causes my panels to load very slowly as there is a lot of data on the indexes.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var globaltimerange = new TimeRangeView({
    id: "global-timerange",
    preset: "Today",
    el: $("#globaltimerangeview")
}).render();
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Has anyone else experienced this?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Feb 2015 11:07:11 GMT</pubDate>
    <dc:creator>cchitten</dc:creator>
    <dc:date>2015-02-16T11:07:11Z</dc:date>
    <item>
      <title>Timerange preset not changing.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Timerange-preset-not-changing/m-p/144924#M8773</link>
      <description>&lt;P&gt;I have created a time range picker in javascript with django bindings and it is rendering fine on the page except that it doesn't update with the preset value i have selected at start. It defaults to "all time" which  causes my panels to load very slowly as there is a lot of data on the indexes.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var globaltimerange = new TimeRangeView({
    id: "global-timerange",
    preset: "Today",
    el: $("#globaltimerangeview")
}).render();
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Has anyone else experienced this?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Feb 2015 11:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Timerange-preset-not-changing/m-p/144924#M8773</guid>
      <dc:creator>cchitten</dc:creator>
      <dc:date>2015-02-16T11:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Timerange preset not changing.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Timerange-preset-not-changing/m-p/144925#M8774</link>
      <description>&lt;P&gt;It should work. I don't know how you are handling your code, but i think you are surely making errors on it.  Bellow is a basic example that can help you. Just test it, it is working very well.&lt;BR /&gt;
&lt;STRONG&gt;timerangePreset.html&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{% extends 'splunkdj:base_with_app_bar.html' %}

{% load splunkmvc %}

{% block title %}Splunk views (JavaScript){% endblock title %}

{% block css %}
&amp;lt;link rel="stylesheet" type="text/css" href="{{STATIC_URL}}{{app_name}}/custom.css" /&amp;gt;
&amp;lt;link rel="stylesheet" type="text/css" href="{{STATIC_URL}}splunkjs/css/dashboard.css" /&amp;gt;
{% endblock css %}

{% block content %}
&amp;lt;div class="dashboard-body container-fluid main-section-body"&amp;gt;
    &amp;lt;div class="row"&amp;gt;
        &amp;lt;div class="dashboard-header clearfix"&amp;gt;
            &amp;lt;p&amp;gt;This example shows how to set up a timerange using JavaScript. Tokens are used to keep the search controls in sync with the search manager.&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;!-- Row --&amp;gt;
    &amp;lt;div class="dashboard-row"&amp;gt;

        &amp;lt;div class="dashboard-cell" style="width: 20%;"&amp;gt;
            &amp;lt;div class="dashboard-panel"&amp;gt;
                &amp;lt;div class="dashboard-element"&amp;gt;
                    &amp;lt;div class="panel-head"&amp;gt;
                        &amp;lt;h3&amp;gt;TimeRange&amp;lt;/h3&amp;gt;
                    &amp;lt;/div&amp;gt;
                    &amp;lt;div class="panel-body"&amp;gt;
                        &amp;lt;div id="mytimerangeview"&amp;gt;&amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;


    &amp;lt;!-- Row --&amp;gt;
    &amp;lt;div class="dashboard-row"&amp;gt;
        &amp;lt;div class="dashboard-cell" style="width: 100%;"&amp;gt;
            &amp;lt;div class="dashboard-panel"&amp;gt;
                &amp;lt;div class="dashboard-element"&amp;gt;
                    &amp;lt;div class="panel-head"&amp;gt;
                        &amp;lt;h3&amp;gt;Table&amp;lt;/h3&amp;gt;
                    &amp;lt;/div&amp;gt;
                    &amp;lt;div class="panel-body"&amp;gt;
                        &amp;lt;div id="mytable"&amp;gt;&amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;!-- Row --&amp;gt;
    &amp;lt;div class="dashboard-row"&amp;gt;
        &amp;lt;div class="dashboard-cell" style="width: 100%;"&amp;gt;
            &amp;lt;div class="dashboard-panel"&amp;gt;
                &amp;lt;div class="dashboard-element"&amp;gt;
                    &amp;lt;div class="panel-head"&amp;gt;
                        &amp;lt;h3&amp;gt;Chart&amp;lt;/h3&amp;gt;
                    &amp;lt;/div&amp;gt;
                    &amp;lt;div class="panel-body"&amp;gt;
                        &amp;lt;div id="mychart"&amp;gt;&amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

&amp;lt;/div&amp;gt;
{% endblock content %}

{% block js %}
&amp;lt;script&amp;gt;
    var deps = [
        "splunkjs/ready!",
        "splunkjs/mvc/searchmanager",
        "splunkjs/mvc/chartview",
        "splunkjs/mvc/tableview",
        "splunkjs/mvc/timerangeview"
    ];
    require(deps, function(mvc) {
        // Load individual components
        var SearchManager = require("splunkjs/mvc/searchmanager");
        var ChartView = require("splunkjs/mvc/chartview");
        var TableView = require("splunkjs/mvc/tableview");
        var TimeRangeView = require("splunkjs/mvc/timerangeview");

        // Create a stats search for chart ant Table examples
        var mysearch = new SearchManager({
            id: "example-search",
            search: "index=_internal | head 1000 | stats count by sourcetype",
            preview: true,
            cache: true
        });


        // Create views


         // Instantiate a view using the default time range picker
        var mytimerange = new TimeRangeView({
            id: "example-timerange",
            managerid: "example-search",
            preset: "Today",
            el: $("#mytimerangeview")
        }).render();

        // Update the search manager when the time range changes
        mytimerange.on("change", function() {
            mysearch.settings.set(mytimerange.val());
        });

        var table1 = new TableView({
            id:"example-table",
            managerid: "example-search",
            el: $("#mytable")
        }).render();

        var chart1 = new ChartView({
            id:"example-chart",
            managerid: "example-search",
            type: "bar",
            el: $("#mychart")
        }).render();


    });
&amp;lt;/script&amp;gt;
{% endblock js %}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Mar 2015 10:41:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Timerange-preset-not-changing/m-p/144925#M8774</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-03-23T10:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Timerange preset not changing.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Timerange-preset-not-changing/m-p/144926#M8775</link>
      <description>&lt;P&gt;I found out that it was an issue in the current release of splunk (found some other mentions of the problem)&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/179865/why-is-the-time-range-preset-in-web-framework-view.html"&gt;http://answers.splunk.com/answers/179865/why-is-the-time-range-preset-in-web-framework-view.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 10:47:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Timerange-preset-not-changing/m-p/144926#M8775</guid>
      <dc:creator>cchitten</dc:creator>
      <dc:date>2015-03-23T10:47:24Z</dc:date>
    </item>
  </channel>
</rss>

