mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
introduce system status in WebUI for easier monitoring of tasks
This commit is contained in:
@@ -2,6 +2,17 @@ import type { busConnectionStatus } from 'app/main/types';
|
||||
|
||||
import type { NetworkConnectionStatus } from './network';
|
||||
|
||||
export enum SystemStatusCodes {
|
||||
SYSTEM_STATUS_NORMAL = 0,
|
||||
SYSTEM_STATUS_PENDING_UPLOAD = 1,
|
||||
SYSTEM_STATUS_UPLOADING = 2,
|
||||
SYSTEM_STATUS_ERROR_UPLOAD = 3,
|
||||
SYSTEM_STATUS_RESTARTING = 4,
|
||||
SYSTEM_STATUS_ERROR = 5,
|
||||
SYSTEM_STATUS_PENDING_RESTART = 6,
|
||||
SYSTEM_STATUS_RESTART_REQUESTED = 7
|
||||
}
|
||||
|
||||
export interface SystemStatus {
|
||||
emsesp_version: string;
|
||||
bus_status: busConnectionStatus;
|
||||
@@ -41,7 +52,7 @@ export interface SystemStatus {
|
||||
model: string;
|
||||
has_loader: boolean;
|
||||
has_partition: boolean;
|
||||
status: string;
|
||||
status: number; // SystemStatusCodes which matches SYSTEM_STATUS in System.h
|
||||
temperature?: number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user