|
|
|
@ -1,4 +1,5 @@
|
|
|
|
// Copyright (C) 2020-2022 Intel Corporation
|
|
|
|
// Copyright (C) 2020-2022 Intel Corporation
|
|
|
|
|
|
|
|
// Copyright (C) 2022 CVAT.ai Corporation
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
|
|
|
|
@ -17,23 +18,19 @@ export enum BoundariesActionTypes {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export const boundariesActions = {
|
|
|
|
export const boundariesActions = {
|
|
|
|
resetAfterError: (
|
|
|
|
resetAfterError: (payload?: {
|
|
|
|
job: any,
|
|
|
|
job: any;
|
|
|
|
states: any[],
|
|
|
|
states: any[];
|
|
|
|
frameNumber: number,
|
|
|
|
openTime: number;
|
|
|
|
frameData: any | null,
|
|
|
|
frameNumber: number;
|
|
|
|
minZ: number,
|
|
|
|
frameFilename: string;
|
|
|
|
maxZ: number,
|
|
|
|
frameHasRelatedContext: boolean;
|
|
|
|
colors: string[],
|
|
|
|
colors: string[];
|
|
|
|
) => createAction(BoundariesActionTypes.RESET_AFTER_ERROR, {
|
|
|
|
filters: string[];
|
|
|
|
job,
|
|
|
|
frameData: any;
|
|
|
|
states,
|
|
|
|
minZ: number;
|
|
|
|
frameNumber,
|
|
|
|
maxZ: number;
|
|
|
|
frameData,
|
|
|
|
}) => createAction(BoundariesActionTypes.RESET_AFTER_ERROR, payload),
|
|
|
|
minZ,
|
|
|
|
|
|
|
|
maxZ,
|
|
|
|
|
|
|
|
colors,
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
throwResetError: () => createAction(BoundariesActionTypes.THROW_RESET_ERROR),
|
|
|
|
throwResetError: () => createAction(BoundariesActionTypes.THROW_RESET_ERROR),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -55,9 +52,19 @@ export function resetAfterErrorAsync(): ThunkAction {
|
|
|
|
|
|
|
|
|
|
|
|
await job.logger.log(LogType.restoreJob);
|
|
|
|
await job.logger.log(LogType.restoreJob);
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(boundariesActions.resetAfterError(job, states, frameNumber, frameData, minZ, maxZ, colors));
|
|
|
|
dispatch(boundariesActions.resetAfterError({
|
|
|
|
} else {
|
|
|
|
job,
|
|
|
|
dispatch(boundariesActions.resetAfterError(null, [], 0, null, 0, 0, []));
|
|
|
|
states,
|
|
|
|
|
|
|
|
openTime: state.annotation.job.openTime || Date.now(),
|
|
|
|
|
|
|
|
frameNumber,
|
|
|
|
|
|
|
|
frameFilename: frameData.filename,
|
|
|
|
|
|
|
|
frameHasRelatedContext: frameData.hasRelatedContext,
|
|
|
|
|
|
|
|
colors,
|
|
|
|
|
|
|
|
filters: [],
|
|
|
|
|
|
|
|
frameData,
|
|
|
|
|
|
|
|
minZ,
|
|
|
|
|
|
|
|
maxZ,
|
|
|
|
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
dispatch(boundariesActions.throwResetError());
|
|
|
|
dispatch(boundariesActions.throwResetError());
|
|
|
|
|