<?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: How to load Javascript &amp; CSS in Splunk to build a dashboard? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129486#M7636</link>
    <description>&lt;P&gt;You'll have to create a place in your app for them, &lt;CODE&gt;appname/appserver/static&lt;/CODE&gt;, and place the files there. Then you edit the Simple XML of your dashboard so that the dashboard tag (or, if your dashboard contains inputs, the form tag) includes a reference to these files, i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="code.js" stylesheet="styles.css"&amp;gt;
  ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As with all newly created files, splunk only picks them up at a start, so you'll have to restart your splunk after you put your files into appserver/static before you can make use of them in XML.&lt;/P&gt;

&lt;P&gt;After that, the usual procedure is to add a div in a html tag which you grab in js and do everything after that there. I'd recommend you just do it to learn how it works, you could start with &lt;A href="http://dev.splunk.com/view/SP-CAAAEMU"&gt;this tutorial&lt;/A&gt; and also follow the how-tos on the right on that page, starting with &lt;A href="http://dev.splunk.com/view/SP-CAAAENJ"&gt;this one&lt;/A&gt;. &lt;/P&gt;</description>
    <pubDate>Mon, 20 Jul 2015 10:14:57 GMT</pubDate>
    <dc:creator>jeffland</dc:creator>
    <dc:date>2015-07-20T10:14:57Z</dc:date>
    <item>
      <title>How to load Javascript &amp; CSS in Splunk to build a dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129485#M7635</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I want to build a TagCLoud dashboard which I know will require the use of Javascript &amp;amp; CSS files for which I have a copy of both from the tutorials.&lt;/P&gt;

&lt;P&gt;I just wondered whether someone may be able to provide just a simple step by step guide how to load both the js and css into Splunk and how I can edit these whilst in Splunk.&lt;/P&gt;

&lt;P&gt;You can probably tell I'm new to Splunk having only had this a couple of weeks, and the Splunk guidance I've read doesn't really help from a beginners perspective.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2015 08:04:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129485#M7635</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-07-20T08:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to load Javascript &amp; CSS in Splunk to build a dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129486#M7636</link>
      <description>&lt;P&gt;You'll have to create a place in your app for them, &lt;CODE&gt;appname/appserver/static&lt;/CODE&gt;, and place the files there. Then you edit the Simple XML of your dashboard so that the dashboard tag (or, if your dashboard contains inputs, the form tag) includes a reference to these files, i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="code.js" stylesheet="styles.css"&amp;gt;
  ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As with all newly created files, splunk only picks them up at a start, so you'll have to restart your splunk after you put your files into appserver/static before you can make use of them in XML.&lt;/P&gt;

&lt;P&gt;After that, the usual procedure is to add a div in a html tag which you grab in js and do everything after that there. I'd recommend you just do it to learn how it works, you could start with &lt;A href="http://dev.splunk.com/view/SP-CAAAEMU"&gt;this tutorial&lt;/A&gt; and also follow the how-tos on the right on that page, starting with &lt;A href="http://dev.splunk.com/view/SP-CAAAENJ"&gt;this one&lt;/A&gt;. &lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2015 10:14:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129486#M7636</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-07-20T10:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to load Javascript &amp; CSS in Splunk to build a dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129487#M7637</link>
      <description>&lt;P&gt;Hi @jeffland, many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2015 10:17:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129487#M7637</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-07-20T10:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to load Javascript &amp; CSS in Splunk to build a dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129488#M7638</link>
      <description>&lt;P&gt;Hi @jeffland do you know if it's possible to create other dirs inside static and place the files there?&lt;BR /&gt;
Instead of the files being at &lt;EM&gt;appname/appserver/static&lt;/EM&gt;, could they be at &lt;EM&gt;appname/appserver/static/xpto/example/file.js&lt;/EM&gt;.&lt;/P&gt;

&lt;P&gt;Thanks in advance,&lt;BR /&gt;
João Amorim&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 11:59:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129488#M7638</guid>
      <dc:creator>joao_amorim</dc:creator>
      <dc:date>2015-11-19T11:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to load Javascript &amp; CSS in Splunk to build a dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129489#M7639</link>
      <description>&lt;P&gt;As far as I know that's not possible with the procedure described in the answer above. But you can certainly place a .js file in that main directory which then loads a number of other files from subfolders with require.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 12:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129489#M7639</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-11-19T12:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to load Javascript &amp; CSS in Splunk to build a dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129490#M7640</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 14:16:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-load-Javascript-CSS-in-Splunk-to-build-a-dashboard/m-p/129490#M7640</guid>
      <dc:creator>joao_amorim</dc:creator>
      <dc:date>2015-11-19T14:16:09Z</dc:date>
    </item>
  </channel>
</rss>

