<?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: color code a result on a table in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104565#M5910</link>
    <description>&lt;P&gt;by now you would have probably guessed my level of expertise in Splunk.. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; Sorry, it seems like I am having you to babysit me through this. But what I am seeing now is a bit bizarre. I got past the 'Loading.' stage after including the SideviewUtils module, but I now get two tables, and one of them seem like a static table with no drill downs, and the other one looks like a normal splunk results table.. what is happening??&lt;/P&gt;

&lt;P&gt;&lt;A href="http://tinypic.com?ref=5dku9f" target="_blank"&gt;&lt;IMG src="http://i50.tinypic.com/5dku9f.jpg" border="0" alt="Image and video hosting by TinyPic" /&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Nov 2012 17:29:07 GMT</pubDate>
    <dc:creator>rajbahak</dc:creator>
    <dc:date>2012-11-01T17:29:07Z</dc:date>
    <item>
      <title>color code a result on a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104559#M5904</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;

&lt;P&gt;Wanted to find out how could I color code a row in a table depending on the results. For example, I have a table showing free disk space of select servers. See below for the screen shots (host names have been erased). I'd like to be able to highlight a row if a 'free' value goes below certain threshold. The purpose is to put this view up for operations team for example, who'd know when a disk on a server is filling up real quick just by looking at the visual alert such as a colored row in red. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://tinypic.com?ref=16iw751" target="_blank"&gt;&lt;IMG src="http://i47.tinypic.com/16iw751.jpg" border="0" alt="Image and video hosting by TinyPic" /&gt;&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks for your time/help.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 23:20:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104559#M5904</guid>
      <dc:creator>rajbahak</dc:creator>
      <dc:date>2012-10-26T23:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: color code a result on a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104560#M5905</link>
      <description>&lt;P&gt;Would &lt;A href="http://splunk-base.splunk.com/answers/13012/does-42-have-any-capabilities-to-set-a-row-color-based-on-a-field-example"&gt;araitz's previous Answer&lt;/A&gt; do the trick?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 23:36:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104560#M5905</guid>
      <dc:creator>ChrisG</dc:creator>
      <dc:date>2012-10-26T23:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: color code a result on a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104561#M5906</link>
      <description>&lt;P&gt;You can use the Table module from Sideview Utils.  The Table module has a param called 'rowClass' that allows you to set the CSS classname of each row based on one or more fields from the row's data.   It also has a 'hiddenFields' param, so that the special field value(s) used in the classname isn't actually visible to the user. &lt;/P&gt;

&lt;P&gt;You would need to apply a little search language to generate the field, either in your base search or using postProcess, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval myClassField=if(free&amp;lt;100,"low","normal")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then your Table module would look like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Table"&amp;gt;
  &amp;lt;param name="rowClass"&amp;gt;$row.fields.myClassField$&amp;lt;/param&amp;gt;
  &amp;lt;param name="hiddenFields"&amp;gt;myClassField&amp;lt;/param&amp;gt;
&amp;lt;/module&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and that's all she wrote.   There are some docs about this in Sideview Utils although there will be more docs coming over the next few releases. &lt;/P&gt;

&lt;P&gt;UPDATE:   I forgot to mention the third part,   putting in the actual Custom CSS to define what class="low" should do on the page.  &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Most commonly people write custom CSS by adding it to the application.css file that lives in etc/apps/&lt;APP_NAME&gt;/appserver/static/application.css&lt;/APP_NAME&gt;&lt;/P&gt;

&lt;P&gt;you would for instance add this to that file: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.Table tr.low td {
    background-color:#ffdddd;
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://sideviewapps.com/apps/sideview-utils/"&gt;http://sideviewapps.com/apps/sideview-utils/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Oct 2012 05:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104561#M5906</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-10-27T05:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: color code a result on a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104562#M5907</link>
      <description>&lt;P&gt;thanks a lot for your replies. I'll look into the sideview app&lt;/P&gt;

&lt;P&gt;Usup&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2012 17:52:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104562#M5907</guid>
      <dc:creator>rajbahak</dc:creator>
      <dc:date>2012-10-30T17:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: color code a result on a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104563#M5908</link>
      <description>&lt;P&gt;don't think I am doing it right. I have the sideview utils app installed. And as soon as I include the table module in the dashboard, save it and come out of the editor, the dashboard won't load. All I get is a Loading... tab. you can see the result in the screen shot below.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://tinypic.com?ref=11wa5u9" target="_blank"&gt;&lt;IMG src="http://i50.tinypic.com/11wa5u9.jpg" border="0" alt="Image and video hosting by TinyPic" /&gt;&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;what do you think is going on here?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 22:21:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104563#M5908</guid>
      <dc:creator>rajbahak</dc:creator>
      <dc:date>2012-10-31T22:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: color code a result on a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104564#M5909</link>
      <description>&lt;P&gt;Do you have the SideviewUtils module also in there,  tucked up near the top out of the way?  If you've forgotten to include the invisible SideviewUtils module at the top,  this is exactly what happens - Loading gets stuck at the top and there's a JS error in the console saying "Sideview is not defined".  There's a couple little things you have to know, that are listed on the Sideview Utils homepage and that's one of them.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 22:31:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104564#M5909</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-10-31T22:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: color code a result on a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104565#M5910</link>
      <description>&lt;P&gt;by now you would have probably guessed my level of expertise in Splunk.. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; Sorry, it seems like I am having you to babysit me through this. But what I am seeing now is a bit bizarre. I got past the 'Loading.' stage after including the SideviewUtils module, but I now get two tables, and one of them seem like a static table with no drill downs, and the other one looks like a normal splunk results table.. what is happening??&lt;/P&gt;

&lt;P&gt;&lt;A href="http://tinypic.com?ref=5dku9f" target="_blank"&gt;&lt;IMG src="http://i50.tinypic.com/5dku9f.jpg" border="0" alt="Image and video hosting by TinyPic" /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2012 17:29:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104565#M5910</guid>
      <dc:creator>rajbahak</dc:creator>
      <dc:date>2012-11-01T17:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: color code a result on a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104566#M5911</link>
      <description>&lt;P&gt;I suspect if you look again, you'll see quite clearly that your view is specifying that both a SimpleResultsTable module &lt;EM&gt;and&lt;/EM&gt; a Table module should be there.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2012 17:39:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-code-a-result-on-a-table/m-p/104566#M5911</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-11-01T17:39:04Z</dc:date>
    </item>
  </channel>
</rss>

