This commit is contained in:
RGJorge
2026-03-22 09:53:08 +00:00
commit 8703f28856
31 changed files with 4543 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
export interface Service {
id: string;
uid: string;
name: string;
image: string;
state: "running" | "exited" | "paused" | "restarting" | "dead";
status: string;
ports: { host: number; container: number }[];
networks: string[];
project: string;
compose_file: string;
}
export interface Connection {
from: string;
to: string;
network: string;
type?: string;
label?: string;
}
export interface Stats {
service: string;
cpu: number;
mem_mb: number;
mem_percent: number;
}
export interface DockerEvent {
type: "docker";
action: string;
service: string;
time: number;
}
export interface LogLine {
container: string;
line: string;
timestamp: string;
stream: "stdout" | "stderr";
}
export type WSMessage =
| { type: "services"; data: Service[] }
| { type: "connections"; data: Connection[] }
| { type: "stats"; data: Stats[] }
| { type: "docker_event"; data: DockerEvent }
| { type: "subscribe_logs"; container: string }
| { type: "unsubscribe_logs" }
| { type: "log_line"; data: LogLine };