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