Dashboards & Visualizations

How to make the color selected in one dashboard applied to all in the dashboards in the same app?

sajjanshetty15
Loves-to-Learn

Hi All,
I have an app which has multiple dashboards and i have created a new settings dashboard in which i have created 3 buttons for 3 different colors.
when i click on these buttons the colors are changing accordingly as i have set in css file but only in the settings dashboard where the buttons are present.
How can i make the color selected in the settings page applied to all the other dashboard as well?
I don't want to create separate buttons in each dashboard. with the buttons in the settings page i want to control the dashboard color.
i have searched the forum and all i have found is dashboard level color changes, but i need App level.
please give your suggestions.

Labels (1)
0 Karma

nnilay_splunk
Splunk Employee
Splunk Employee

Create dashboard.css in your Splunk App's appserver/static directory and move the changes to that CSS file. The changes will apply to all dashboards (provided the CSS selectors are correct) WITHOUT you having to specifically include dashboard.css file to every dashboard via stylesheet="dashboard.css". This is because internally dashboard.css is included in all dashboards.

Please try out and confirm!

0 Karma

sajjanshetty15
Loves-to-Learn

Hi @nnilay_splunk thank you for the response.
I have already placed a Common.css file in every dashboard with data theme =different color set which iam controlling with the buttons provided in settings dashboard, still i am not able to see the changes.
the color changes are happening according to the button selected only in the settings dashboard(where i have placed the buttons) and not being applied to any other dashboard.
so i believe the css selectors are correct as i can see the color change i am missing something else which i am not able to figure out.. 😞

does it has to be dashboard.css?? i cannot use any other css which is common to all??

0 Karma

niketn
Legend

If you put it in any other CSS file like my_own_styles.css you need to add script="my_own_styles.css" to all dashboards where you want your CSS to be applied. If you think you have the right CSS, for the community to assist you better

1. Can you add the Simple XML snippet for buttons in your dashboard?

2. CSS style override that you need to apply?

3. Also does the color need to change on Click or Hover or need to be applied by default?

4. Can you add sample screenshot of what is expected vs what you have right now?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...