<?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: Splunk Web framework: 'searchmanager' received some positional argument(s) after some keyword argument(s) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193060#M55545</link>
    <description>&lt;P&gt;It's weird - I never managed to get JavaScript to work, even following the advice of @alacercogitatus and comparing my code with various examples (including those that worked for me in other templates in the same application!). So I switched to Django bindings like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{% block managers %}
    {% searchmanager id="test-rt-search"  
        search="index=_internal sourcetype=splunkd | eval msg_len=if(isnull(message), 0, len(message)) | fields component,eventtype,host,msg_len"
        earliest_time="rt-5m"
        latest_time="rt"
        preview=True
    %} 
{% endblock managers %}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and this (inside JavaScript):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var mySearchManager = mvc.Components.get("test-rt-search");
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and it started working! I'm still not sure what I did wrong, though...&lt;/P&gt;</description>
    <pubDate>Tue, 25 Aug 2015 19:09:16 GMT</pubDate>
    <dc:creator>arkadyz1</dc:creator>
    <dc:date>2015-08-25T19:09:16Z</dc:date>
    <item>
      <title>Splunk Web framework: 'searchmanager' received some positional argument(s) after some keyword argument(s)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193057#M55542</link>
      <description>&lt;P&gt;I'm getting the above error message ( &lt;CODE&gt;'searchmanager' received some positional argument(s) after some keyword argument(s)&lt;/CODE&gt;) with the JavaScript code containing this (I'm experimenting with real-time searches in Splunk Web now):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        var SearchManager = require("splunkjs/mvc/searchmanager");
        var mySearchManager = new SearchManager(
            id: "test-rt-search",
            search: "index=_internal sourcetype=splunkd | eval msg_len=if(isnull(message), 0, len(message)) | fields component,eventtype,host,msg_len",
            preview: true,
            cache: false,
            "earliest_time": "rt-5m",
            "latest_time": "rt"
        );
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried to shuffle the members to no avail. Is there any specification on which members should go first?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 17:46:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193057#M55542</guid>
      <dc:creator>arkadyz1</dc:creator>
      <dc:date>2015-08-25T17:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Web framework: 'searchmanager' received some positional argument(s) after some keyword argument(s)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193058#M55543</link>
      <description>&lt;P&gt;There is no order, but don't mix quoted and non-quoted options. Also, Make sure you are sending over an object.&lt;BR /&gt;
So your code should be this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var mySearchManager = new SearchManager( {
         "id": "test-rt-search",
         "search" : "index=_internal sourcetype=splunkd | eval msg_len=if(isnull(message), 0, len(message)) | fields component,eventtype,host,msg_len",
         "preview": true,
         "cache": false,
         "earliest_time": "rt-5m",
         "latest_time": "rt"
     } );
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The documentation for SearchManager can be found here: &lt;A href="http://docs.splunk.com/DocumentationStatic/WebFramework/1.1/compref_searchmanager.html"&gt;http://docs.splunk.com/DocumentationStatic/WebFramework/1.1/compref_searchmanager.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 18:17:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193058#M55543</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2015-08-25T18:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Web framework: 'searchmanager' received some positional argument(s) after some keyword argument(s)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193059#M55544</link>
      <description>&lt;P&gt;Thanks for the answer. I fixed the code the way you suggested (adding curly braces around the members and putting quotes around the names) - unfortunately, it still fails with the same error. Anything in &lt;CODE&gt;django_error.log&lt;/CODE&gt; which could help me pinpoint the problem?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 18:35:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193059#M55544</guid>
      <dc:creator>arkadyz1</dc:creator>
      <dc:date>2015-08-25T18:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Web framework: 'searchmanager' received some positional argument(s) after some keyword argument(s)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193060#M55545</link>
      <description>&lt;P&gt;It's weird - I never managed to get JavaScript to work, even following the advice of @alacercogitatus and comparing my code with various examples (including those that worked for me in other templates in the same application!). So I switched to Django bindings like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{% block managers %}
    {% searchmanager id="test-rt-search"  
        search="index=_internal sourcetype=splunkd | eval msg_len=if(isnull(message), 0, len(message)) | fields component,eventtype,host,msg_len"
        earliest_time="rt-5m"
        latest_time="rt"
        preview=True
    %} 
{% endblock managers %}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and this (inside JavaScript):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var mySearchManager = mvc.Components.get("test-rt-search");
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and it started working! I'm still not sure what I did wrong, though...&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 19:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193060#M55545</guid>
      <dc:creator>arkadyz1</dc:creator>
      <dc:date>2015-08-25T19:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Web framework: 'searchmanager' received some positional argument(s) after some keyword argument(s)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193061#M55546</link>
      <description>&lt;P&gt;Wait - Are you using an HTML Dashboard, or the Django Web Framework?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 19:14:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193061#M55546</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2015-08-25T19:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Web framework: 'searchmanager' received some positional argument(s) after some keyword argument(s)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193062#M55547</link>
      <description>&lt;P&gt;Django Web Framework.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 19:18:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193062#M55547</guid>
      <dc:creator>arkadyz1</dc:creator>
      <dc:date>2015-08-25T19:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Web framework: 'searchmanager' received some positional argument(s) after some keyword argument(s)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193063#M55548</link>
      <description>&lt;P&gt;If you are using Splunk 6, you should start converting your Django dashboards into HTML/Simple XML. Django will be deprecated in the near future, so better to start now.&lt;/P&gt;

&lt;P&gt;This is relevant: &lt;A href="http://dev.splunk.com/view/SP-CAAAENJ"&gt;http://dev.splunk.com/view/SP-CAAAENJ&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This javascript will work in an HTML Dashboard.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 19:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Web-framework-searchmanager-received-some-positional/m-p/193063#M55548</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2015-08-25T19:31:37Z</dc:date>
    </item>
  </channel>
</rss>

