feat(ecoos-daemon): integrate a bundled daemon web UI with components, interfaces, styles, bundling config, and server support
This commit is contained in:
81
ecoos_daemon/ts_interfaces/status.ts
Normal file
81
ecoos_daemon/ts_interfaces/status.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Status interfaces - API contracts for system status data
|
||||
*/
|
||||
|
||||
export type TServiceState = 'stopped' | 'starting' | 'running' | 'failed';
|
||||
|
||||
export interface IServiceStatus {
|
||||
state: TServiceState;
|
||||
error?: string;
|
||||
lastAttempt?: string;
|
||||
}
|
||||
|
||||
export interface ICpuInfo {
|
||||
model: string;
|
||||
cores: number;
|
||||
usage: number;
|
||||
}
|
||||
|
||||
export interface IMemoryInfo {
|
||||
total: number;
|
||||
used: number;
|
||||
free: number;
|
||||
usagePercent: number;
|
||||
}
|
||||
|
||||
export interface IDiskInfo {
|
||||
device: string;
|
||||
mountpoint: string;
|
||||
total: number;
|
||||
used: number;
|
||||
free: number;
|
||||
usagePercent: number;
|
||||
}
|
||||
|
||||
export interface INetworkInterface {
|
||||
name: string;
|
||||
ip: string;
|
||||
mac: string;
|
||||
state: 'up' | 'down';
|
||||
}
|
||||
|
||||
export interface IGpuInfo {
|
||||
name: string;
|
||||
driver: string;
|
||||
}
|
||||
|
||||
export interface IInputDevice {
|
||||
name: string;
|
||||
type: 'keyboard' | 'mouse' | 'touchpad' | 'other';
|
||||
path: string;
|
||||
}
|
||||
|
||||
export interface IAudioDevice {
|
||||
name: string;
|
||||
description: string;
|
||||
isDefault: boolean;
|
||||
}
|
||||
|
||||
export interface ISystemInfo {
|
||||
hostname: string;
|
||||
cpu: ICpuInfo;
|
||||
memory: IMemoryInfo;
|
||||
disks: IDiskInfo[];
|
||||
network: INetworkInterface[];
|
||||
gpu: IGpuInfo[];
|
||||
uptime: number;
|
||||
inputDevices: IInputDevice[];
|
||||
speakers: IAudioDevice[];
|
||||
microphones: IAudioDevice[];
|
||||
}
|
||||
|
||||
export interface IStatus {
|
||||
version: string;
|
||||
sway: boolean;
|
||||
swayStatus: IServiceStatus;
|
||||
chromium: boolean;
|
||||
chromiumStatus: IServiceStatus;
|
||||
systemInfo: ISystemInfo;
|
||||
logs: string[];
|
||||
systemLogs: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user