Include host_name in UME NE keyword search

Extend GET /v1/ume/inventory/ne keyword filter with host_name; update Web placeholder.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-11 17:27:25 +08:00
parent 68c622979b
commit c5f82f512d
2 changed files with 2 additions and 1 deletions

View file

@ -553,6 +553,7 @@ def ume_list_ne(
| UmeInventoryNE.ne_name.contains(kw)
| UmeInventoryNE.user_label.contains(kw)
| UmeInventoryNE.ip_address.contains(kw)
| UmeInventoryNE.host_name.contains(kw)
)
total = int(stmt.count())
rows = stmt.order_by(UmeInventoryNE.ne_id.asc()).offset((page - 1) * page_size).limit(page_size).all()

View file

@ -303,7 +303,7 @@ export function UmePage() {
<section className="panel">
<h2>网元清单</h2>
<div className="filter-inline">
<input value={neKeyword} placeholder="keyword(ne_id/ne_name/user_label/ip)" onChange={(e) => setNeKeyword(e.target.value)} />
<input value={neKeyword} placeholder="keyword(ne_id/ne_name/user_label/ip/host_name)" onChange={(e) => setNeKeyword(e.target.value)} />
<button onClick={() => queryClient.invalidateQueries({ queryKey: ["umeNE"] })}>查询</button>
</div>
<table>