import { Box, Braces, CircleStop, Play, RadioTower, RefreshCw, RotateCcw, Search, SquareTerminal, } from "lucide-solid"; import { For, Show } from "solid-js"; import { serviceKey, type Service } from "../../lib/model"; import type { HostSharedState, PageCommand } from "../../sdk/protocol"; import { EmptyState } from "./empty-state"; import { StatusBadge } from "./status-badge"; export function ServiceTable(props: { services: Service[]; state: HostSharedState; command: (command: PageCommand) => void; compact?: boolean; }) { return ( 0} fallback={ } >
{(service) => { const key = serviceKey(service); return ( ); }}
服务 状态 制品 Host 能力 调用 延迟 操作
{service.id} 对外 {service.revision}
{service.artifact} 0} fallback={} > capability.interface) .join("\n")} > {service.capabilities[0]?.package}/{service.capabilities[0]?.name} 1}> +{service.capabilities.length - 1} {service.calls.toLocaleString("zh-CN")} {service.latencyMs === null ? "—" : `${service.latencyMs} ms`}
props.command({ type: "service-action", serviceKey: key, action: "start", }) } > } >
); }