fix: fetch actual agent/environment counts from server for tenant dashboard
All checks were successful
CI / build (push) Successful in 1m8s
CI / docker (push) Successful in 43s

The dashboard was showing hardcoded zeroes for agent and environment usage.
Now fetches real counts via M2M API from the tenant's server.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-10 20:35:24 +02:00
parent cab6e409b9
commit a5445e332e
5 changed files with 51 additions and 5 deletions

View File

@@ -54,9 +54,8 @@ export function TenantDashboardPage() {
const agentLimit = data.limits?.['agents'] ?? -1;
const envLimit = data.limits?.['environments'] ?? -1;
// Dashboard doesn't expose usage counts directly — show limit info from license
const agentUsed = 0;
const envUsed = 0;
const agentUsed = data.agentCount ?? 0;
const envUsed = data.environmentCount ?? 0;
return (
<div style={{ padding: 24, display: 'flex', flexDirection: 'column', gap: 20 }}>

View File

@@ -72,6 +72,8 @@ export interface DashboardData {
licenseDaysRemaining: number;
limits: Record<string, number>;
features: Record<string, boolean>;
agentCount: number;
environmentCount: number;
}
export interface TenantLicenseData {