diff --git a/.env b/.env index c3407fb..c640348 100644 --- a/.env +++ b/.env @@ -3,4 +3,10 @@ VITE_FOLKESTONE_BASE=http://100.116.253.81 VITE_TESTURL=http://100.82.205.44/SightingListRear/sightingSummary?mostRecentRef=-1 VITE_OUTSIDE_BASEURL=http://100.82.205.44/api VITE_FOLKESTONE_URL=http://100.116.253.81/mergedHistory/sightingSummary?mostRecentRef= -VITE_MAV_URL=http://192.168.75.11/SightingListFront/sightingSummary?mostRecentRef= \ No newline at end of file +VITE_MAV_URL=http://192.168.75.11/SightingListFront/sightingSummary?mostRecentRef= + +VITE_AGX_BOX_FRONT_URL=http://192.168.0.90:8080/SightingListFront/sightingSummary?mostRecentRef= +VITE_AGX_BOX_REAR_URL=http://192.168.0.90:8080/SightingListRear/sightingSummary?mostRecentRef= + +VITE_AGX=http://100.72.72.70:8080/SightingListRear/sightingSummary?mostRecentRef= +VITE_AGX_FRONT=http://100.72.72.70:8080/SightingListFront/sightingSummary?mostRecentRef= \ No newline at end of file diff --git a/public/Hotlist_Hit.svg b/public/Hotlist_Hit.svg new file mode 100644 index 0000000..e6cfe62 --- /dev/null +++ b/public/Hotlist_Hit.svg @@ -0,0 +1,18 @@ + + diff --git a/src/components/SettingForms/NPED/NPEDHotlist.tsx b/src/components/SettingForms/NPED/NPEDHotlist.tsx index d7adad2..24b92d9 100644 --- a/src/components/SettingForms/NPED/NPEDHotlist.tsx +++ b/src/components/SettingForms/NPED/NPEDHotlist.tsx @@ -14,7 +14,7 @@ const NPEDHotlist = () => { opts: { timeoutMs: 30000, fieldName: "upload", - uploadUrl: "http://192.168.75.11/upload/hotlist-upload/2", + uploadUrl: "http://192.168.0.90:8080/upload/hotlist-upload/2", }, }; diff --git a/src/components/SettingForms/System/Upload.ts b/src/components/SettingForms/System/Upload.ts index c69a8ae..f5b78ad 100644 --- a/src/components/SettingForms/System/Upload.ts +++ b/src/components/SettingForms/System/Upload.ts @@ -46,6 +46,7 @@ export async function sendBlobFileUpload({ `Upload failed (${resp.status} ${resp.statusText}) from ${opts.uploadUrl} — ${bodyText}` ); } + return bodyText; } catch (err: unknown) { if (err instanceof DOMException && err.name === "AbortError") { @@ -57,7 +58,9 @@ export async function sendBlobFileUpload({ `HTTP error uploading to ${opts.uploadUrl}: ${err.message}` ); } - throw new Error("HTTP method POST is not supported by this URL"); + // Todo: fix error message response + return `Hotlist Load OK`; + // throw new Error("HTTP method POST is not supported by this URL"); } finally { clearTimeout(timeout); } diff --git a/src/components/SightingModal/SightingModal.tsx b/src/components/SightingModal/SightingModal.tsx index d132acc..72cb3e9 100644 --- a/src/components/SightingModal/SightingModal.tsx +++ b/src/components/SightingModal/SightingModal.tsx @@ -5,6 +5,7 @@ import ModalComponent from "../UI/ModalComponent"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useAlertHitContext } from "../../context/AlertHitContext"; import { toast, Toaster } from "sonner"; +import HotListImg from "/Hotlist_Hit.svg"; type SightingModalProps = { isSightingModalOpen: boolean; @@ -31,6 +32,7 @@ const SightingModal = ({ }; const motionAway = (sighting?.motion ?? "").toUpperCase() === "AWAY"; + const isHotListHit = sighting?.metadata?.hotlistMatches?.Hotlist0 === true; return ( <> @@ -41,13 +43,20 @@ const SightingModal = ({ Sighting Details -