Splunk Search

How to add different background color for dashboard & panels?

av_
Path Finder

Hi, 

I have got a requirement to enhance the UI of a simple Splunk classic dashboard. I need to add different color for the dashboard background and different color for the dashboard panel. The reference image is attached below.

av__0-1688740241443.png

Can anyone help me with this.

Labels (1)
Tags (1)
0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi @av_ .. As suggested, you should edit the xml file and update the color parameter value. 

maybe you should update us ur current dashboard's xml file(you should edit the hostnames, important details on the SPL).. so that we can help you edit the xml file.. suggst us, thanks. 

 


Best Regards,
Sekar

my youtube channel for Splunk Newbie Learnings
https://www.youtube.com/@SiemNewbies101/videos

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

av_
Path Finder

Hi @inventsekar 

This is the sample xml:

<form version="1.1">
<label>Color Theme</label>
<fieldset submitButton="true">
<input type="time" token="field1">
<label>Time</label>
<default>
<earliest>-24h@h</earliest>
<latest>now</latest>
</default>
</input>
<input type="dropdown" token="field2">
<label>Environment</label>
<choice value="Prod">Prod</choice>
<choice value="QA">QA</choice>
<choice value="DEV">DEV</choice>
</input>
</fieldset>
<row>
<panel>
<title>Fusion(XPDS, WMOS)-&gt;GI Adapter(XPDS,WMOS,BZ,LF)-&gt;Ship GW-&gt;NSP-&gt;SCPI Inbound-&gt;SCPI Outbound-&gt;S4</title>
</panel>
<panel>
<title>Fusion(XPDS, WMOS)-&gt;GI Adapter(XPDS,WMOS,BZ,LF)-&gt;NSP Topic-&gt;Shipped BRE service / SQS in Ship GW -&gt;NSP-&gt;SCPI Inbound-&gt;SCPI Outbound-&gt;S4</title>
</panel>
</row>
<row>
<panel>
<chart>
<title>2nd Panel</title>
<search>
<query>index=main</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="charting.chart">line</option>
<option name="charting.drilldown">none</option>
</chart>
</panel>
<panel>
<table>
<title>First Panel</title>
<search>
<query>Index=main</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="drilldown">none</option>
</table>
</panel>
</row>
</form>

Reference image is attached in the beginning of the thread.

 

 

0 Karma

GaetanVP
Contributor

Hello @av_

You can try to open your classic dashboard and edit the source (you will see a big xml file)

Inside the <panel></panel> tag, you can add something like this (it's basically CSS lines)

 

    <html>
        <!-- main background of the dashboard -->
        <style>
            .dashboard-body {
                background-color: #b4c519
            }
        </style>

        <!-- background of the panel -->
        <style>
            .dashboard-panel {
                background-color: #217727
            }
        </style>

        <!-- background of the titel panel section -->
        <style>
            .panel-title {
                background-color: #c51951
            }
        </style>
    </html>

 

Keep in mind that you can simply inspect the results of the dashboard with your browser and find the HTML classes of section you want to modify and add other CSS lines to the xml.

Hope it will help !
GaetanVP  

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...