Add organization message usage and service counts to dashboard

- Fetch organization message allowance from API endpoint
- Display messages sent, remaining, and total limit on dashboard
- Add service count statistics (total, live, trial, suspended)
- Pass message usage data to template for chart visualization
This commit is contained in:
Beverly Nguyen
2025-10-16 14:39:01 -07:00
parent 8877087c28
commit fb528f03a8
3 changed files with 32 additions and 3 deletions

View File

@@ -561,6 +561,11 @@ class ServiceAPIClient(NotifyAdminAPIClient):
url="service/get-service-message-ratio?service_id={0}".format(service_id),
)
def get_organization_message_usage(self, org_id):
return self.get(
url="/organizations/{0}/message-allowance".format(org_id),
)
service_api_client = ServiceAPIClient()