<?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: Issue with simple HTML dashboard customization in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119210#M6929</link>
    <description>&lt;P&gt;There is an example for how to do this in the "Splunk 6 Dashboard Examples" app.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://apps.splunk.com/app/1603/"&gt;http://apps.splunk.com/app/1603/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Note that this example is written in Simple XML, using custom js and css extensions.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Apr 2014 14:57:45 GMT</pubDate>
    <dc:creator>nfilippi_splunk</dc:creator>
    <dc:date>2014-04-07T14:57:45Z</dc:date>
    <item>
      <title>Issue with simple HTML dashboard customization</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119208#M6927</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;My goal is to change the CSS apply to a row depending on a value a cell, I have find the .js code below which seems work before but not for me.&lt;/P&gt;

&lt;P&gt;To sum up I have :&lt;BR /&gt;
- js and css files located in : $MYSPLUNKDIR/etc/apps/search/appserver/static/application.(js|css)&lt;BR /&gt;
- A HTML dashboard convert from XML by Splunk who normally include the both files&lt;/P&gt;

&lt;P&gt;I have seen that the js and css files are well retrieve by the browser that let me think the code include in the HTML dashboard is OK...&lt;/P&gt;

&lt;P&gt;Maybe the application.js use an old code ?&lt;/P&gt;

&lt;P&gt;If you have some ideas it's very welcom.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Extract of the include in HTML dashboard :&lt;/STRONG&gt; &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;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&amp;gt;
    &amp;lt;title&amp;gt;Alerts Page Clone | Splunk&amp;lt;/title&amp;gt;
    &amp;lt;link rel="shortcut icon" href="{{SPLUNKWEB_URL_PREFIX}}/static/img/favicon.ico" /&amp;gt;
    &amp;lt;link rel="stylesheet" type="text/css" href="{{SPLUNKWEB_URL_PREFIX}}/static/css/bootstrap.min.css" /&amp;gt;
    &amp;lt;link rel="stylesheet" type="text/css" media="all" href="{{SPLUNKWEB_URL_PREFIX}}/static/css/pages/dashboard-simple-bootstrap.min.css" /&amp;gt;
    &amp;lt;link rel="stylesheet" type="text/css" media="all" href="{{SPLUNKWEB_URL_PREFIX}}/static/app/search/dashboard.css" /&amp;gt;
    &amp;lt;!--&amp;lt;link rel="stylesheet" type="text/css" media="all" href="{{SPLUNKWEB_URL_PREFIX}}/static/app/search/application.css" 
[...]
    &amp;lt;script type="text/javascript"  src="/static/app/search/application.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;application.js :&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if ((Splunk.util.getCurrentView() == 'MYDASHBOARD') &amp;amp;&amp;amp; Splunk.Module.SimpleResultsTable) {
    Splunk.Module.SimpleResultsTable = $.klass(Splunk.Module.SimpleResultsTable, {
        onResultsRendered: function($super) {
            var retVal = $super();
            this.myCustomHeatMapDecorator();
            return retVal;
        },
    myCustomHeatMapDecorator: function() {
            $("tr:has(td)", this.container).each(function() {
                var tr = $(this);
                if (tr.find("td:nth-child(3)").text() == "crit") {
                    tr.addClass("severityCritical");
                }
                if (tr.find("td:nth-child(3)").text() == "high" ) {
                    tr.addClass("severityHigh");
                }

            });
        },
    });
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;application.css :&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tr.severityHigh td {
    background-color:#ed2b21 !important;
    color: #fff !important;
    font-weight: bold;
}
tr.severityCritical td {
    background-color:#ed2b21 !important;
    color: #fff !important;
    font-weight: bold;
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Apr 2014 15:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119208#M6927</guid>
      <dc:creator>Micmac</dc:creator>
      <dc:date>2014-04-03T15:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with simple HTML dashboard customization</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119209#M6928</link>
      <description>&lt;P&gt;Nobody has a workaround, another way to do that ?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 13:07:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119209#M6928</guid>
      <dc:creator>Micmac</dc:creator>
      <dc:date>2014-04-07T13:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with simple HTML dashboard customization</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119210#M6929</link>
      <description>&lt;P&gt;There is an example for how to do this in the "Splunk 6 Dashboard Examples" app.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://apps.splunk.com/app/1603/"&gt;http://apps.splunk.com/app/1603/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Note that this example is written in Simple XML, using custom js and css extensions.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 14:57:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119210#M6929</guid>
      <dc:creator>nfilippi_splunk</dc:creator>
      <dc:date>2014-04-07T14:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with simple HTML dashboard customization</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119211#M6930</link>
      <description>&lt;P&gt;Thanks I found the perfect example !&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2014 09:45:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Issue-with-simple-HTML-dashboard-customization/m-p/119211#M6930</guid>
      <dc:creator>Micmac</dc:creator>
      <dc:date>2014-05-05T09:45:45Z</dc:date>
    </item>
  </channel>
</rss>

