All Apps and Add-ons

Sideview Utils Multiplexer: How to use icons instead of colors for rangemap?

royimad
Builder
 <!-- BEGIN EXAMPLE -->
  <module name="Search" layoutPanel="panel_row4_col1" autoRun="True">
    <param name="search">sourcetype="testcsvlog" earliest=-1d@d latest=now
          | stats avg(LOGDURATION) as Average by USERID
          | rangemap field=Average low=1-100 elevated=101-300 default=severe</param>
    <param name="earliest">-15m</param>
    <param name="latest">now</param>

    <module name="JobProgressIndicator" />

    <module name="Multiplexer">
      <param name="fields">USERID,Average,range</param>
      <module name="HTML">
        <param name="html"><![CDATA[
          <div class="valueDisplay">
            <div class="inner $range$"><b>$USERID$</b> ($Average$ millseconds)</div>
          </div>
        ]]></param>

      </module>
    </module>
  </module>
  <!-- END EXAMPLE -->

The default behavior is using Sideview Util's range colors while I want to use icons instead. How do I do that?

1 Solution

sideview
SplunkTrust
SplunkTrust

Just use the $range$ token in your HTML module such that it ends up picking one of a number of icons you have loaded in appserver/static

Here's an example that expects there to be images like $SPLUNK_HOME/etc/apps/sideview_utils/appserver/static/images/ICON_severe.gif

<module name="Multiplexer">
   <param name="fields">USERID,Average,range</param>
   <module name="HTML">
     <param name="html"><![CDATA[
       <div class="valueDisplay">
         <div class="inner"><img src="/static/app/sideview_utils/images/ICON_$range$.gif" />
           <b>$USERID$</b> ($Average$ millseconds)</div>
        </div>
     ]]></param>
   </module>
</module>

View solution in original post

sideview
SplunkTrust
SplunkTrust

Just use the $range$ token in your HTML module such that it ends up picking one of a number of icons you have loaded in appserver/static

Here's an example that expects there to be images like $SPLUNK_HOME/etc/apps/sideview_utils/appserver/static/images/ICON_severe.gif

<module name="Multiplexer">
   <param name="fields">USERID,Average,range</param>
   <module name="HTML">
     <param name="html"><![CDATA[
       <div class="valueDisplay">
         <div class="inner"><img src="/static/app/sideview_utils/images/ICON_$range$.gif" />
           <b>$USERID$</b> ($Average$ millseconds)</div>
        </div>
     ]]></param>
   </module>
</module>
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...