Dashboards & Visualizations

How to display table header in dashboard even without result?

yuanliu
SplunkTrust
SplunkTrust

I have a case when results are few, if any. In dashboard, fewer rows takes up smaller vertical space, but if no result returns, it takes up a taller default. I would rather align the tables with smaller vertical space than forcing users to scroll. Is there a way to achieve this? (Display table header is just one such thought but I don't know how.)

0 Karma
1 Solution

jacobpevans
Motivator

Greetings @yuanliu,

You can achieve this in the simple XML without JS. If you inspect that panel when there are no results, you'll see it has a CSS class of splunk-viz-msg. If you override the default CSS settings of splunk-viz-msg in your simple XML, you can set the height to be whatever you want. We use height: 60px in our environment.

@niketnilay did a nice write-up of how to apply CSS directly in the simple XML here: https://answers.splunk.com/answers/590387/how-do-i-update-panel-color-in-splunk-using-css-1.html

Cheers,
Jacob

If you feel this response answered your question, please do not forget to mark it as such. If it did not, but you do have the answer, feel free to answer your own post and accept that as the answer.

View solution in original post

jacobpevans
Motivator

Greetings @yuanliu,

You can achieve this in the simple XML without JS. If you inspect that panel when there are no results, you'll see it has a CSS class of splunk-viz-msg. If you override the default CSS settings of splunk-viz-msg in your simple XML, you can set the height to be whatever you want. We use height: 60px in our environment.

@niketnilay did a nice write-up of how to apply CSS directly in the simple XML here: https://answers.splunk.com/answers/590387/how-do-i-update-panel-color-in-splunk-using-css-1.html

Cheers,
Jacob

If you feel this response answered your question, please do not forget to mark it as such. If it did not, but you do have the answer, feel free to answer your own post and accept that as the answer.

yuanliu
SplunkTrust
SplunkTrust

Thank you @jacobevans. Override CSS in simple XML is pretty cool. I'll have to dig into this later.

0 Karma

jacobpevans
Motivator

You're welcome. Thank you for accepting the answer.

Cheers,
Jacob

If you feel this response answered your question, please do not forget to mark it as such. If it did not, but you do have the answer, feel free to answer your own post and accept that as the answer.
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...