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
|
SummarizerMetrics Summarizer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
[HttpPost("summarizer/probe")]
|
||||||
|
public async Task<IActionResult> RunSummarizerProbe(CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
await _summarizer.RunProbeAsync(cancellationToken);
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<ActionResult<SystemStatusDto>> Get(CancellationToken cancellationToken)
|
public async Task<ActionResult<SystemStatusDto>> Get(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -84,9 +84,29 @@ export default function AdminSystemPage() {
|
|||||||
<Typography variant="h5" sx={{ fontWeight: 950 }}>System status</Typography>
|
<Typography variant="h5" sx={{ fontWeight: 950 }}>System status</Typography>
|
||||||
<Typography sx={{ color: "text.secondary" }}>Quick operational view of storage, email, and summarizer health.</Typography>
|
<Typography sx={{ color: "text.secondary" }}>Quick operational view of storage, email, and summarizer health.</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Button variant="contained" onClick={() => void load()} disabled={loading}>
|
<Box sx={{ display: "flex", gap: 1, flexWrap: "wrap" }}>
|
||||||
{loading ? "Refreshing..." : "Refresh"}
|
<Button
|
||||||
</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>
|
</Box>
|
||||||
|
|
||||||
{error ? <Alert severity="error">{error}</Alert> : null}
|
{error ? <Alert severity="error">{error}</Alert> : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user