Show the strategy of each catch in the dashboard
Build and deploy / build (push) Successful in 1m31s
Build and deploy / deploy (push) Successful in 30s

Add a Strategie column to the catch list (searchable, filterable) and a
Strategien tab to the Top 10 card. The MCP top tool accepts strategies.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Sonnet 5.5 committed 2026-11-16 23:34:10 +01:00
1 parent 7d3e6f8842
commit b7027e2a72
15 files changed
+83 -24

No files matched your search

@@ -42,6 +42,7 @@ public sealed class DashboardQueries(IDbContextFactory<FlypaperDbContext> dbCont
TimeSpan.FromMilliseconds(await catches.SumAsync(e => e.DurationMs, ct)),
await TopAsync(catches.GroupBy(e => e.RemoteIp), ct),
await TopAsync(catches.Where(e => e.Target != null).GroupBy(e => e.Target!), ct),
await TopAsync(catches.GroupBy(e => e.Strategy), ct),
countries
.Take(TopCount)
.Select(x => new TopEntry(x.Key, x.Count, TimeSpan.FromMilliseconds(x.DurationMs), x.Name))
@@ -104,6 +105,11 @@ public sealed class DashboardQueries(IDbContextFactory<FlypaperDbContext> dbCont
events = events.Where(e => e.Target == target);
}
if (filter.Strategy is { } strategy)
{
events = events.Where(e => e.Strategy == strategy);
}
if (!string.IsNullOrWhiteSpace(filter.Search))
{
var pattern = $"%{filter.Search.Trim().Replace("\\", "\\\\").Replace("%", "\\%").Replace("_", "\\_")}%";
@@ -111,6 +117,7 @@ public sealed class DashboardQueries(IDbContextFactory<FlypaperDbContext> dbCont
EF.Functions.Like(e.RemoteIp, pattern, "\\")
|| EF.Functions.Like(e.Provider!, pattern, "\\")
|| EF.Functions.Like(e.Target!, pattern, "\\")
|| EF.Functions.Like(e.Strategy, pattern, "\\")
|| EF.Functions.Like(e.ClientInfo!, pattern, "\\"));
}