Compare commits

...
3 Commits
Author SHA1 Message Date
dependabot[bot]andGitHub 45554d4862 Merge 79c22bd776 into e2ce0c82ff 2026-06-28 00:22:29 -05:00
Josh HawkinsandGitHub e2ce0c82ff show Frigate+ submission failures in the UI instead of showing a false success (#23579)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
2026-06-27 16:38:24 -06:00
dependabot[bot]andGitHub 79c22bd776 Bump js-yaml from 4.1.1 to 4.2.0 in /docs
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-26 12:51:34 +00:00
6 changed files with 85 additions and 39 deletions
+15 -4
View File
@@ -18,7 +18,8 @@
"clsx": "^2.1.1",
"docusaurus-plugin-openapi-docs": "^4.5.1",
"docusaurus-theme-openapi-docs": "^4.5.1",
"js-yaml": "^4.1.1",
"js-yaml": "^4.2.0",
"marked": "^16.4.2",
"prism-react-renderer": "^2.4.1",
"raw-loader": "^4.0.2",
"react": "^18.3.1",
@@ -12889,9 +12890,19 @@
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.1",
"resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
"integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/nodeca"
}
],
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
+1 -1
View File
@@ -28,7 +28,7 @@
"clsx": "^2.1.1",
"docusaurus-plugin-openapi-docs": "^4.5.1",
"docusaurus-theme-openapi-docs": "^4.5.1",
"js-yaml": "^4.1.1",
"js-yaml": "^4.2.0",
"marked": "^16.4.2",
"prism-react-renderer": "^2.4.1",
"raw-loader": "^4.0.2",
@@ -24,6 +24,9 @@
},
"state": {
"submitted": "Submitted"
},
"toast": {
"error": "Failed to submit to Frigate+. Please check your network connection and try again."
}
}
},
@@ -1251,30 +1251,42 @@ function ObjectDetailsTab({
return;
}
falsePositive
? axios.put(`events/${search.id}/false_positive`)
: axios.post(`events/${search.id}/plus`, {
include_annotation: 1,
});
try {
const resp = falsePositive
? await axios.put(`events/${search.id}/false_positive`)
: await axios.post(`events/${search.id}/plus`, {
include_annotation: 1,
});
setState("submitted");
setSearch({ ...search, plus_id: "new_upload" });
mutate(
(key) => isEventsKey(key),
(currentData: SearchResult[][] | SearchResult[] | undefined) =>
mapSearchResults(currentData, (event) =>
event.id === search.id
? { ...event, plus_id: "new_upload" }
: event,
),
{
optimisticData: true,
rollbackOnError: true,
revalidate: false,
},
);
if (resp.status !== 200 || !resp.data?.success) {
throw new Error();
}
setState("submitted");
setSearch({ ...search, plus_id: "new_upload" });
mutate(
(key) => isEventsKey(key),
(currentData: SearchResult[][] | SearchResult[] | undefined) =>
mapSearchResults(currentData, (event) =>
event.id === search.id
? { ...event, plus_id: "new_upload" }
: event,
),
{
optimisticData: true,
rollbackOnError: true,
revalidate: false,
},
);
} catch {
setState("reviewing");
toast.error(
t("explore.plus.review.toast.error", { ns: "components/dialog" }),
{ position: "top-center" },
);
}
},
[search, mutate, mapSearchResults, setSearch, isEventsKey],
[search, mutate, mapSearchResults, setSearch, isEventsKey, t],
);
const popoverContainerRef = useRef<HTMLDivElement | null>(null);
@@ -1225,11 +1225,15 @@ function LifecycleIconRow({
<DropdownMenuItem
className="cursor-pointer"
onSelect={async () => {
const resp = await axios.post(
`/${item.camera}/plus/${item.timestamp + annotationOffset / 1000}`,
);
try {
const resp = await axios.post(
`/${item.camera}/plus/${item.timestamp + annotationOffset / 1000}`,
);
if (resp.status !== 200) {
throw new Error();
}
if (resp && resp.status == 200) {
toast.success(
t("toast.success.submittedFrigatePlus", {
ns: "components/player",
@@ -1238,8 +1242,8 @@ function LifecycleIconRow({
position: "top-center",
},
);
} else {
toast.success(
} catch {
toast.error(
t("toast.error.submitFrigatePlusFailed", {
ns: "components/player",
}),
@@ -10,6 +10,7 @@ import { isDesktop, isMobile, isSafari } from "react-device-detect";
import { cn } from "@/lib/utils";
import { useCallback, useEffect, useState } from "react";
import axios from "axios";
import { toast } from "sonner";
import { useTranslation, Trans } from "react-i18next";
import { Button } from "@/components/ui/button";
import ActivityIndicator from "@/components/indicators/activity-indicator";
@@ -48,13 +49,28 @@ export function FrigatePlusDialog({
const onSubmitToPlus = useCallback(
async (falsePositive: boolean) => {
if (!upload) return;
falsePositive
? axios.put(`events/${upload.id}/false_positive`)
: axios.post(`events/${upload.id}/plus`, { include_annotation: 1 });
setState("submitted");
onEventUploaded();
try {
const resp = falsePositive
? await axios.put(`events/${upload.id}/false_positive`)
: await axios.post(`events/${upload.id}/plus`, {
include_annotation: 1,
});
if (resp.status !== 200 || !resp.data?.success) {
throw new Error();
}
setState("submitted");
onEventUploaded();
} catch {
setState("reviewing");
toast.error(t("explore.plus.review.toast.error"), {
position: "top-center",
});
}
},
[upload, onEventUploaded],
[upload, onEventUploaded, t],
);
const [imgRef, imgLoaded, onImgLoad] = useImageLoaded();