<?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: splunkJavascript: problem methods in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunkJavascript-problem-methods/m-p/31794#M1359</link>
    <description>&lt;P&gt;Hi Laura - It might be better for us to connect offline. Once you are able to get the Splunk communication and your web-app up and running, I can post the final response on splunk-base. You can simply shoot me an email at &lt;A href="mailto:nluthra@splunk.com"&gt;nluthra@splunk.com&lt;/A&gt;. &lt;/P&gt;</description>
    <pubDate>Tue, 14 Aug 2012 16:48:01 GMT</pubDate>
    <dc:creator>Neeraj_Luthra</dc:creator>
    <dc:date>2012-08-14T16:48:01Z</dc:date>
    <item>
      <title>splunkJavascript: problem methods</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunkJavascript-problem-methods/m-p/31793#M1358</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I try to use the SDK javsacript in my dynamic web project J2EE so I create a proxy servlet and a page .html so the authentification in Splunk works because I don't have the error message alert of this page:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8"&amp;gt;
    &amp;lt;title&amp;gt;How to start a Splunk session&amp;lt;/title&amp;gt;
    &amp;lt;script type="text/javascript" src="scripts/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type="text/javascript" src="scripts/client/splunk.js"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script type="text/javascript" charset="utf-8"&amp;gt;
    function displayApps() {
        var http = new splunkjs.ProxyHttp("servlet/proxy");
        // Create a Service instance and log in 
        var service = new splunkjs.Service(http, {
            username: "admin",
            password: "admin",
            scheme: "https",
            host: "localhost",
            port: "8089"
        });



        // Print installed apps to the console to verify login
         service.apps().fetch(function(err, apps) {
            if (err) {
                alert("Error listing apps");
                return;
            }

         console.log("success connection");

         service.serverInfo(function(err, info) {
         console.log("Splunk Version: ", info.properties().version);
     });
            var myapps = "";
            var appsList = apps.list();

            for(var i = 0; i &amp;lt; appsList.length; i++) {
                myapps += "App " + i + ": " + appsList[i].name + "&amp;lt;br/&amp;gt;"
            } 

            document.getElementById("applist").innerHTML=myapps;
        });

    }
    &amp;lt;/script&amp;gt; 
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;button type="button" onclick="displayApps()"&amp;gt;Log in and list apps&amp;lt;/button&amp;gt;
    &amp;lt;p id="applist"&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I see the message success connection and I can show in my console of firebug all methods can use but I don't able to have version information, list of apps, ...&lt;BR /&gt;
Where can my problem come from?&lt;/P&gt;

&lt;P&gt;Thx by advance,&lt;/P&gt;

&lt;P&gt;Laura&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 12:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunkJavascript-problem-methods/m-p/31793#M1358</guid>
      <dc:creator>LauraBre</dc:creator>
      <dc:date>2012-08-10T12:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: splunkJavascript: problem methods</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunkJavascript-problem-methods/m-p/31794#M1359</link>
      <description>&lt;P&gt;Hi Laura - It might be better for us to connect offline. Once you are able to get the Splunk communication and your web-app up and running, I can post the final response on splunk-base. You can simply shoot me an email at &lt;A href="mailto:nluthra@splunk.com"&gt;nluthra@splunk.com&lt;/A&gt;. &lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2012 16:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunkJavascript-problem-methods/m-p/31794#M1359</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2012-08-14T16:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: splunkJavascript: problem methods</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splunkJavascript-problem-methods/m-p/31795#M1360</link>
      <description>&lt;P&gt;I've met same problem so what did you do for this problem.  can I ask about this problem ?    &lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 11:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splunkJavascript-problem-methods/m-p/31795#M1360</guid>
      <dc:creator>hoyacom</dc:creator>
      <dc:date>2015-04-26T11:50:15Z</dc:date>
    </item>
  </channel>
</rss>

