feat(ui): live host row update via SSE without full reload
On new ingest, patch visible host from GET /hosts/{id}; SAC 0.8.1.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { HostDetail, HostSummary } from "../api";
|
||||
|
||||
/** Обновляет поля строки списка хостов из GET /hosts/{id} (без перезагрузки таблицы). */
|
||||
export function patchHostSummaryFromDetail(target: HostSummary, detail: HostDetail): void {
|
||||
target.display_name = detail.display_name;
|
||||
target.os_version = detail.os_version;
|
||||
target.product_version = detail.product_version;
|
||||
target.ipv4 = detail.ipv4;
|
||||
target.last_seen_at = detail.last_seen_at;
|
||||
target.event_count = detail.event_count;
|
||||
target.last_heartbeat_at = detail.last_heartbeat_at;
|
||||
target.last_daily_report_at = detail.last_daily_report_at;
|
||||
target.last_inventory_at = detail.last_inventory_at;
|
||||
target.agent_status = detail.agent_status;
|
||||
}
|
||||
Reference in New Issue
Block a user