Splunk Search

Table Row Highlighting, using non numeric

edwinmae
Path Finder

I am using the table_row_highlighting.js and the table_decorations.css from the 'latest Splunk 6.x Dashboard examples.

I have 1 field named State and the result is either Running or Stopped.

When I do a 'table' search, everything is green and all the 'results' under State (field) is NaN

Does NaN refers to Not A Number.

Example entry I use, tried all kind of differ combinations, using =, ==, 'Running', "Running", etc.) -- Nothing seems to work, so I am likely missing something here

if (cell.field === 'State') {
if (value == 'Running') {
$td.addClass('range-cell').addClass('range-running');
}

}

How to change this Splunk Dashboard example to use non-numeric?

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi edwinmae,
You should downloaf and install the "Splunk 6.x Dashboard Examples" App (https://splunkbase.splunk.com/app/1603/)
See "Table Formats" dashboard there are two examples that answer your need.
Bye.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi edwinmae,
You should downloaf and install the "Splunk 6.x Dashboard Examples" App (https://splunkbase.splunk.com/app/1603/)
See "Table Formats" dashboard there are two examples that answer your need.
Bye.
Giuseppe

0 Karma

edwinmae
Path Finder

I did that as mentioned in the first line. Those examples contain numeric fields, not text fields.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi edwinmae,,
I don't know if you have the latest version of Splunk 6.0 Dashboard Examples, but in the "Table format" dashboard (New example) there are two examples with non numeric fields non present in the previous version of App.

In the following rows there are two examples: the first one for text fields and the second one for numeric fields

<format type="color" field="sourcetype">
<colorPalette type="sharedList"></colorPalette>
<scale type="category"></scale>
</format>
<format type="color" field="count">
<colorPalette type="minMidMax" maxColor="#31A35F" minColor="#FFFFFF"></colorPalette>
<scale type="minMidMax"></scale>
</format>

Bye.
Giuseppe

0 Karma

edwinmae
Path Finder

You were right --- Didn't notice the New Example
All fine now

Thanks!

0 Karma

Cuyose
Builder

How did you fix this in your script, this still does not seem to address your original problem, coloring the whole row based on a text value in a cell.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...