Merge pull request #79 from ramielrowe/search_count
Tweaking counts and adding 'All' option to search result count
This commit is contained in:
commit
84afc2741d
@ -476,7 +476,9 @@ def search(request, deployment_id):
|
|||||||
rows = rows.filter(**{column: value})
|
rows = rows.filter(**{column: value})
|
||||||
if not updates:
|
if not updates:
|
||||||
rows = rows.exclude(event='compute.instance.update')
|
rows = rows.exclude(event='compute.instance.update')
|
||||||
rows = rows.order_by('-when')[:int(count)]
|
rows = rows.order_by('-when')
|
||||||
|
if count != 'All':
|
||||||
|
rows = rows[:int(count)]
|
||||||
_post_process_raw_data(rows)
|
_post_process_raw_data(rows)
|
||||||
c['rows'] = rows
|
c['rows'] = rows
|
||||||
c['allow_expansion'] = True
|
c['allow_expansion'] = True
|
||||||
|
@ -61,10 +61,10 @@ function search_form(deployment_id)
|
|||||||
<input type='text' id='query' size='60' value=''/>
|
<input type='text' id='query' size='60' value=''/>
|
||||||
Include Updates: <input type='checkbox' id="updates" checked />
|
Include Updates: <input type='checkbox' id="updates" checked />
|
||||||
<select id='count'>
|
<select id='count'>
|
||||||
<option>10
|
<option selected>25
|
||||||
<option selected>20
|
|
||||||
<option>50
|
|
||||||
<option>100
|
<option>100
|
||||||
|
<option>250
|
||||||
|
<option>All
|
||||||
</select>
|
</select>
|
||||||
<input type='submit' value='Search' onclick='return search_form({{deployment_id}});'/>
|
<input type='submit' value='Search' onclick='return search_form({{deployment_id}});'/>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user