perf: Account dashboard total accounts

pull/14768/head
feng 2025-01-03 18:37:43 +08:00 committed by feng626
parent 83dc15d441
commit 2273275c23
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,9 @@ class PamDashboardApi(APIView):
account_count = Account.objects.count()
privileged_account_count = Account.objects.filter(privileged=True).count()
if query_params.get('total_accounts'):
data['total_accounts'] = account_count
if query_params.get('total_privileged_accounts'):
data['total_privileged_accounts'] = privileged_account_count