<?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 embed JavaScript and CSS within the dashboard or panel? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-embed-JavaScript-and-CSS-within-the-dashboard-or-panel/m-p/248248#M15475</link>
    <description>&lt;P&gt;You can put CSS inline in an  &lt;CODE&gt;html&lt;/CODE&gt; element under a  &lt;CODE&gt;row&lt;/CODE&gt; element like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row depends="hiddenCSS"&amp;gt;
  &amp;lt;html&amp;gt;
    &amp;lt;style&amp;gt; 
      /*insert CSS here, can only reference classes and IDs, no selectors */
    &amp;lt;/style&amp;gt;
  &amp;lt;/html&amp;gt;
&amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You CANNOT embed Javascript inside of a SimpleXML dashboard. It can only be loaded from files like you are doing.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2017 18:21:53 GMT</pubDate>
    <dc:creator>rjthibod</dc:creator>
    <dc:date>2017-07-18T18:21:53Z</dc:date>
    <item>
      <title>How to embed JavaScript and CSS within the dashboard or panel?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-embed-JavaScript-and-CSS-within-the-dashboard-or-panel/m-p/248247#M15474</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a dashboard which with javascript and custom style sheet and I have them in $SPLUNK_HOME/etc/apps//appserver/static/ &lt;/P&gt;

&lt;P&gt;But I want to have that code within the below dashboard code and at the panel level instead of putting the files in /appserver/static/ folder. Can you provide some examples how to put the  javascript code and style sheet code within my panel?  &lt;/P&gt;

&lt;P&gt;Below is my Dashboard code :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="table_cell_highlighting.js" stylesheet="table_cell_highlighting.css"&amp;gt;
  &amp;lt;label&amp;gt;cellcoloring&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="highlight"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;host=abc  source="access.log*"  |stats  perc90(duration) as Duration,perc95(duration) as ninetyfifth by   service_name | sort -count&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help is appreciated !&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 15:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-embed-JavaScript-and-CSS-within-the-dashboard-or-panel/m-p/248247#M15474</guid>
      <dc:creator>garinapavan</dc:creator>
      <dc:date>2016-05-13T15:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to embed JavaScript and CSS within the dashboard or panel?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-embed-JavaScript-and-CSS-within-the-dashboard-or-panel/m-p/248248#M15475</link>
      <description>&lt;P&gt;You can put CSS inline in an  &lt;CODE&gt;html&lt;/CODE&gt; element under a  &lt;CODE&gt;row&lt;/CODE&gt; element like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row depends="hiddenCSS"&amp;gt;
  &amp;lt;html&amp;gt;
    &amp;lt;style&amp;gt; 
      /*insert CSS here, can only reference classes and IDs, no selectors */
    &amp;lt;/style&amp;gt;
  &amp;lt;/html&amp;gt;
&amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You CANNOT embed Javascript inside of a SimpleXML dashboard. It can only be loaded from files like you are doing.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 18:21:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-embed-JavaScript-and-CSS-within-the-dashboard-or-panel/m-p/248248#M15475</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-07-18T18:21:53Z</dc:date>
    </item>
  </channel>
</rss>

