Splunk Search

Highlight entire row in table after the row is clicked


I want to highlight an entire row in a table when its clicked. I want this to be persistent so when I click outside the table or go to next or previous page, the row that i clicked is still highlighted until a new row is clicked or the dashboard is refreshed.

This is an example on how i want it to look like:
alt text

This is probably a use case where Javascript is needed. But with minimal knowledge and experience with Javascript this has become a big challenge.

Additional information:
- Splunk Enterprise 7.2
- Dashboard written in SimpleXML
- Looked into the dashboard examples app with no luck
- The dashboard has multiple tables and should work on each one and be independent of each other
- The default highlighter in the "click selector" option in "Format visualization" is not persistant

Thank you in advance!

0 Karma

Ultra Champion

Hi, I tried it but it is difficult.
Table column Simple XML
Even if you look here, the color can be changed only in column units, and the color changes according to the value of the column, so the same value will change the color.

I think it is not only work hard in the CSS.

0 Karma


Thank you. Had a look and the it looks like that CSS and JS is the solution. Because what i have tried to do now is to just change one cell not the whole row. And the problem seems to be that changing what value that is being highlighted by using a token is not working. It works on initial load on the dashboard but if you try to change this on a later stage it doesn´t work.

Here is what i have tried this with:

  <label>Color test</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="colorPickerToken" searchWhenChanged="true">
      <label>Change field to highlight</label>
      <choice value="1">1</choice>
      <choice value="2">2</choice>
      <choice value="3">3</choice>
      <choice value="4">4</choice>
      <choice value="5">5</choice>
      <choice value="6">6</choice>
      <choice value="7">7</choice>
      <choice value="8">8</choice>
      <choice value="9">9</choice>
      <choice value="0">0</choice>
      <title>In field "int" set color on value $colorPickerToken$</title>
          <query>| makeresults
                 | eval int="1,2,3,4,5,6,7,8,9,0"
                 | makemv int delim=","
                 | mvexpand int 
                 | eval A="a",B="b",C="c"
                 | table _time int A B C
        <option name="count">10</option>
        <option name="refresh.display">progressbar</option>
        <format type="color">
          <colorPalette type="map">{"$colorPickerToken$":#FF1111}</colorPalette>
0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...