refactor(diag-info): make all fields optional

This commit is contained in:
yangsy
2025-11-14 16:06:24 +08:00
parent 8a38da53d7
commit 1ed091f54d
12 changed files with 69 additions and 68 deletions

View File

@@ -1,5 +1,5 @@
export interface NdmCameraDiagInfo {
[key: string]: any;
logTime: string;
info: string;
logTime?: string;
info?: string;
}

View File

@@ -1,14 +1,14 @@
export interface NdmDecoderDiagInfo {
[key: string]: any;
logTime: string;
stCommonInfo: {
设备ID: string;
软件版本: string;
生产厂商: string;
设备别名: string;
设备型号: string;
硬件版本: string;
内存使用率: string;
CPU使用率: string;
logTime?: string;
stCommonInfo?: {
设备ID?: string;
软件版本?: string;
生产厂商?: string;
设备别名?: string;
设备型号?: string;
硬件版本?: string;
内存使用率?: string;
CPU使用率?: string;
};
}

View File

@@ -1,31 +1,31 @@
export interface NdmNvrDiagInfo {
[key: string]: any;
logTime: string;
info: {
diskHealth: number[];
groupInfoList: {
freeSize: number;
state: number;
stateValue: string;
totalSize: number;
logTime?: string;
info?: {
diskHealth?: number[];
groupInfoList?: {
freeSize?: number;
state?: number;
stateValue?: string;
totalSize?: number;
}[];
};
stCommonInfo: {
设备ID: string;
软件版本: string;
生产厂商: string;
设备别名: string;
设备型号: string;
硬件版本: string;
内存使用率: string;
CPU使用率: string;
stCommonInfo?: {
设备ID?: string;
软件版本?: string;
生产厂商?: string;
设备别名?: string;
设备型号?: string;
硬件版本?: string;
内存使用率?: string;
CPU使用率?: string;
};
cdFanInfo: {
索引号: string;
'风扇转速(rpm)': string;
cdFanInfo?: {
索引号?: string;
'风扇转速(rpm)'?: string;
}[];
cdPowerSupplyInfo: {
索引号: string;
电源状态: string;
cdPowerSupplyInfo?: {
索引号?: string;
电源状态?: string;
}[];
}

View File

@@ -18,7 +18,7 @@ export interface NdmSecurityBoxDiagInfo {
}
export interface NdmSecurityBoxCircuit {
current?: number;
status?: number;
voltage?: number;
current: number;
status: number;
voltage: number;
}

View File

@@ -1,9 +1,9 @@
export interface NdmServerDiagInfo {
[key: string]: any;
commInfo: {
CPU使用率: string;
内存使用率: string;
磁盘使用率: string;
系统运行时间: string;
commInfo?: {
CPU使用率?: string;
内存使用率?: string;
磁盘使用率?: string;
系统运行时间?: string;
};
}

View File

@@ -2,10 +2,10 @@ export interface NdmSwitchDiagInfo {
[key: string]: any;
cpuRatio?: string; // 因环境不同可能不存在
memoryRatio?: string; // 因环境不同可能不存在
logTime: string;
info: {
overFlowPorts: string[];
portInfoList: NdmSwitchPortInfo[];
logTime?: string;
info?: {
overFlowPorts?: string[];
portInfoList?: NdmSwitchPortInfo[];
};
}