feat: add filtering to all entity list pages

- Tracking configs: filter by name + provider type
- Template configs: filter by name + provider type
- Command configs: filter by name + provider type
- Notification trackers: filter by name + provider
- Command trackers: filter by name + provider
- Targets: filter by name (type filtering already existed)
- Nav badge counts include system-owned entities (user_id=0)
- Shows "no items match filter" vs "no items yet" empty states
This commit is contained in:
2026-03-22 20:22:53 +03:00
parent 63437c1841
commit 7cbba9d3fd
9 changed files with 165 additions and 17 deletions
@@ -132,10 +132,12 @@ async def get_nav_counts(
)).one()
counts[key] = count
# System-owned templates (user_id=0) count as well
# System-owned entities (user_id=0) count as well
for model, key in [
(TemplateConfig, "template_configs"),
(CommandTemplateConfig, "command_template_configs"),
(TrackingConfig, "tracking_configs"),
(CommandConfig, "command_configs"),
]:
system_count = (await session.exec(
select(func.count()).select_from(model).where(model.user_id == 0)