<?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 How token namespaces and initialize tokens help with executing searches in html dashboard? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-token-namespaces-and-initialize-tokens-help-with-executing/m-p/127557#M7556</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;
 I have converted the simple xml dashboard (with form inputs and panel) to html where we can find the code such as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;// Create token namespaces
    var urlTokenModel = new UrlTokenModel();
    mvc.Components.registerInstance('url', urlTokenModel);
    var defaultTokenModel = mvc.Components.getInstance('default', {create: true});
    var submittedTokenModel = mvc.Components.getInstance('submitted', {create: true});

    urlTokenModel.on('url:navigate', function() {
        defaultTokenModel.set(urlTokenModel.toJSON());
        if (!_.isEmpty(urlTokenModel.toJSON()) &amp;amp;&amp;amp; !_.all(urlTokenModel.toJSON(), _.isUndefined)) {
            submitTokens();
        } else {
            submittedTokenModel.clear();
        }
    });

    // Initialize tokens
    defaultTokenModel.set(urlTokenModel.toJSON());

    var defaultUpdate = {};

    var submitTokens = function() {
        submitTokensSoon(pageLoading);
    };

    var submitTokensSoon = _.debounce(function(replaceState) {
        submittedTokenModel.set(defaultTokenModel.toJSON());
        urlTokenModel.saveOnlyWithPrefix('form\\.', defaultTokenModel.toJSON(), {
            replaceState: replaceState
        });
    });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have searched in Splunk documentation for the detailed description of each statement, but I cant find any information. Can someone provide a detailed description of each statement and how it helps in executing searches with token values inputs?&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jul 2014 20:39:47 GMT</pubDate>
    <dc:creator>Mubarish</dc:creator>
    <dc:date>2014-07-01T20:39:47Z</dc:date>
    <item>
      <title>How token namespaces and initialize tokens help with executing searches in html dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-token-namespaces-and-initialize-tokens-help-with-executing/m-p/127557#M7556</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
 I have converted the simple xml dashboard (with form inputs and panel) to html where we can find the code such as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;// Create token namespaces
    var urlTokenModel = new UrlTokenModel();
    mvc.Components.registerInstance('url', urlTokenModel);
    var defaultTokenModel = mvc.Components.getInstance('default', {create: true});
    var submittedTokenModel = mvc.Components.getInstance('submitted', {create: true});

    urlTokenModel.on('url:navigate', function() {
        defaultTokenModel.set(urlTokenModel.toJSON());
        if (!_.isEmpty(urlTokenModel.toJSON()) &amp;amp;&amp;amp; !_.all(urlTokenModel.toJSON(), _.isUndefined)) {
            submitTokens();
        } else {
            submittedTokenModel.clear();
        }
    });

    // Initialize tokens
    defaultTokenModel.set(urlTokenModel.toJSON());

    var defaultUpdate = {};

    var submitTokens = function() {
        submitTokensSoon(pageLoading);
    };

    var submitTokensSoon = _.debounce(function(replaceState) {
        submittedTokenModel.set(defaultTokenModel.toJSON());
        urlTokenModel.saveOnlyWithPrefix('form\\.', defaultTokenModel.toJSON(), {
            replaceState: replaceState
        });
    });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have searched in Splunk documentation for the detailed description of each statement, but I cant find any information. Can someone provide a detailed description of each statement and how it helps in executing searches with token values inputs?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2014 20:39:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-token-namespaces-and-initialize-tokens-help-with-executing/m-p/127557#M7556</guid>
      <dc:creator>Mubarish</dc:creator>
      <dc:date>2014-07-01T20:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: How token namespaces and initialize tokens help with executing searches in html dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-token-namespaces-and-initialize-tokens-help-with-executing/m-p/127558#M7557</link>
      <description>&lt;P&gt;The documentation mostly covers the way you can use tokens in the Web Framework, but there are a few topics that address how converted HTML dashboards use tokens, and how that token model works:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/SP-CAAAETK#section4"&gt;Walkthrough of the HTML Dashboard Code (TOKENS section)&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/SP-CAAAEW2"&gt;Token Models&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 21:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-token-namespaces-and-initialize-tokens-help-with-executing/m-p/127558#M7557</guid>
      <dc:creator>apruneda_splunk</dc:creator>
      <dc:date>2014-07-02T21:03:53Z</dc:date>
    </item>
  </channel>
</rss>

