Splunk Search

Can you highlight cells with dependency without js?

GDude
New Member

Is it possible to highlight values in a row with condition by another value from another field without js/css? In the table I want to have the times highlighted and the row with color hidden. Thanks in advance. George

0 Karma

akarivaratharaj
Communicator

Hi @niketnilay

I have a column called "TOTAL_TIME" which is in the format of "HH:MM:SS" and I am trying to apply the color format to it. But the color is not getting applied.

Could you please help me in getting the code to apply the color for the time format.

Thankyou.

0 Karma

GDude
New Member

I've attached the target table. I want to Color every cell by ist indicator.There I combined my "teststring" with a color. One colomn is reworked -"NULL"- with js. It is colored and the additional color identifier is removed. (Teststring and Color were combined within a search from two fields. )
For this result I used "Table Cell Highlighting". Now I only Need to find how to get all fields with the return - function out of my table.

Instead of the field "NULL" I have to rework eleven fields more. Probably the field-names will Change.
canRender: function(cell)
{
// Enable this custom cell renderer for both the active_hist_searches and the active_realtime_searches field
return _(['NULL']).contains(cell.field);
},

0 Karma

niketn
Legend

@GDude, you should refer to Table Row Highlight example not Table Cell Highlight.

https://answers.splunk.com/answers/588394/change-the-color-of-rows-in-a-table-based-on-text-1.html
https://answers.splunk.com/answers/581747/change-row-color-when-the-field-time-value-increas.html

The idea is set a CSS class based on Table Cell value i.e. for Green or Yellow or Red and then based on the class of the cell, set the class for parent row as the same color.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

GDude
New Member

Thanks, I saw this but it dosnt help me. Summery rows are not usefull. I have to highlight the single values by conditions in my table. I will use js.

0 Karma

GDude
New Member

you can Highlight the values of a row by itself. My Problem is this I timestrings and the condition must be placed on the left side. I cant use the headline to place conditions.
I'm beginner and js is new for me... with js I can combine more failures 😉

0 Karma

niketn
Legend

@GDude, requesting you to add comments rather than answer, so that your question flags as unanswered until someone provides a solution to your issue.

The details you have provided is still confusing. Do you want to color the entire row as green when the FARBE value is green? What do you want to do when the value is rot? Also are there any other values for FARBE column or any other color selection?

Have you checked out Splunk Dashboard Examples App from Splunkbase which has the Table Row Highlighting example for such use case?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

niketn
Legend

@GDude, I dont think row can be highlighted without JS/CSS extension to Simple XML at the moment. However, post Splunk 6.5 you can highlight cell based on values.

Is there are specific reason for not using JS/CSS?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

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 ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...