Archive
Highlighted

How do I hide specific selections from the Presets accordion in Timepicker?

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

  • I am running v6.4.1
  • My test process is:
  1. vi /opt/splunk/etc/apps/search/appserver/static/dashboard.css
  2. add css code (shown below)
  3. http://mysvr:8000/en_US/_bump (Bump it to reload)
  4. Goto browser and refresh the Dashboard to render new changes
  5. Check Timepicker widget to see results

I have most of what I want working except it still shows all selections in that column:
Last 15 minutes
Last 60 minutes
Last 4 hours
Last 24 hours
Last 7 days
Last 30 days

What code do i need to remove:
Last 15 minutes
Last 60 minutes
Last 4 hours
Last 30 days

And to add:
Last 3 days

Here is what I have so far:
1) vi /opt/splunk/etc/apps/search/appserver/static/dashboard.css
`
.SingleValueHolder {

background-image: none;

-moz-box-shadow: none;

}

SingleValue01_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^='relativeview'],

div[id^='daterange
view'],

div[id^='dateandtimerangeview'],

div[id^='advanced
view'],

div[id^='realtime_view'] {

display: none;

}

/* Within the Presets accordian/

/
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;

}

/* Keep/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;

}
`

Tags (1)
0 Karma
Highlighted

Re: How do I hide specific selections from the Presets accordion in Timepicker?

Champion

Is not it easier to make by drop down etc?

    <input type="dropdown" token="Time_Picke">
      <label>Time Picke</label>
      <choice value="-24h@h">Last 24 hours</choice>
      <choice value="-3d@d">Last 3 days</choice>
      <choice value="-7d@d">Last 7 days</choice>
    </input>

 <query>index=XXX earliest=$Time_Picke$ latest=now</query>
0 Karma