Splunk Search

Color in a table based on cell values on 6.0

aholzer
Motivator

Does anybody know how to configure the necessary .js and .css in an app to color the backgrounds of cells in a table based on their values?

I found this great question/answer for coloring in cell background based on cell values: http://answers.splunk.com/answers/83206/color-in-a-table-based-on-values

But... it doesn't work in Splunk 6.0. And since I've recently upgraded Splunk, the solution no longer works on my server.

I was able to find that the files to modify are dashboard.js and dashboard.css, rather than application.js and application.css. So I've made copies of the files and renamed them, but now I get the following error when it tries to parse the dashboard.js:

Uncaught ReferenceError: Splunk is not defined dashboard.js:14
(anonymous function)

I'm a bit stuck and some guidance would be greatly appreciated.

0 Karma
1 Solution

LukeMurphey
Champion

Try this one, it works on Splunk 6.0.

Note that you will need to remove the code you have in dashboard.js since that code only works on Splunk 5.0. You can leave it in application.js for Splunk 5.0 though.

View solution in original post

0 Karma

LukeMurphey
Champion

Try this one, it works on Splunk 6.0.

Note that you will need to remove the code you have in dashboard.js since that code only works on Splunk 5.0. You can leave it in application.js for Splunk 5.0 though.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...