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!

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...