- {/* Plan Badge */}
- {usagePlan && (
+ {/* Plan Badge — the caller's own plan, absent in another tenant's view */}
+ {!tenantView && usagePlan && (
Plan: {usagePlan}
)}
- {!usagePlan && (
+ {!tenantView && !usagePlan && (
Plan: {effectivePlan ? `${effectivePlan} (inherited)` : "inherited"}
@@ -385,7 +391,7 @@ export function SectionMcpUsage() {
)}
{/* Empty State */}
- {!loading && records.length === 0 && !error && (
+ {!loading && dailyAggregates.length === 0 && !error && (
No usage data found for the selected period.
diff --git a/src/Web/autopilot-monitor-web/utils/shared-manifests.json b/src/Web/autopilot-monitor-web/utils/shared-manifests.json
index 4f49a8c1..d3cb1496 100644
--- a/src/Web/autopilot-monitor-web/utils/shared-manifests.json
+++ b/src/Web/autopilot-monitor-web/utils/shared-manifests.json
@@ -9587,6 +9587,17 @@
"name": "McpOrganizationQuotaNode"
},
"doc": "The tenant's organization windows (plan, limits, today / this month) from the same counters."
+ },
+ {
+ "name": "daily",
+ "type": {
+ "kind": "array",
+ "element": {
+ "kind": "ref",
+ "name": "McpOrganizationDailyItem"
+ }
+ },
+ "doc": "Requests charged to the tenant per day inside the range, oldest first; days without requests are absent."
}
]
},
@@ -13334,6 +13345,27 @@
}
]
},
+ "McpOrganizationDailyItem": {
+ "kind": "object",
+ "doc": "One day of the tenant's organization budget, nested in GetMcpOrganizationUsageResponse.",
+ "fields": [
+ {
+ "name": "date",
+ "type": {
+ "kind": "primitive",
+ "name": "string"
+ },
+ "doc": "yyyyMMdd."
+ },
+ {
+ "name": "requests",
+ "type": {
+ "kind": "primitive",
+ "name": "number"
+ }
+ }
+ ]
+ },
"McpOrganizationQuotaNode": {
"kind": "object",
"doc": "The organization-wide windows of the tenant in GetMcpOrganizationUsageResponse: its tenant plan (tenant-wide override, else edition) with the limits (0 = unlimited) and the counters over every account charged to the tenant.",
diff --git a/src/Web/autopilot-monitor-web/utils/wire-types.generated.ts b/src/Web/autopilot-monitor-web/utils/wire-types.generated.ts
index 20b0363c..b6088a93 100644
--- a/src/Web/autopilot-monitor-web/utils/wire-types.generated.ts
+++ b/src/Web/autopilot-monitor-web/utils/wire-types.generated.ts
@@ -2023,6 +2023,8 @@ export interface GetMcpOrganizationUsageResponse {
users: McpOrganizationUsageItem[];
/** The tenant's organization windows (plan, limits, today / this month) from the same counters. */
quota: McpOrganizationQuotaNode;
+ /** Requests charged to the tenant per day inside the range, oldest first; days without requests are absent. */
+ daily: McpOrganizationDailyItem[];
}
/** Per-user MCP/API usage envelope (GetMcpUserUsage). Non-global callers only receive the records attributed to their own tenant; a foreign oid and an unknown oid are indistinguishable (both 200 with empty records). The MCP server paginates over the records key — its name is wire-critical. */
@@ -2824,6 +2826,13 @@ export interface McpHealthCheckResponse {
check: HealthCheck;
}
+/** One day of the tenant's organization budget, nested in GetMcpOrganizationUsageResponse. */
+export interface McpOrganizationDailyItem {
+ /** yyyyMMdd. */
+ date: string;
+ requests: number;
+}
+
/** The organization-wide windows of the tenant in GetMcpOrganizationUsageResponse: its tenant plan (tenant-wide override, else edition) with the limits (0 = unlimited) and the counters over every account charged to the tenant. */
export interface McpOrganizationQuotaNode {
tenantPlan: string;