Эх сурвалжийг харах

HUE-5603 [search] Avoid 500 when fixed dates are not specified

Correct way in a follow-up would be to prompt in the calendar and prefil with
a week for example.
Romain Rigaux 9 жил өмнө
parent
commit
bf981c0

+ 1 - 0
apps/jobbrowser/src/jobbrowser/templates/apps.mako

@@ -132,6 +132,7 @@ ${ assist.assistPanel() }
               <input class="btn btn-status" type="radio" name="interface" value="jobs" data-bind="checked: interface" id="jobs"><label for="jobs">${ _('Jobs') }</label>
               <input class="btn btn-status" type="radio" name="interface" value="batches" data-bind="checked: interface" id="batches"><label for="batches">${ _('Workflows') }</label>
               <input class="btn btn-status" type="radio" name="interface" value="schedules" data-bind="checked: interface" id="schedules"><label for="schedules">${ _('Schedules') }</label>
+              <input class="btn btn-status" type="radio" name="interface" value="schedules" data-bind="checked: interface" id="bundles"><label for="bundles">${ _('Bundles') }</label>
             </span>
 
             <span class="btn-group">

+ 1 - 1
apps/search/src/search/models.py

@@ -498,7 +498,7 @@ class Collection2(object):
         'type': 'rolling',
         'value': 'all',
         'from': '',
-        'to': 'NOW',
+        'to': '',
         'truncate': True
       }
     if 'suggest' not in props['collection']:

+ 2 - 2
desktop/libs/libsolr/src/libsolr/api.py

@@ -765,8 +765,8 @@ class SolrApi(object):
         props['gap'] = GAPS.get(collection['timeFilter']['value'])
       elif collection['timeFilter']['type'] == 'fixed':
         props['field'] = collection['timeFilter']['field']
-        props['from'] = collection['timeFilter']['from']
-        props['to'] = collection['timeFilter']['to']
+        props['from'] = collection['timeFilter'].get('from', 'NOW-7DAYS')
+        props['to'] = collection['timeFilter'].get('to', 'NOW')
         props['fixed'] = True
 
     return props