Splunk Search

How do I hide specific choices within Presets accordion while keeping/displaying others in timepicker?

damonmanni
Path Finder

I want to display a modified time-picker that shows only the following preset choices:
Last 24 hours
Last 3 days
Last 7 days

All other accordions will also be hidden. I have most of this working but I cannot figure out how to remove just:
Last 15 minutes
Last 60 minutes
Last 4 hours
Last 30 days

and add:
Last 3 days

My current steps are:
1. vi /opt/splunk/etc/apps/search/appserver/static/dashboard.css
2. Add code below
3. http://svr:8000/en_US/_bump (to force a reload)
4. Refresh the browser dashboard page
5. Click timepicker to validate results:

Last 15 minutes
Last 60 minutes
Last 4 hours
Last 24 hours
Last 7 days
Last 30 days

Here is the code:
dashboard.css
`
.SingleValueHolder {
background-image: none;
-moz-box-shadow: none;
}

SingleValue_0_1_0 .SingleValueHolder {

background: none;
text-align: left;
font-weight: normal;
width: auto;
padding-top: 0;
padding-left: 0;
font-size: 14px;
-moz-box-shadow: none;
}
/* Hide Majority of accordions /
div[id^='relative_view'],
div[id^='daterange_view'],
div[id^='dateandtimerange_view'],
div[id^='advanced_view'],
div[id^='realtime_view'] {
display: none;
}
/
Within the Presets accoridan*/
/* Hide Real-time column choices /
div[id^='presets_view'] > div.accordion-body > div > ul:nth-child(1) { display:none;
}
/
Hide the divider after the Real-time column /
div[id^='presets_view'] > div.accordion-body > div > div:nth-child(2) {

display:none;
}

/
Hide the 1st column choices in the Relative column /
div[id^='presets_view'] > div.accordion-body > div > ul:nth-child(3) {

display:none;
}

/
** Display the 2nd column choices in the Relative column /
/
div[id^='presets_view'] > div.accordion-body > div > ul:nth-child(4) {
display:none;
}
**/
/
Hide the divider after the Relative column /
div[id^='presets_view'] > div.accordion-body > div > div:nth-child(5) {

display:none;
}
/
Hide Other column choices */
div[id^='presets_view'] > div.accordion-body > div > ul:nth-child(6) {

display:none;
}
`

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...