refactor:
- extend NdmDeviceAlarmLogVO - only query alarm counts - separate request and store update in useQuery - refactor station card and alarm modal, data fetching is now inside modal - optimize device tree - optimize query station list - make export size follow page size - fix query sequence and make them follow stations -> devices -> alarms
This commit is contained in:
@@ -26,3 +26,4 @@ export * from './video/ndm-video-server';
|
||||
export type NdmDeviceVO = NdmSecurityBoxVO | NdmSwitchVO | NdmNvrVO | NdmCameraVO | NdmDecoderVO | NdmKeyboardVO | NdmMediaServerVO | NdmVideoServerVO;
|
||||
export type NdmDeviceResultVO = Partial<NdmDeviceVO>;
|
||||
export type NdmServerVO = NdmMediaServerVO | NdmVideoServerVO;
|
||||
export type NdmServerResultVO = Partial<NdmServerVO>;
|
||||
|
||||
@@ -15,6 +15,7 @@ export interface NdmDeviceAlarmLogVO extends BaseModel {
|
||||
impactService: string;
|
||||
alarmType: string;
|
||||
deviceType: string;
|
||||
stationCode: string;
|
||||
}
|
||||
|
||||
export type NdmDeviceAlarmLogResultVO = Partial<NdmDeviceAlarmLogVO>;
|
||||
|
||||
@@ -8,3 +8,20 @@ export const ndmVerify = async (stationCode: string, signal?: AbortSignal) => {
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
export interface BatchVerify {
|
||||
name: string;
|
||||
ipAddress: string;
|
||||
stationCode: string;
|
||||
verifyUrl: string;
|
||||
onlineState: boolean;
|
||||
}
|
||||
|
||||
export const batchVerify = async (signal?: AbortSignal) => {
|
||||
const resp = await ndmClient.post<BatchVerify[]>('/api/ndm/ndmKeepAlive/batchVerify', {}, { retRaw: true, timeout: 5000, signal });
|
||||
const [err, list] = resp;
|
||||
if (err || !list) {
|
||||
throw err;
|
||||
}
|
||||
return list;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user