<?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: splunk6 custom HTML visualization not updating if form input changes in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127214#M7526</link>
    <description>&lt;P&gt;Are you aware that your "value": "| script... doesn't have a closing quotation mark?  Could that be the problem, or is it just a copy/paste artifact?&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2013 23:47:15 GMT</pubDate>
    <dc:creator>yplambert</dc:creator>
    <dc:date>2013-12-19T23:47:15Z</dc:date>
    <item>
      <title>splunk6 custom HTML visualization not updating if form input changes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127211#M7523</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I've written a custom view in Splunk6 that shows me search results as plain HTML content.&lt;BR /&gt;
The simple xml view works and shows my html content when the page loads. But if I try to use form inputs such as a dropdown, the view doesn't update when I hit the submit button.&lt;/P&gt;

&lt;P&gt;I've basically copy/pasted the examples from Splunk6 custom visualization examples, the code looks as follows:&lt;/P&gt;

&lt;P&gt;following code gives me a dropdown with a list of splunk apps:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fieldset autoRun="true"&amp;gt;
   &amp;lt;input type="dropdown" token="app_name" searchWhenChanged="false"&amp;gt;
     &amp;lt;label&amp;gt;Select an App:&amp;lt;/label&amp;gt;
       &amp;lt;populatingSearch fieldForValue="app" fieldForLabel="app"&amp;gt;
         &amp;lt;![CDATA[ | script python splunksvn -v ]]&amp;gt;
       &amp;lt;/populatingSearch&amp;gt;
   &amp;lt;/input&amp;gt;
[...]
&amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;following code integrates my custom visualization:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [...]
    &amp;lt;html&amp;gt;
        &amp;lt;h2&amp;gt;local svn diff&amp;lt;/h2&amp;gt;
        &amp;lt;div id="htmlcontent-diffsearch"
             class="splunk-manager splunk-searchmanager "
             data-require="splunkjs/mvc/searchmanager"
             data-options='{
                    "app": "subversion",
                    "preview": true,
                    "search": { "type": "token_safe", "value": "| script python splunksvn -c $app_name$}
                }'&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div id="htmlcontent-diff"
             class="splunk-view"
             data-require="app/subversion/components/htmlcontent/htmlcontent"
             data-options='{
                    "managerid": "htmlcontent-diffsearch"
                 }'&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/html&amp;gt;
    [...]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In my htmlcontent.js file I've basically just implemented the "updateView" function:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [...]
    updateView: function(viz, data) {
        var myResults = data[0];  // Sets this to the first (and only) row
        this.$el.html(myResults);
    }
    [...]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I suspect that the "html" element in simple xml doesn't know anything about the submit action. But how can I tell my view to update?&lt;/P&gt;

&lt;P&gt;Kind regards&lt;BR /&gt;
mathu&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2013 08:12:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127211#M7523</guid>
      <dc:creator>mathu</dc:creator>
      <dc:date>2013-11-04T08:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: splunk6 custom HTML visualization not updating if form input changes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127212#M7524</link>
      <description>&lt;P&gt;.. by the way, the code works with all ohter elements (such as table, chart, single). "html" seems to be the only element not reacting on form changes&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2013 09:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127212#M7524</guid>
      <dc:creator>mathu</dc:creator>
      <dc:date>2013-11-04T09:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: splunk6 custom HTML visualization not updating if form input changes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127213#M7525</link>
      <description>&lt;P&gt;Using double dollar signs for the token in the search string helped...&lt;/P&gt;

&lt;P&gt;changing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"search": { "type": "token_safe", "value": "| script python splunksvn -c $app_name$ }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"search": { "type": "token_safe", "value": "| script python splunksvn -c $$app_name$$ }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:47:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127213#M7525</guid>
      <dc:creator>mathu</dc:creator>
      <dc:date>2013-11-04T12:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: splunk6 custom HTML visualization not updating if form input changes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127214#M7526</link>
      <description>&lt;P&gt;Are you aware that your "value": "| script... doesn't have a closing quotation mark?  Could that be the problem, or is it just a copy/paste artifact?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 23:47:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127214#M7526</guid>
      <dc:creator>yplambert</dc:creator>
      <dc:date>2013-12-19T23:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: splunk6 custom HTML visualization not updating if form input changes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127215#M7527</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thanks, this  worked for me.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2014 14:56:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127215#M7527</guid>
      <dc:creator>ppohar</dc:creator>
      <dc:date>2014-10-31T14:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: splunk6 custom HTML visualization not updating if form input changes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127216#M7528</link>
      <description>&lt;P&gt;This worked for me thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2015 19:23:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127216#M7528</guid>
      <dc:creator>MattZerfas</dc:creator>
      <dc:date>2015-03-24T19:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: splunk6 custom HTML visualization not updating if form input changes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127217#M7529</link>
      <description>&lt;P&gt;I do have the same issue (my impression) as the question asker and when i try this trick with the double $ then i will never ever get a result :-=)&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:00:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunk6-custom-HTML-visualization-not-updating-if-form-input/m-p/127217#M7529</guid>
      <dc:creator>dominiquevocat</dc:creator>
      <dc:date>2015-10-28T14:00:17Z</dc:date>
    </item>
  </channel>
</rss>

