<?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 bundle and reference jquery-ui library in Splunk in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-bundle-and-reference-jquery-ui-library-in-Splunk/m-p/293996#M3707</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;If you need to refer to the local library in splunk means,&lt;BR /&gt;
1. U need to keep the  library file at {splunk_path}/etc/apps/{your app name}/appserver/static/&lt;BR /&gt;
2. Give reference of this library as a url path of your app like:  &lt;CODE&gt;https://localhost:{port_no}/en-GB/static/app/{your app name}/&lt;/CODE&gt;&lt;BR /&gt;
3. Include js file like &lt;CODE&gt;&amp;lt;script type="text/javascript" src="https://localhost:{port_no}/en-GB/static/app/{app_name}/file_name.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
I think this will help you.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:36:34 GMT</pubDate>
    <dc:creator>sumangala</dc:creator>
    <dc:date>2020-09-29T15:36:34Z</dc:date>
    <item>
      <title>How to bundle and reference jquery-ui library in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-bundle-and-reference-jquery-ui-library-in-Splunk/m-p/293995#M3706</link>
      <description>&lt;P&gt;I am trying to figure out how to load the jquery-ui library into my splunk app and reference it in my Splunk dashboard html. I am not trying to make a call to the jquery site to reference their code - I need to refer to it locally as I cannot make external calls from my server. I downloaded the zip jquery-ui, and I have unzipeed into /appserver/static folder.&lt;/P&gt;

&lt;P&gt;I am pointing to the jquery-ui code in my dashboard html like such: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&amp;gt;
    &amp;lt;title&amp;gt;Correlation Overview Clone_new_test HTML&amp;lt;/title&amp;gt;
    &amp;lt;link rel="shortcut icon" href="/en-US/static/@4423A06D4EA5E64AEACE49570D027CE8170238F078939E98BA42D5F5CC20FDC4.103/img/favicon.ico" /&amp;gt;
    &amp;lt;link rel="stylesheet" type="text/css" href="{{SPLUNKWEB_URL_PREFIX}}/static/build/css/bootstrap-enterprise.css" /&amp;gt;
    &amp;lt;link rel="stylesheet" type="text/css" href="{{SPLUNKWEB_URL_PREFIX}}/static/css/build/pages/dashboard-simple-bootstrap.min.css" /&amp;gt;
    &amp;lt;link rel="stylesheet" type="text/css" href="jquery-ui-1.12.1/jquery-ui.min.css" /&amp;gt;
    &amp;lt;!--Or should it be: &amp;lt;link rel="stylesheet" type="text/css" href="appserver/static/jquery-ui-1.12.1/jquery-ui.css" /&amp;gt; --&amp;gt;
    &amp;lt;style&amp;gt;
        #accordionpanel { 
            background-color: inherit;
        }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have also pointed to my library here as well:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require.config({
    waitSeconds: 0, // Disable require.js load timeout
    // For this tutorial, download third-party libraries over the internet. 
    // In practice, it is recommended that you bundle dependencies with your app.
    paths: {
        'jquery-ui': 'jquery-ui.min'
    },
    shim: {
        'jquery-ui': {
            deps: ['jquery']
        }
    }
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the following errors in my browser console:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;GET &lt;A href="https://------------:&amp;lt;port&amp;gt;/en-US/app/&amp;lt;blahh" target="test_blank"&gt;https://------------:&amp;lt;port&amp;gt;/en-US/app/&amp;lt;blahh&lt;/A&gt; ballh&amp;gt;/jquery-ui-1.12.1/jquery-ui.min.css 500 (Internal Server Error)
VM98:1903 GET &lt;A href="https://-----------:&amp;lt;port&amp;gt;/en-US/static/@59c8927def0f.103/js/jquery-ui.min.js" target="test_blank"&gt;https://-----------:&amp;lt;port&amp;gt;/en-US/static/@59c8927def0f.103/js/jquery-ui.min.js&lt;/A&gt; 
req.load @ VM98:1903
load @ VM98:1647
load @ VM98:828
(anonymous) @ VM98:814
(anonymous) @ VM98:132
execCb @ VM98:1658
check @ VM98:874
enable @ VM98:1151
init @ VM98:782
(anonymous) @ VM98:1424
VM98:166 Uncaught Error: Script error for: jquery-ui
&lt;A href="http://requirejs.org/docs/errors.html#scripterror" target="test_blank"&gt;http://requirejs.org/docs/errors.html#scripterror&lt;/A&gt;
    at makeError (eval at module.exports (index.js:1), &amp;lt;anonymous&amp;gt;:166:17)
    at HTMLScriptElement.onScriptError (eval at module.exports (index.js:1), &amp;lt;anonymous&amp;gt;:1689:36)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any ideas on the error I am making when referencing the bundled jquery-ui library locally?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 19:08:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-bundle-and-reference-jquery-ui-library-in-Splunk/m-p/293995#M3706</guid>
      <dc:creator>jzapantis</dc:creator>
      <dc:date>2017-03-24T19:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to bundle and reference jquery-ui library in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-bundle-and-reference-jquery-ui-library-in-Splunk/m-p/293996#M3707</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;If you need to refer to the local library in splunk means,&lt;BR /&gt;
1. U need to keep the  library file at {splunk_path}/etc/apps/{your app name}/appserver/static/&lt;BR /&gt;
2. Give reference of this library as a url path of your app like:  &lt;CODE&gt;https://localhost:{port_no}/en-GB/static/app/{your app name}/&lt;/CODE&gt;&lt;BR /&gt;
3. Include js file like &lt;CODE&gt;&amp;lt;script type="text/javascript" src="https://localhost:{port_no}/en-GB/static/app/{app_name}/file_name.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
I think this will help you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-bundle-and-reference-jquery-ui-library-in-Splunk/m-p/293996#M3707</guid>
      <dc:creator>sumangala</dc:creator>
      <dc:date>2020-09-29T15:36:34Z</dc:date>
    </item>
  </channel>
</rss>

