<?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: using custom JS rendering scripts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/using-custom-JS-rendering-scripts/m-p/145061#M185121</link>
    <description>&lt;P&gt;Just in case anyone was wondering it was my lack of CSS knowledge that was the problem. Once I defined additional selector IDs to match the table IDs it worked fine. &lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2014 22:06:13 GMT</pubDate>
    <dc:creator>yong_ly</dc:creator>
    <dc:date>2014-02-26T22:06:13Z</dc:date>
    <item>
      <title>using custom JS rendering scripts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-custom-JS-rendering-scripts/m-p/145060#M185120</link>
      <description>&lt;P&gt;I'm having a bit of a problem with using JS scripts in my dashboard panels. I've been using the Simple XML examples and they work great. For example the table_row_highlighting.js file is great but it only works for one table where as I would like to have it for multiple tables. &lt;/P&gt;

&lt;P&gt;I figured I could just copy it into a file nagios_highlight.js and change the table ID and it would work fine but that doesn't seem to be the case. &lt;/P&gt;

&lt;P&gt;I've placed in the $SPLUNK_HOME/etc/apps/myapp/appserver/static folder, added the script name to my dashboard xml, added the new id to a different table and restarted the splunk instance but it's not working. Am I putting it in the wrong place or do I need to register the js file somewhere else?? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="nagios_highlight.js" stylesheet="application.css"&amp;gt;
...
  &amp;lt;row&amp;gt;
    &amp;lt;table id="nagios_highlight"&amp;gt;
      &amp;lt;title&amp;gt;Status Dashboard&amp;lt;/title&amp;gt;
      &amp;lt;searchString&amp;gt;sourcetype=nagios_status servicestatus | sort by _time DESC | dedup host_name, service_description | eval last_check=strftime(last_check,"%d/%m/%y %H:%M:%S") | eval event_duration=tostring(now()-last_state_change,"duration") | rename problem_has_been_acknowledged as acknowledged |  table _time, host_name, service_description, plugin_output, current_state, last_check, event_duration, acknowledged&amp;lt;/searchString&amp;gt;
      &amp;lt;earliestTime&amp;gt;-10m&amp;lt;/earliestTime&amp;gt;
      &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
      &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
      &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
      &amp;lt;option name="count"&amp;gt;50&amp;lt;/option&amp;gt;
    &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can't seem to figure this one out. From the page source it seems to load the .js file but the rows don't get highlighted.. any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:51:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-custom-JS-rendering-scripts/m-p/145060#M185120</guid>
      <dc:creator>yong_ly</dc:creator>
      <dc:date>2020-09-28T15:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: using custom JS rendering scripts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-custom-JS-rendering-scripts/m-p/145061#M185121</link>
      <description>&lt;P&gt;Just in case anyone was wondering it was my lack of CSS knowledge that was the problem. Once I defined additional selector IDs to match the table IDs it worked fine. &lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2014 22:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-custom-JS-rendering-scripts/m-p/145061#M185121</guid>
      <dc:creator>yong_ly</dc:creator>
      <dc:date>2014-02-26T22:06:13Z</dc:date>
    </item>
  </channel>
</rss>

