Skip to content

Commit

Permalink
Merge pull request #1279 from GSA/dashboard_bug
Browse files Browse the repository at this point in the history
dashboard bug
  • Loading branch information
ccostino authored Mar 7, 2024
2 parents 0af4545 + 2be3db1 commit 7e2977f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/main/views/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,16 @@ def get_status_filters(service, message_type, statistics):
}
else:
stats = statistics[message_type]
stats["sending"] = stats["requested"] - stats["delivered"] - stats["failed"]

if stats.get("failure") is not None:
stats["failed"] = stats["failure"]

stats["pending"] = stats["requested"] - stats["delivered"] - stats["failed"]

filters = [
# key, label, option
("requested", "total", "sending,delivered,failed"),
("sending", "pending", "pending"),
("pending", "pending", "pending"),
("delivered", "delivered", "delivered"),
("failed", "failed", "failed"),
]
Expand All @@ -296,7 +300,7 @@ def get_status_filters(service, message_type, statistics):
message_type=message_type,
status=option,
),
stats[key],
stats.get(key),
)
for key, label, option in filters
]
Expand Down

0 comments on commit 7e2977f

Please sign in to comment.