forked from Github/frigate
Updated Documentation for the Review endpoints (#14401)
* Updated documentation for the review endpoint * Updated documentation for the review/summary endpoint * Updated documentation for the review/summary endpoint * Documentation for the review activity audio and motion endpoints * Added responses for more review.py endpoints * Added responses for more review.py endpoints * Fixed review.py responses and proper path parameter names * Added body model for /reviews/viewed and /reviews/delete * Updated OpenAPI specification for the review controller endpoints * Run ruff format frigate * Drop significant_motion * Updated frigate-api.yaml * Deleted total_motion * Combine 2 models into generic
This commit is contained in:
@@ -407,10 +407,6 @@ export default function Events() {
|
||||
review.severity == "detection"
|
||||
? item.reviewed_detection + 1
|
||||
: item.reviewed_detection,
|
||||
reviewed_motion:
|
||||
review.severity == "significant_motion"
|
||||
? item.reviewed_motion + 1
|
||||
: item.reviewed_motion,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
@@ -42,10 +42,8 @@ type ReviewSummaryDay = {
|
||||
day: string;
|
||||
reviewed_alert: number;
|
||||
reviewed_detection: number;
|
||||
reviewed_motion: number;
|
||||
total_alert: number;
|
||||
total_detection: number;
|
||||
total_motion: number;
|
||||
};
|
||||
|
||||
export type ReviewSummary = {
|
||||
|
||||
@@ -117,13 +117,11 @@ export default function EventView({
|
||||
return {
|
||||
alert: summary.total_alert ?? 0,
|
||||
detection: summary.total_detection ?? 0,
|
||||
significant_motion: summary.total_motion ?? 0,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
alert: summary.total_alert - summary.reviewed_alert,
|
||||
detection: summary.total_detection - summary.reviewed_detection,
|
||||
significant_motion: summary.total_motion - summary.reviewed_motion,
|
||||
};
|
||||
}
|
||||
}, [filter, showReviewed, reviewSummary]);
|
||||
|
||||
Reference in New Issue
Block a user