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
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...