feat: host inventory (agent.inventory), host detail page, UI columns
Store hardware/software snapshots on hosts; warn on hardware changes. Host card from Hosts list. Add agent version column to Events/Overview; rename Hosts table columns and sort by status. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -160,6 +160,7 @@ export interface EventSummary {
|
||||
host_id: number;
|
||||
hostname: string;
|
||||
display_name?: string | null;
|
||||
product_version?: string | null;
|
||||
occurred_at: string;
|
||||
received_at: string;
|
||||
category: string;
|
||||
@@ -187,6 +188,7 @@ export interface HostSummary {
|
||||
hostname: string;
|
||||
display_name: string | null;
|
||||
os_family: string;
|
||||
os_version?: string | null;
|
||||
product: string;
|
||||
product_version: string | null;
|
||||
ipv4: string | null;
|
||||
@@ -194,9 +196,24 @@ export interface HostSummary {
|
||||
event_count: number | null;
|
||||
last_heartbeat_at: string | null;
|
||||
last_daily_report_at: string | null;
|
||||
last_inventory_at?: string | null;
|
||||
agent_status: "online" | "stale" | "unknown";
|
||||
}
|
||||
|
||||
export interface HostDetail extends HostSummary {
|
||||
agent_instance_id: string | null;
|
||||
ipv6: string | null;
|
||||
tags: string[] | null;
|
||||
use_sac_mode: string | null;
|
||||
inventory: Record<string, unknown> | null;
|
||||
inventory_updated_at: string | null;
|
||||
created_at: string | null;
|
||||
}
|
||||
|
||||
export function fetchHost(id: number): Promise<HostDetail> {
|
||||
return apiFetch<HostDetail>(`/api/v1/hosts/${id}`);
|
||||
}
|
||||
|
||||
export interface HostListResponse {
|
||||
items: HostSummary[];
|
||||
total: number;
|
||||
|
||||
Reference in New Issue
Block a user