diff --git a/api/tacticalrmm/logs/views.py b/api/tacticalrmm/logs/views.py index 5bb74ae7..745d36b3 100644 --- a/api/tacticalrmm/logs/views.py +++ b/api/tacticalrmm/logs/views.py @@ -109,7 +109,6 @@ class FilterOptionsAuditLog(APIView): class PendingActions(APIView): def patch(self, request): status_filter = "completed" if request.data["showCompleted"] else "pending" - completed = PendingAction.objects.filter(status="completed").count() if "agentPK" in request.data.keys(): actions = PendingAction.objects.filter( agent__pk=request.data["agentPK"], status=status_filter @@ -122,7 +121,8 @@ class PendingActions(APIView): ret = { "actions": PendingActionSerializer(actions, many=True).data, - "completed_count": completed, + "completed_count": PendingAction.objects.filter(status="completed").count(), + "total": PendingAction.objects.count(), } return Response(ret) diff --git a/web/src/components/modals/logs/PendingActions.vue b/web/src/components/modals/logs/PendingActions.vue index a64896a0..61658633 100644 --- a/web/src/components/modals/logs/PendingActions.vue +++ b/web/src/components/modals/logs/PendingActions.vue @@ -6,7 +6,7 @@ -
+
{ + this.totalCount = r.data.total; this.completedCount = r.data.completed_count; this.actions = Object.freeze(r.data.actions); if (!!this.agentpk) this.hostname = r.data.actions[0].hostname;