feat: add manual summarizer latency probe for admin system view
This commit is contained in:
@@ -40,6 +40,13 @@ public sealed class AdminSystemController : ControllerBase
|
||||
SummarizerMetrics Summarizer
|
||||
);
|
||||
|
||||
[HttpPost("summarizer/probe")]
|
||||
public async Task<IActionResult> RunSummarizerProbe(CancellationToken cancellationToken)
|
||||
{
|
||||
await _summarizer.RunProbeAsync(cancellationToken);
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<SystemStatusDto>> Get(CancellationToken cancellationToken)
|
||||
{
|
||||
|
||||
@@ -84,10 +84,30 @@ export default function AdminSystemPage() {
|
||||
<Typography variant="h5" sx={{ fontWeight: 950 }}>System status</Typography>
|
||||
<Typography sx={{ color: "text.secondary" }}>Quick operational view of storage, email, and summarizer health.</Typography>
|
||||
</Box>
|
||||
<Box sx={{ display: "flex", gap: 1, flexWrap: "wrap" }}>
|
||||
<Button
|
||||
variant="outlined"
|
||||
onClick={async () => {
|
||||
setRunningProbe(true);
|
||||
setError(null);
|
||||
try {
|
||||
await api.post("/admin/system/summarizer/probe");
|
||||
await load();
|
||||
} catch (e: any) {
|
||||
setError(e?.response?.data || e?.message || "Failed to run summarizer probe.");
|
||||
} finally {
|
||||
setRunningProbe(false);
|
||||
}
|
||||
}}
|
||||
disabled={loading || runningProbe}
|
||||
>
|
||||
{runningProbe ? "Running probe..." : "Run probe now"}
|
||||
</Button>
|
||||
<Button variant="contained" onClick={() => void load()} disabled={loading}>
|
||||
{loading ? "Refreshing..." : "Refresh"}
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{error ? <Alert severity="error">{error}</Alert> : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user