<?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 Splunk Dashboard Icon in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425710#M28038</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;I am working on splunk dashboard with icons. I have two Columns one column is name of the server and other is status. if server is UP i have to use "green circle check" , if server is down "red cross". I am able to get icons with js file but  server column is coming as blank.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 14:20:22 GMT</pubDate>
    <dc:creator>darshana1990</dc:creator>
    <dc:date>2019-08-02T14:20:22Z</dc:date>
    <item>
      <title>Splunk Dashboard Icon</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425710#M28038</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;I am working on splunk dashboard with icons. I have two Columns one column is name of the server and other is status. if server is UP i have to use "green circle check" , if server is down "red cross". I am able to get icons with js file but  server column is coming as blank.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 14:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425710#M28038</guid>
      <dc:creator>darshana1990</dc:creator>
      <dc:date>2019-08-02T14:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Icon</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425711#M28039</link>
      <description>&lt;P&gt;Hi Darshana,&lt;/P&gt;

&lt;P&gt;Share your javascript code and panel xml&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 14:56:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425711#M28039</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-08-02T14:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Icon</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425712#M28040</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;You should install &lt;CODE&gt;Splunk Dashboard Examples App&lt;/CODE&gt; available on Splunkbase which has sample examples for Table Icon Set inline and rangemap under table elements.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 15:39:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425712#M28040</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-08-02T15:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Icon</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425713#M28041</link>
      <description>&lt;P&gt;below is my XML.&lt;/P&gt;

&lt;P&gt;Icon Clone&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;html&amp;gt;
   &amp;lt;head&amp;gt;
     &amp;lt;style&amp;gt;
       .up {
           background-image: url('ok-icon.png') !important;
           background-repeat: no-repeat !important;
           background-size: 20px 20px; !important;
       }
       .down {
           background-image: url('') !important;
           background-repeat: no-repeat !important;
           background-size: 20px 20px; !important;
       }
       .unknown {
           background-image: url('Lol_question_mark.png') !important;
           background-repeat: no-repeat !important;
           background-size: 20px 20px; !important;
       }
       .warn {
           background-image: url('img_83533.png') !important;
           background-repeat: no-repeat !important;
           background-size: 20px 20px; !important;
       }
     &amp;lt;/style&amp;gt;
   &amp;lt;/head&amp;gt;
 &amp;lt;/html&amp;gt;


&amp;lt;panel&amp;gt;
  &amp;lt;table id="sample"&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;index="****" sourcetype = "****"|table server,Status&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;-6d@w1&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;-1d@w6&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="count"&amp;gt;10&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;below is the icon.js&lt;/P&gt;

&lt;P&gt;require([&lt;BR /&gt;
       'underscore',&lt;BR /&gt;
       'jquery',&lt;BR /&gt;
       'splunkjs/mvc',&lt;BR /&gt;
       'splunkjs/mvc/tableview',&lt;BR /&gt;
       'splunkjs/mvc/simplexml/ready!'&lt;BR /&gt;
   ], function(_, $, mvc, TableView) {&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
     canRender: function(cell) {
         return _(['Status']).contains(cell.field);
     },
     render: function($td, cell) {
        var value = cell.value;
         if(value=="UP" )
             {
                 $td.html("&amp;lt;div class='up'&amp;gt; &amp;lt;/div&amp;gt;")
             }
         else if(value=="DOWN")
         {
                 $td.html("&amp;lt;div class='down'&amp;gt; &amp;lt;/div&amp;gt;")
         }
         else if(value=="UNKNOWN" || value=="N/A")
         {
                 $td.html("&amp;lt;div class='unknown'&amp;gt; &amp;lt;/div&amp;gt;")
         }
         else if(value=="WARN")
         {
                 $td.html("&amp;lt;div class='warn'&amp;gt; &amp;lt;/div&amp;gt;")
         }

     }
 });

 var sh = mvc.Components.get("sample");
 if(typeof(sh)!="undefined") {
     sh.getVisualization(function(tableView) {
         // Add custom cell renderer and force re-render
         tableView.table.addCellRenderer(new CustomRangeRenderer());
     tableView.table.render();

     });
 }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;});  &lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 08:01:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425713#M28041</guid>
      <dc:creator>darshana1990</dc:creator>
      <dc:date>2019-08-05T08:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Icon</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425714#M28042</link>
      <description>&lt;P&gt;Thank you very much for your support.I have already gone though it and created dashboard but its not returning coorect output.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 13:48:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Icon/m-p/425714#M28042</guid>
      <dc:creator>darshana1990</dc:creator>
      <dc:date>2019-08-05T13:48:04Z</dc:date>
    </item>
  </channel>
</rss>

