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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user