<?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 Splunk app include js fail in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309574#M19754</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;I was creating my Splunk application. My folder structure is this one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;drwxrwxr-x 3 user user 4096 Feb 17 15:19 appserver/
drwxrwxrwx 2 user user 4096 Feb 16 17:29 bin/
drwxrwxrwx 3 user user 4096 Feb 17 14:02 default/
drwx------ 2 root root 4096 Feb 17 14:39 local/
drwxrwxrwx 2 root root 4096 Feb 17 11:04 lookups/
drwxrwxrwx 2 user user 4096 Feb 17 15:01 metadata/
drwxrwxr-x 2 user user 4096 Feb 17 15:30 static/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've a script in appserver/static/home.js&lt;BR /&gt;
I've an html script in  default/data/ui/html/home.html&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
   ........
&amp;lt;/head&amp;gt;
&amp;lt;body class="simplexml preload locale-en" data-splunk-version="6.5.2" data-splunk-product="enterprise"&amp;gt;
&amp;lt;!-- 
BEGIN LAYOUT
This section contains the layout for the dashboard. Splunk uses proprietary
styles in &amp;lt;div&amp;gt; tags, similar to Bootstrap's grid system. 
--&amp;gt;
&amp;lt;header&amp;gt;
    .....
&amp;lt;/header&amp;gt;
&amp;lt;div class="dashboard-body container-fluid main-section-body" data-role="main"&amp;gt;
....
&amp;lt;/div&amp;gt;

&amp;lt;script src="/static/home.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried to incude home.js n different way:&lt;/P&gt;

&lt;H2&gt;-  &lt;/H2&gt;

&lt;UL&gt;
&lt;LI&gt; &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;But, looking at the chrome console,  I've a 404 error &lt;/P&gt;

&lt;P&gt;Also every time that I modify the .html I call &lt;A href="http://localhost:8000/en-US/debug/refresh"&gt;http://localhost:8000/en-US/debug/refresh&lt;/A&gt;&lt;BR /&gt;
What I'm doing wrong?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2017 14:57:19 GMT</pubDate>
    <dc:creator>faustf</dc:creator>
    <dc:date>2017-02-17T14:57:19Z</dc:date>
    <item>
      <title>Splunk app include js fail</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309574#M19754</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;I was creating my Splunk application. My folder structure is this one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;drwxrwxr-x 3 user user 4096 Feb 17 15:19 appserver/
drwxrwxrwx 2 user user 4096 Feb 16 17:29 bin/
drwxrwxrwx 3 user user 4096 Feb 17 14:02 default/
drwx------ 2 root root 4096 Feb 17 14:39 local/
drwxrwxrwx 2 root root 4096 Feb 17 11:04 lookups/
drwxrwxrwx 2 user user 4096 Feb 17 15:01 metadata/
drwxrwxr-x 2 user user 4096 Feb 17 15:30 static/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've a script in appserver/static/home.js&lt;BR /&gt;
I've an html script in  default/data/ui/html/home.html&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
   ........
&amp;lt;/head&amp;gt;
&amp;lt;body class="simplexml preload locale-en" data-splunk-version="6.5.2" data-splunk-product="enterprise"&amp;gt;
&amp;lt;!-- 
BEGIN LAYOUT
This section contains the layout for the dashboard. Splunk uses proprietary
styles in &amp;lt;div&amp;gt; tags, similar to Bootstrap's grid system. 
--&amp;gt;
&amp;lt;header&amp;gt;
    .....
&amp;lt;/header&amp;gt;
&amp;lt;div class="dashboard-body container-fluid main-section-body" data-role="main"&amp;gt;
....
&amp;lt;/div&amp;gt;

&amp;lt;script src="/static/home.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried to incude home.js n different way:&lt;/P&gt;

&lt;H2&gt;-  &lt;/H2&gt;

&lt;UL&gt;
&lt;LI&gt; &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;But, looking at the chrome console,  I've a 404 error &lt;/P&gt;

&lt;P&gt;Also every time that I modify the .html I call &lt;A href="http://localhost:8000/en-US/debug/refresh"&gt;http://localhost:8000/en-US/debug/refresh&lt;/A&gt;&lt;BR /&gt;
What I'm doing wrong?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 14:57:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309574#M19754</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-17T14:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk app include js fail</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309575#M19755</link>
      <description>&lt;P&gt;I tried also:&lt;BR /&gt;
- home.js&lt;BR /&gt;
- /home.js&lt;BR /&gt;
- /static/home.js&lt;BR /&gt;
- static/home.js&lt;/P&gt;

&lt;P&gt;What should be the right way to include the script?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309575#M19755</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-17T15:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk app include js fail</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309576#M19756</link>
      <description>&lt;P&gt;Try updating the &lt;CODE&gt;script&lt;/CODE&gt; statement to one of the following where you need to put in your apps name.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;script src="/static/app/&amp;lt;YOUR_APP_NAME&amp;gt;/home.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;script src="{{SPLUNKWEB_URL_PREFIX}}/static/app/&amp;lt;YOUR_APP_NAME&amp;gt;/home.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:09:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309576#M19756</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-02-17T15:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk app include js fail</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309577#M19757</link>
      <description>&lt;P&gt;Perfect. It worked.&lt;BR /&gt;
I used: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;script src="/static/app/&amp;lt;YOUR_APP_NAME&amp;gt;/home.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:20:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-app-include-js-fail/m-p/309577#M19757</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-17T15:20:57Z</dc:date>
    </item>
  </channel>
</rss>

