Tweaking count selections, adding all option

This commit is contained in:
Andrew Melton 2013-04-10 14:59:03 -04:00
parent 53f9aef519
commit e564e2545b
2 changed files with 6 additions and 4 deletions

View File

@ -476,7 +476,9 @@ def search(request, deployment_id):
rows = rows.filter(**{column: value})
if not updates:
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)
c['rows'] = rows
c['allow_expansion'] = True

View File

@ -61,10 +61,10 @@ function search_form(deployment_id)
<input type='text' id='query' size='60' value=''/>
Include Updates: <input type='checkbox' id="updates" checked />
<select id='count'>
<option>10
<option selected>20
<option>50
<option selected>25
<option>100
<option>250
<option>All
</select>
<input type='submit' value='Search' onclick='return search_form({{deployment_id}});'/>
</form>