All Apps and Add-ons

Make SimpleResultsTable Header Title take up 2 lines

cmak
Contributor

My table headers are extremely long, so I would like to have the header names take up 2 or more lines. Ideally, I do not want to use aliases since it shortens the name and is less descriptive. Is there a way to do this?

1 Solution

sideview
SplunkTrust
SplunkTrust

If you're using the Sideview Table module, you could put this into your application.css file.

.Table tr.columnRow th {
  white-space:normal
}

and that would remove the 'nowrap' style that affects the column headers, across all views in the entire app.

If you wanted to be a little more careful and only apply the change to a particular view, and lets say the view is called "myView", you would instead do:

.splView-myView .Table tr.columnRow th {
  white-space:normal
}

And if you're using the Splunk SimpleResultsTable, I think you can do something similar:

.splView-myView .SimpleResultsTable table.simpleResultsTable {
    white-space: normal;
}

Note that it might now wrap to 2 lines, or to 3 lines, or to 8 lines, depending on how crazy long your column headers are.

View solution in original post

sideview
SplunkTrust
SplunkTrust

If you're using the Sideview Table module, you could put this into your application.css file.

.Table tr.columnRow th {
  white-space:normal
}

and that would remove the 'nowrap' style that affects the column headers, across all views in the entire app.

If you wanted to be a little more careful and only apply the change to a particular view, and lets say the view is called "myView", you would instead do:

.splView-myView .Table tr.columnRow th {
  white-space:normal
}

And if you're using the Splunk SimpleResultsTable, I think you can do something similar:

.splView-myView .SimpleResultsTable table.simpleResultsTable {
    white-space: normal;
}

Note that it might now wrap to 2 lines, or to 3 lines, or to 8 lines, depending on how crazy long your column headers are.

cmak
Contributor

The problem with this solution is that my labels are a single long word. Also, the labels are in elements so in order to force it to be a certain width, I need to set it as an inline block. It still does not wrap, and will simply be hidden behind the next column.

0 Karma

cmak
Contributor

I have been trying out CSS properties such as these :
http://stackoverflow.com/questions/1258416/word-wrap-in-a-html-table

But this does not seem to work for the table headers in Splunk

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...