diff --git a/src/Agent/AutopilotMonitor.Agent.V2/buildcounter.txt b/src/Agent/AutopilotMonitor.Agent.V2/buildcounter.txt index eddc1112..109144d2 100644 --- a/src/Agent/AutopilotMonitor.Agent.V2/buildcounter.txt +++ b/src/Agent/AutopilotMonitor.Agent.V2/buildcounter.txt @@ -1 +1 @@ -652 +653 diff --git a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt index b12a46db..b151ec96 100644 --- a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt +++ b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt @@ -1 +1 @@ -1285 +1286 diff --git a/src/Backend/AutopilotMonitor.Functions/Functions/Infrastructure/HealthCheckFunction.cs b/src/Backend/AutopilotMonitor.Functions/Functions/Infrastructure/HealthCheckFunction.cs index 85199df1..a5a16d23 100644 --- a/src/Backend/AutopilotMonitor.Functions/Functions/Infrastructure/HealthCheckFunction.cs +++ b/src/Backend/AutopilotMonitor.Functions/Functions/Infrastructure/HealthCheckFunction.cs @@ -1,4 +1,5 @@ using System.Net; +using AutopilotMonitor.Functions.Helpers; using AutopilotMonitor.Functions.Services; using Microsoft.Azure.Functions.Worker; using Microsoft.Azure.Functions.Worker.Http; @@ -99,6 +100,14 @@ namespace AutopilotMonitor.Functions.Functions.Infrastructure // Perform comprehensive health checks var healthCheckResult = await _healthCheckService.PerformAllChecksAsync(); + // SignalR Quota check exposes the subscription/resource-group path of the + // backing SignalR resource — restrict to Global Admins. Non-GA callers + // (Tenant Admins, Operators) get the rest of the report unchanged. + var requestCtx = context.GetRequestContext(); + var visibleChecks = requestCtx.IsGlobalAdmin + ? healthCheckResult.Checks + : healthCheckResult.Checks.Where(c => c.Name != "SignalR Quota").ToList(); + // Always return 200 OK with the health status in the body // This allows the frontend to properly display the results even if some checks fail var response = req.CreateResponse(HttpStatusCode.OK); @@ -107,7 +116,7 @@ namespace AutopilotMonitor.Functions.Functions.Infrastructure service = "Autopilot Monitor API", timestamp = healthCheckResult.Timestamp, overallStatus = healthCheckResult.OverallStatus, - checks = healthCheckResult.Checks, + checks = visibleChecks, version = _buildInfo.Version, commitHash = _buildInfo.CommitHash, buildUtc = _buildInfo.BuildUtc diff --git a/src/Web/autopilot-monitor-web/app/health-check/page.tsx b/src/Web/autopilot-monitor-web/app/health-check/page.tsx index 1fcfd1a3..8a0d865c 100644 --- a/src/Web/autopilot-monitor-web/app/health-check/page.tsx +++ b/src/Web/autopilot-monitor-web/app/health-check/page.tsx @@ -346,14 +346,24 @@ export default function HealthCheckPage() {

Details

- {Object.entries(check.details).map(([key, value]) => ( -
-
{key}
-
- {Array.isArray(value) ? value.join(', ') : typeof value === 'object' ? JSON.stringify(value) : String(value)} -
-
- ))} + {Object.entries(check.details).map(([key, value]) => { + const isResourceId = key === 'Resource' && typeof value === 'string' && value.startsWith('/subscriptions/'); + return ( +
+
{key}
+
+ {isResourceId ? ( + + Set + + ) : Array.isArray(value) ? value.join(', ') : typeof value === 'object' ? JSON.stringify(value) : String(value)} +
+
+ ); + })}
)}