Dashboards & Visualizations

How to hide Real-Time Presets option in the time range picker for users?

sravankaripe
Communicator

I want to hide Real-Time Presets option in the time range picker for users. How can i do that?

rjthibod
Champion

The answer @somesoni2 linked to is part of the answer but not all of it.

Here is the way to just remove the Real-Time presets options and the Real-Time accordion entry.

Open up dashboard.css in your app. If you don't have one already, then create one in /appserver/static.

Add the following to dashboard.css

/* hide real-time accordion */
div[id^='realtime_view'] {
  display: none;
}
/* hide real-time presets */
div[id^='presets_view'] > div.accordion-body > div > ul:nth-child(1) {
  display:none;
}
/* hide divider after real-time presets */
div[id^='presets_view'] > div.accordion-body > div > div:nth-child(2) {
  display:none;
}

After making those changes you will have to restart Splunk if you created dashboard.css or "bump" Splunk if it already existed. The latter involves going to http://<SPLUNK_IP_ADDRESS>:8000/en-US/_bump and clicking the button. Then you can reload a dashboard in your app and confirm the real-time options are missing.

0 Karma

somesoni2
Revered Legend
0 Karma
Get Updates on the Splunk Community!

Splunk Lantern | Spotlight on Security: Adoption Motions, War Stories, and More

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...

Splunk Cloud | Empowering Splunk Administrators with Admin Config Service (ACS)

Greetings, Splunk Cloud Admins and Splunk enthusiasts! The Admin Configuration Service (ACS) team is excited ...

Tech Talk | One Log to Rule Them All

One log to rule them all: how you can centralize your troubleshooting with Splunk logs We know how important ...