<?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: Quick State visualization  Works in Search but Not always in Dashboard in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389049#M47488</link>
    <description>&lt;P&gt;Thanks for the suggestions. This is what I ended up doing:&lt;/P&gt;

&lt;P&gt;I used the following post to generate a table where I had a label and then value separated by a pipe.&lt;BR /&gt;
The js then displays the label and used the value to display a colour.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html"&gt;https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I then added the following css so that the table rows displayed across the page rather than down the page.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#my_table tr {
  display: block;
  float: left;
   text-align: center !important;
background-color:#212527 !important;
}
#my_table th{display:none;}

#my_table td {
  display: block;
   text-align: center !important;
     background-color:#212527 !important;
     width:180px !important;
   padding: 2px !important;
    margin: 2px !important;
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then this css to control  the cells colour etc.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    .css_for_2 { 
     background-color:#b44441;
           padding: 5px !important;
            font-size: 14px  !important;
            line-height:120%  !important;
              color: white  !important;
    height:60px  !important;
     }

     .css_for_3 { 
     background-color:orange;
          padding: 5px !important;
            font-size: 14px  !important;
            line-height:120%  !important;
              color: white  !important;
    height:60px  !important;
     }

     .css_for_1 { 
     background-color:#3fc77a;
          padding: 5px !important;
            font-size: 14px  !important;
            line-height:120%  !important;
              color: white  !important;
    height:60px  !important;
     }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this is how it looks&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6551i38BDB9BC0FF9143A/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 31 Mar 2019 23:11:38 GMT</pubDate>
    <dc:creator>Melstrathdee</dc:creator>
    <dc:date>2019-03-31T23:11:38Z</dc:date>
    <item>
      <title>Quick State visualization  Works in Search but Not always in Dashboard</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389045#M47484</link>
      <description>&lt;P&gt;I am using the Quick State visualization to display a greenlight/redlight display for services for my hosts. However the viz doesnt always load when I have it in a dashboard.&lt;BR /&gt;
It seems to work consistently if I use the search interface but not when I add it to a dashboard.&lt;BR /&gt;
Any Ideas?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/3359/"&gt;Quick State&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;My code is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;viz type="quick_state_app.quick_state"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="windows"  sourcetype=abc  host=xyz
| dedup host
| eval state = if(State = "Running","#3fc77a","#d93f3c" ) 
|  eval icon="../../static/app/mytestapp/dot.jpg"
 | table host icon state
&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$dateToken.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$dateToken.latest$&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="height"&amp;gt;165&amp;lt;/option&amp;gt;
      &amp;lt;/viz&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Running version - 7.2.3&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 03:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389045#M47484</guid>
      <dc:creator>Melstrathdee</dc:creator>
      <dc:date>2019-02-15T03:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Quick State visualization  Works in Search but Not always in Dashboard</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389046#M47485</link>
      <description>&lt;P&gt;If you are open to looking at alternative options the &lt;A href="https://splunkbase.splunk.com/app/3815/"&gt;Scalable Vector Graphics - Custom Visualization&lt;/A&gt; has just been updated to support &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/Viz/VisualizationTrellis"&gt;trellis layouts&lt;/A&gt;. So you could achieve something similar with custom images, the caveat being that it uses SVG to display images, not JPG/PNG.&lt;/P&gt;

&lt;P&gt;Example SVG trellis layout generating different battery levels&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6549iE3B72CE2BDCF767F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Example SVG trellis layout generating different counter numbers&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6550i2D39FAF8EDAA199C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 12:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389046#M47485</guid>
      <dc:creator>msivill_splunk</dc:creator>
      <dc:date>2019-03-29T12:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Quick State visualization  Works in Search but Not always in Dashboard</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389047#M47486</link>
      <description>&lt;P&gt;@Melstrathdee try &lt;A href="https://splunkbase.splunk.com/app/3119/"&gt;Status Indicator Custom Visualization&lt;/A&gt; with Trellis or else check out &lt;CODE&gt;Custom Decorations&lt;/CODE&gt; example in the &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;Splunk Dashboard Examples App&lt;/A&gt;. You can use Splunk Icons ( &lt;CODE&gt;&lt;A href="https://&amp;lt;yourSplunkServer&amp;gt;/en-US/static/docs/style/style-guide.html#icons" target="test_blank"&gt;https://&amp;lt;yourSplunkServer&amp;gt;/en-US/static/docs/style/style-guide.html#icons&lt;/A&gt;&lt;/CODE&gt; ) and also extend this example to include Image instead of Icons.&lt;/P&gt;

&lt;P&gt;Refer to some of older answers for using Single Value and Status Indicator &lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/590581/refresh-data-in-table-by-collecting-token-on-click.html"&gt;https://answers.splunk.com/answers/590581/refresh-data-in-table-by-collecting-token-on-click.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/606444/can-i-create-a-visual-of-the-status-of-a-file-usin.html"&gt;https://answers.splunk.com/answers/606444/can-i-create-a-visual-of-the-status-of-a-file-usin.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 11:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389047#M47486</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-03-30T11:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Quick State visualization  Works in Search but Not always in Dashboard</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389048#M47487</link>
      <description>&lt;P&gt;Great Idea, I didnt think to use the scale vector graphics.&lt;/P&gt;

&lt;P&gt;I've posted what I did in the end below.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 23:02:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389048#M47487</guid>
      <dc:creator>Melstrathdee</dc:creator>
      <dc:date>2019-03-31T23:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Quick State visualization  Works in Search but Not always in Dashboard</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389049#M47488</link>
      <description>&lt;P&gt;Thanks for the suggestions. This is what I ended up doing:&lt;/P&gt;

&lt;P&gt;I used the following post to generate a table where I had a label and then value separated by a pipe.&lt;BR /&gt;
The js then displays the label and used the value to display a colour.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html"&gt;https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I then added the following css so that the table rows displayed across the page rather than down the page.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#my_table tr {
  display: block;
  float: left;
   text-align: center !important;
background-color:#212527 !important;
}
#my_table th{display:none;}

#my_table td {
  display: block;
   text-align: center !important;
     background-color:#212527 !important;
     width:180px !important;
   padding: 2px !important;
    margin: 2px !important;
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then this css to control  the cells colour etc.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    .css_for_2 { 
     background-color:#b44441;
           padding: 5px !important;
            font-size: 14px  !important;
            line-height:120%  !important;
              color: white  !important;
    height:60px  !important;
     }

     .css_for_3 { 
     background-color:orange;
          padding: 5px !important;
            font-size: 14px  !important;
            line-height:120%  !important;
              color: white  !important;
    height:60px  !important;
     }

     .css_for_1 { 
     background-color:#3fc77a;
          padding: 5px !important;
            font-size: 14px  !important;
            line-height:120%  !important;
              color: white  !important;
    height:60px  !important;
     }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this is how it looks&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6551i38BDB9BC0FF9143A/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 23:11:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Quick-State-visualization-Works-in-Search-but-Not-always-in/m-p/389049#M47488</guid>
      <dc:creator>Melstrathdee</dc:creator>
      <dc:date>2019-03-31T23:11:38Z</dc:date>
    </item>
  </channel>
</rss>

