Dashboards & Visualizations

How to remove "All time" and "Real time" from one dashboard's timepicker

sbattista09
Contributor

While building dashboards and having the timepicker in the dashboard, I need to find a way to remove "All time" and "Real time". Is there a way to just add a line of code in the XML?

0 Karma

bmacias84
Champion

The best way to do this is not to remove it from the UI, but to change your user permission. Thought I would probably create a custom role.

On your search heads create authorize.conf within an app or system/local directory.

[role_limited_user]
change_own_password = enabled
embed_report = enabled
get_metadata = enabled
get_typeahead = enabled
input_file = enabled
list_deployment_client = enabled
list_forwarders = enabled
list_inputs = enabled
output_file = enabled
request_remote_tok = enabled
rest_apps_view = enabled
rest_properties_get = enabled
run_debug_commands = enabled
search = enabled
schedule_search = enabled
# this settings limited there maxium search window below is two weeks in seconds
srchTimeWin = 1209600
#leave this capabilility commented out
#rtsearch = enabled

Additionally you can set the UI time picker to defaults from $SPLUNK_HOME/etc/system/local/ui-prefs.conf. Below sets the default to 15m and fast mode when the search window loads for all users.

[default]
dispatch.earliest_time = -15m
dispatch.latest_time = now
display.page.search.mode = fast

I do recommend creating a new roles.

savithamr
Path Finder

It works, but for all timepicker while logged in as role(admin)
What if i have to do for only one dashboard timepicker??

0 Karma

bmacias84
Champion

Create a custom timepicker.

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