feat(ecoos-daemon): integrate a bundled daemon web UI with components, interfaces, styles, bundling config, and server support
This commit is contained in:
24
ecoos_daemon/ts_interfaces/display.ts
Normal file
24
ecoos_daemon/ts_interfaces/display.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Display interfaces - API contracts for display management
|
||||
*/
|
||||
|
||||
export interface IDisplayInfo {
|
||||
name: string; // e.g., "DP-1", "HDMI-A-1", "HEADLESS-1"
|
||||
make: string; // Manufacturer
|
||||
model: string; // Model name
|
||||
serial: string; // Serial number
|
||||
active: boolean; // Currently enabled
|
||||
width: number; // Resolution width
|
||||
height: number; // Resolution height
|
||||
refreshRate: number; // Hz
|
||||
isPrimary: boolean; // Has the focused window (kiosk)
|
||||
}
|
||||
|
||||
export interface IDisplaysResponse {
|
||||
displays: IDisplayInfo[];
|
||||
}
|
||||
|
||||
export interface IDisplayActionResult {
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
7
ecoos_daemon/ts_interfaces/index.ts
Normal file
7
ecoos_daemon/ts_interfaces/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Re-export all interfaces
|
||||
*/
|
||||
|
||||
export * from './status.ts';
|
||||
export * from './display.ts';
|
||||
export * from './updates.ts';
|
||||
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[];
|
||||
}
|
||||
32
ecoos_daemon/ts_interfaces/updates.ts
Normal file
32
ecoos_daemon/ts_interfaces/updates.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Update interfaces - API contracts for update/upgrade system
|
||||
*/
|
||||
|
||||
export interface IRelease {
|
||||
version: string;
|
||||
tagName: string;
|
||||
publishedAt: Date;
|
||||
downloadUrl: string;
|
||||
isCurrent: boolean;
|
||||
isNewer: boolean;
|
||||
ageHours: number;
|
||||
}
|
||||
|
||||
export interface IAutoUpgradeStatus {
|
||||
enabled: boolean;
|
||||
targetVersion: string | null;
|
||||
scheduledIn: string | null;
|
||||
waitingForStability: boolean;
|
||||
}
|
||||
|
||||
export interface IUpdateInfo {
|
||||
currentVersion: string;
|
||||
releases: IRelease[];
|
||||
autoUpgrade: IAutoUpgradeStatus;
|
||||
lastCheck: string | null;
|
||||
}
|
||||
|
||||
export interface IUpgradeResult {
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
Reference in New Issue
Block a user