Dashboards & Visualizations

How to color entire row based on field values?

tkwaller1
Path Finder

Hello

I have a dashboard where I'd like to color the entire row based on the results of a field value. Currently its an XML dashboard and I have it setup to color the column but I'd like to color the entire row based on the field value.

Here's the code for the dashboard:

 

 

 

<form version="1.1" theme="dark">
  <label> Production Report</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="time" token="field1">
      <label></label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row>
    <panel>
	<title>Product Submission Details</title>
      <table>
        <search>
          <query>index=my_dbx sourcetype="my:dbx:details"
| fillnull value="NA" SUPPORTING_DOC_NUMBER PRODUCT_SOURCE_KEY PROJECT_ID
|stats count by ID INT_MESSAGE_ID APPLICATION_NUMBER APPLICATION_TYPE SUBMISSION_NUMBER SUBMISSION_TYPE SUPPORTING_DOC_NUMBER PRODUCT_SOURCE_KEY  PROJECT_ID MESSAGE_STATUS MESSAGE_COMMENT LAST_UPDATE_TIMESTAMP
| fields - count
| sort - INT_MESSAGE_ID</query>
          <earliest>$field1.earliest$</earliest>
          <latest>$field1.latest$</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">10</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <format type="color" field="MESSAGE_STATUS">
          <colorPalette type="map">{"PRODUCTS NOT UPDATABLE":#DC4E41,"Project not Found":#DC4E41,"PRODUCTS UPDATE FAILED":#DC4E41,"PROCESS PRODUCTS":#F8BE34,"PRODUCTS UPDATED":#53A051}</colorPalette>
        </format>
      </table>
    </panel>
  </row>

 

 

 

Just trying to figure out how to accomplish this.

Thanks for the assistance.

 

Labels (2)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

<form version="1.1" theme="dark">
  <label> Production Report</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="time" token="field1">
      <label></label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row>
    <panel depends="$stayhidden$">
      <html>
        <style>
          #productreport table tbody td div.multivalue-subcell[data-mv-index="1"]{
            display: none;
          }
        </style>
      </html>
    </panel>
    <panel>
	<title>IWMS Product Submission Details</title>
      <table id="productreport">
        <search>
          <query>index=my_dbx sourcetype="my:dbx:details"
| fillnull value="NA" SUPPORTING_DOC_NUMBER PRODUCT_SOURCE_KEY PROJECT_ID
|stats count by ID INT_MESSAGE_ID APPLICATION_NUMBER APPLICATION_TYPE SUBMISSION_NUMBER SUBMISSION_TYPE SUPPORTING_DOC_NUMBER PRODUCT_SOURCE_KEY  PROJECT_ID MESSAGE_STATUS MESSAGE_COMMENT LAST_UPDATE_TIMESTAMP
| fields - count
| sort - INT_MESSAGE_ID
| foreach *
  [| eval &lt;&lt;FIELD>>=mvappend(&lt;&lt;FIELD>>,MESSAGE_STATUS)]</query>
          <earliest>$field1.earliest$</earliest>
          <latest>$field1.latest$</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">10</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <format type="color">
          <colorPalette type="map">{"PRODUCTS NOT UPDATABLE":#DC4E41,"Project not Found":#DC4E41,"PRODUCTS UPDATE FAILED":#DC4E41,"PROCESS PRODUCTS":#F8BE34,"PRODUCTS UPDATED":#53A051}</colorPalette>
        </format>
      </table>
    </panel>
  </row>
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi  @tkwaller1 ,

in the Splunk Dashboard Examples App (https://splunkbase.splunk.com/app/1603) Table Row Highlighting dashboard, you can find a sample of the solution for your requisite.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...