Plain text instead of JSON
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s

This commit is contained in:
2025-08-21 15:13:18 +02:00
parent 85cf55f878
commit c62dc22245

View File

@@ -1,3 +1,4 @@
using System.Text;
using System.Text.Json; using System.Text.Json;
using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.Cookies;
@@ -404,12 +405,17 @@ app.MapGet("/Status", async ([FromServices] ILogger<Configurator> logger, [FromS
string response = await responseMessage.Content.ReadAsStringAsync(); string response = await responseMessage.Content.ReadAsStringAsync();
logger.LogInformation("Telemetry errors: {response}", response); logger.LogInformation("Telemetry errors: {response}", response);
return Results.Ok(JsonSerializer.Serialize(new StringBuilder sb = new StringBuilder();
{ sb.AppendLine("Fleet status:");
FleetStatus = statusResponseContent, sb.AppendLine(statusResponseContent);
TelemetryConfig = rsp, sb.AppendLine();
TelemetryErrors = response sb.AppendLine("Telemetry config:");
})); sb.AppendLine(rsp);
sb.AppendLine();
sb.AppendLine("Telemetry errors:");
sb.AppendLine(response);
return Results.Ok(sb.ToString());
}); });
//Map static assets //Map static assets