feat: host display_name в ingest, поиск хостов, UI и docs

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
PTah
2026-05-28 11:49:10 +10:00
parent 108e1756c4
commit d4bf6e536c
8 changed files with 122 additions and 11 deletions
+3 -2
View File
@@ -34,8 +34,9 @@ def list_hosts(
count_stmt = count_stmt.where(Host.product == product)
if hostname:
like = f"%{hostname}%"
stmt = stmt.where(Host.hostname.ilike(like))
count_stmt = count_stmt.where(Host.hostname.ilike(like))
host_match = Host.hostname.ilike(like) | Host.display_name.ilike(like)
stmt = stmt.where(host_match)
count_stmt = count_stmt.where(host_match)
total = db.scalar(count_stmt) or 0
rows = db.scalars(