UME current alarms UI: ne_id, host_name, ne_type; drop object_name/user_label columns

API /v1/ume/alarms adds host_name and ne_type from inventory join; keyword matches host_name.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-11 19:00:21 +08:00
parent c06beecfe6
commit ca12d66419
3 changed files with 17 additions and 6 deletions

View file

@ -405,7 +405,11 @@ export function UmePage() {
<section className="panel">
<h2>当前告警</h2>
<div className="filter-inline">
<input value={curKeyword} placeholder="keyword" onChange={(e) => setCurKeyword(e.target.value)} />
<input
value={curKeyword}
placeholder="keyword(告警键/原因/ne_name/host_name/ip 等)"
onChange={(e) => setCurKeyword(e.target.value)}
/>
<input value={curNeId} placeholder="ne_id" onChange={(e) => setCurNeId(e.target.value)} />
<select value={curSeverity} onChange={(e) => setCurSeverity(e.target.value)}>
<option value="">全部级别</option>
@ -426,8 +430,9 @@ export function UmePage() {
<tr>
<th>time_created</th>
<th>severity</th>
<th>user_label</th>
<th>object_name</th>
<th>ne_id</th>
<th>host_name</th>
<th>ne_type</th>
<th>cause</th>
</tr>
</thead>
@ -441,14 +446,15 @@ export function UmePage() {
className="link-btn"
onClick={() => {
setCurNeId(x.ne_id || "");
setCurKeyword(x.user_label || x.ne_name || x.ne_id || "");
setCurKeyword(x.ne_name || x.host_name || x.native_probable_cause || "");
setCurPage(1);
}}
>
{x.user_label || x.ne_name || x.ne_id}
{x.ne_id}
</button>
</td>
<td>{x.object_name}</td>
<td>{x.host_name ?? ""}</td>
<td>{x.ne_type ?? ""}</td>
<td>{x.native_probable_cause}</td>
</tr>
))}

View file

@ -133,6 +133,8 @@ export type UmeAlarmItem = {
ne_id: string;
ne_name: string;
user_label: string;
host_name?: string;
ne_type?: string;
object_name: string;
event_type: string;
native_probable_cause: string;