Merge pull request #154 from alphagov/jobs-on-dashboard

Limit number of jobs on dashboard to 5
This commit is contained in:
Adam Shimali
2016-02-05 11:22:17 +00:00
4 changed files with 17 additions and 7 deletions

View File

@@ -28,7 +28,8 @@ def service_dashboard(service_id):
raise e
return render_template(
'views/service_dashboard.html',
jobs=list(reversed(jobs)),
jobs=list(reversed(jobs))[:5],
more_jobs_to_show=(len(jobs) > 5),
free_text_messages_remaining='250,000',
spent_this_month='0.00',
template_count=len(templates),