diff --git a/passbook/admin/templates/administration/overview.html b/passbook/admin/templates/administration/overview.html index c0a75ae1a..3c7911424 100644 --- a/passbook/admin/templates/administration/overview.html +++ b/passbook/admin/templates/administration/overview.html @@ -54,7 +54,11 @@

- {{ provider_count }} + {% if providers_without_application.exists %} + {{ provider_count }} + {% else %} + {{ provider_count }} + {% endif %}

@@ -168,7 +172,12 @@

+ {% if worker_count < 1%} + {{ worker_count }} + {% else %} {{ worker_count }} + {% endif %}

diff --git a/passbook/admin/views/overview.py b/passbook/admin/views/overview.py index 4bb524a8c..ce32338a7 100644 --- a/passbook/admin/views/overview.py +++ b/passbook/admin/views/overview.py @@ -23,4 +23,5 @@ class AdministrationOverviewView(AdminRequiredMixin, TemplateView): kwargs['invitation_count'] = len(Invitation.objects.all()) kwargs['version'] = __version__ kwargs['worker_count'] = len(CELERY_APP.control.ping(timeout=0.5)) + kwargs['providers_without_application'] = Provider.objects.filter(application=None) return super().get_context_data(**kwargs)