From e564e2545b424852c69e2ae934aa1e6cce4becd3 Mon Sep 17 00:00:00 2001 From: Andrew Melton Date: Wed, 10 Apr 2013 14:59:03 -0400 Subject: [PATCH] Tweaking count selections, adding all option --- stacktach/views.py | 4 +++- templates/index.html | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/stacktach/views.py b/stacktach/views.py index ef81716..96c0712 100644 --- a/stacktach/views.py +++ b/stacktach/views.py @@ -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 diff --git a/templates/index.html b/templates/index.html index 65a20ea..2b84856 100644 --- a/templates/index.html +++ b/templates/index.html @@ -61,10 +61,10 @@ function search_form(deployment_id) Include Updates: