From 98cb95b510da70e5f21240da66733f233fedb249 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 20 Nov 2013 15:56:29 -0500 Subject: [PATCH] Add organizations counts to the api dashboard view --- awx/api/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/api/views.py b/awx/api/views.py index 8586986818..1b297e7c59 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -222,8 +222,11 @@ class DashboardView(APIView): team_list = get_user_queryset(request.user, Team) credential_list = get_user_queryset(request.user, Credential) job_template_list = get_user_queryset(request.user, JobTemplate) + organization_list = get_user_queryset(request.user, Organization) data['users'] = {'url': reverse('api:user_list'), 'total': user_list.count()} + data['organizations'] = {'url': reverse('api:organization_list'), + 'total': organization_list.count()} data['team'] = {'url': reverse('api:team_list'), 'total': team_list.count()} data['credentials'] = {'url': reverse('api:credential_list'),