Compare commits

..

11 Commits

Author SHA1 Message Date
6cb2e88b3b - added new dashboard items
- added camera module statuses
2025-12-01 09:33:29 +00:00
4e02bafa6a - added status grid items
- add react modal pkg
2025-11-28 15:06:03 +00:00
983f307c3f Merge pull request 'Refactor camera feed components and add sighting tables' (#8) from feature/cameraControls into develop
Reviewed-on: #8
2025-11-28 13:02:17 +00:00
ddb1fa1bf1 Refactor camera feed components and add sighting tables
- Updated mode settings in camera feed reducer to use "painter"
- Renamed PlatePatch component to SightingPatch and updated imports
- Removed obsolete PlatePatch component
- Added SightingEntryTable and SightingExitTable components for displaying sighting data
- Implemented useSightingEntryAndExit hook for fetching entry and exit sightings
- Adjusted VideoFeedGridPainter for improved width calculation
- Introduced DecodeReading type for better typing
2025-11-28 12:58:42 +00:00
c910a3dd50 Merge pull request 'feature/targetdetection' (#7) from feature/targetdetection into develop
Reviewed-on: #7
2025-11-28 09:21:03 +00:00
690043e9f7 - updated ws endpoint 2025-11-28 09:18:46 +00:00
6428a8fa39 - added tabs for camera controls 2025-11-28 09:00:55 +00:00
bf31f94b32 - Enhanced camera feed state management with region handling and mode changes 2025-11-27 16:16:15 +00:00
f7dbde4511 - implemented isolated colouring depending on camera 2025-11-27 11:43:10 +00:00
1ada8d0966 - Implement CameraFeed context and provider with reducer for state management
- able to switch footage on tab clicks
2025-11-27 10:43:56 +00:00
6accac02de Merge pull request 'feature/output-2' (#6) from feature/output-2 into develop
Reviewed-on: #6
2025-11-27 09:45:11 +00:00
30 changed files with 792 additions and 176 deletions

View File

@@ -24,6 +24,7 @@
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-konva": "^19.2.0",
"react-modal": "^3.16.3",
"react-tabs": "^6.1.0",
"react-use-websocket": "3.0.0",
"sonner": "^2.0.7"
@@ -35,6 +36,7 @@
"@types/node": "^24.10.1",
"@types/react": "^19.2.5",
"@types/react-dom": "^19.2.3",
"@types/react-modal": "^3.16.3",
"@vitejs/plugin-react": "^5.1.1",
"autoprefixer": "^10.4.22",
"eslint": "^9.39.1",

View File

@@ -1,5 +1,5 @@
export const wsConfig = {
infoBar: "ws://100.115.148.59/websocket-infobar",
infoBar: "ws://100.115.125.56/websocket-infobar",
};
export type SocketKey = keyof typeof wsConfig;

View File

@@ -0,0 +1,16 @@
import { createContext, useContext } from "react";
import type { CameraFeedAction, CameraFeedState } from "../../types/types";
type CameraFeedContextType = {
state: CameraFeedState;
// check and refactor
dispatch: (state: CameraFeedAction) => void;
};
export const CameraFeedContext = createContext<CameraFeedContextType | null>(null);
export const useCameraFeedContext = () => {
const ctx = useContext(CameraFeedContext);
if (!ctx) throw new Error("useCameraFeedContext must be used inside <CameraFeedContext.Provider>");
return ctx;
};

View File

@@ -1,11 +1,14 @@
import type { PropsWithChildren } from "react";
import { QueryProvider } from "./QueryProviders";
import { WebSocketProvider } from "./WebSocketProvider";
import { CameraFeedProvider } from "./CameraFeedProvider";
export const AppProviders = ({ children }: PropsWithChildren) => {
return (
<QueryProvider>
<WebSocketProvider>{children}</WebSocketProvider>
<CameraFeedProvider>
<WebSocketProvider>{children}</WebSocketProvider>
</CameraFeedProvider>
</QueryProvider>
);
};

View File

@@ -0,0 +1,9 @@
import { useReducer, type ReactNode } from "react";
import { CameraFeedContext } from "../context/CameraFeedContext";
import { initialState, reducer } from "../reducers/cameraFeedReducer";
export const CameraFeedProvider = ({ children }: { children: ReactNode }) => {
const [state, dispatch] = useReducer(reducer, initialState);
return <CameraFeedContext.Provider value={{ state, dispatch }}>{children}</CameraFeedContext.Provider>;
};

View File

@@ -0,0 +1,94 @@
import type { CameraFeedAction, CameraFeedState, PaintedCell } from "../../types/types";
export const initialState: CameraFeedState = {
cameraFeedID: "A",
paintedCells: {
A: new Map<string, PaintedCell>(),
B: new Map<string, PaintedCell>(),
C: new Map<string, PaintedCell>(),
},
regionsByCamera: {
A: [
{ name: "Region 1", brushColour: "#ff0000" },
{ name: "Region 2", brushColour: "#00ff00" },
{ name: "Region 3", brushColour: "#0400ff" },
],
B: [
{ name: "Region 1", brushColour: "#ff0000" },
{ name: "Region 2", brushColour: "#00ff00" },
],
C: [{ name: "Region 1", brushColour: "#ff0000" }],
},
selectedRegionIndex: 0,
modeByCamera: {
A: "painter",
B: "painter",
C: "painter",
},
};
export function reducer(state: CameraFeedState, action: CameraFeedAction) {
switch (action.type) {
case "SET_CAMERA_FEED":
return {
...state,
cameraFeedID: action.payload,
};
case "CHANGE_MODE":
return {
...state,
modeByCamera: {
...state.modeByCamera,
[action.payload.cameraFeedID]: action.payload.mode,
},
};
case "SET_SELECTED_REGION_INDEX":
return {
...state,
selectedRegionIndex: action.payload,
};
case "SET_SELECTED_REGION_COLOUR":
return {
...state,
regionsByCamera: {
...state.regionsByCamera,
[action.payload.cameraFeedID]: state.regionsByCamera[action.payload.cameraFeedID].map((region) =>
region.name === action.payload.regionName ? { ...region, brushColour: action.payload.newColour } : region,
),
},
};
case "ADD_NEW_REGION":
return {
...state,
regionsByCamera: {
...state.regionsByCamera,
[action.payload.cameraFeedID]: [
...state.regionsByCamera[action.payload.cameraFeedID],
{ name: action.payload.regionName, brushColour: action.payload.brushColour },
],
},
};
case "REMOVE_REGION":
return {
...state,
regionsByCamera: {
...state.regionsByCamera,
[action.payload.cameraFeedID]: state.regionsByCamera[action.payload.cameraFeedID].filter(
(region) => region.name !== action.payload.regionName,
),
},
};
case "RESET_PAINTED_CELLS":
return {
...state,
paintedCells: {
...state.paintedCells,
[state.cameraFeedID]: new Map<string, PaintedCell>(),
},
};
default:
return state;
}
}

View File

@@ -1,52 +1,17 @@
import { useRef, useState } from "react";
import { useState } from "react";
import VideoFeedGridPainter from "./Video/VideoFeedGridPainter";
import CameraSettings from "./CameraSettings/CameraSettings";
import type { PaintedCell, Region } from "../../../types/types";
import PlatePatch from "./PlatePatch/PlatePatch";
import PlatePatch from "./PlatePatch/SightingPatch";
const CameraGrid = () => {
const [regions, setRegions] = useState<Region[]>([
{ name: "Region 1", brushColour: "#ff0000" },
{ name: "Region 2", brushColour: "#00ff00" },
{ name: "Region 3", brushColour: "#0400ff" },
]);
const [selectedRegionIndex, setSelectedRegionIndex] = useState(0);
const [mode, setMode] = useState("");
const [tabIndex, setTabIndex] = useState(0);
const updateRegionColour = (index: number, newColour: string) => {
setRegions((prev) => prev.map((r, i) => (i === index ? { ...r, brushColour: newColour } : r)));
};
const paintedCellsRef = useRef<Map<string, PaintedCell>>(new Map());
return (
<div className="grid grid-cols-1 md:grid-cols-5 md:grid-rows-5 max-h-screen">
<VideoFeedGridPainter
regions={regions}
selectedRegionIndex={selectedRegionIndex}
mode={mode}
paintedCells={paintedCellsRef}
/>
<CameraSettings
regions={regions}
selectedRegionIndex={selectedRegionIndex}
onSelectRegion={setSelectedRegionIndex}
onChangeRegionColour={updateRegionColour}
mode={mode}
onSelectMode={setMode}
tabIndex={tabIndex}
setTabIndex={setTabIndex}
paintedCells={paintedCellsRef}
onAddRegion={() => {
setRegions((prev) => [...prev, { name: `Region ${prev.length + 1}`, brushColour: "#ffffff" }]);
}}
OnRemoveRegion={() => {
setRegions((prev) => prev.filter((_, i) => i !== selectedRegionIndex));
setSelectedRegionIndex((prev) => (prev > 0 ? prev - 1 : 0));
}}
/>
<VideoFeedGridPainter />
<CameraSettings tabIndex={tabIndex} setTabIndex={setTabIndex} />
<PlatePatch />
</div>
);

View File

@@ -0,0 +1,61 @@
import { Tabs, Tab, TabList, TabPanel } from "react-tabs";
import { useEffect } from "react";
import { useCameraFeedContext } from "../../../../app/context/CameraFeedContext";
import RegionSelector from "./RegionSelector";
type CameraPanelProps = {
tabIndex: number;
};
const CameraPanel = ({ tabIndex }: CameraPanelProps) => {
const { state, dispatch } = useCameraFeedContext();
const cameraFeedID = state.cameraFeedID;
const regions = state.regionsByCamera[cameraFeedID];
const selectedRegionIndex = state.selectedRegionIndex;
const mode = state.modeByCamera[cameraFeedID];
useEffect(() => {
const mapIndextoCameraId = () => {
switch (tabIndex) {
case 0:
return "A";
case 1:
return "B";
case 2:
return "C";
default:
return "A";
}
};
const cameraId = mapIndextoCameraId();
dispatch({ type: "SET_CAMERA_FEED", payload: cameraId });
}, [dispatch, tabIndex]);
return (
<Tabs>
<TabList>
<Tab>Target Detection</Tab>
<Tab>Camera Controls</Tab>
</TabList>
<TabPanel>
<RegionSelector
regions={regions}
selectedRegionIndex={selectedRegionIndex}
mode={mode}
cameraFeedID={cameraFeedID}
/>
</TabPanel>
<TabPanel>
<div className="p-4">
<h2 className="text-lg font-semibold mb-4">Camera Controls</h2>
<p>Controls for camera {cameraFeedID} will go here.</p>
</div>
</TabPanel>
</Tabs>
);
};
export default CameraPanel;

View File

@@ -1,37 +1,14 @@
import Card from "../../../../ui/Card";
import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
import "react-tabs/style/react-tabs.css";
import RegionSelector from "./RegionSelector";
import type { PaintedCell, Region } from "../../../../types/types";
import type { RefObject } from "react";
import CameraPanel from "./CameraPanel";
type CameraSettingsProps = {
regions: Region[];
selectedRegionIndex: number;
onSelectRegion: (index: number) => void;
onChangeRegionColour: (index: number, colour: string) => void;
mode: string;
onSelectMode: (mode: string) => void;
setTabIndex: (tabIndex: number) => void;
tabIndex: number;
paintedCells: RefObject<Map<string, PaintedCell>>;
onAddRegion: () => void;
OnRemoveRegion: () => void;
};
const CameraSettings = ({
regions,
selectedRegionIndex,
onSelectRegion,
onChangeRegionColour,
mode,
onSelectMode,
tabIndex,
setTabIndex,
paintedCells,
onAddRegion,
OnRemoveRegion,
}: CameraSettingsProps) => {
const CameraSettings = ({ tabIndex, setTabIndex }: CameraSettingsProps) => {
return (
<Card className="p-4 col-span-3 row-span-5 col-start-3 md:col-span-3 md:row-span-5 max-h-screen overflow-auto">
<Tabs
@@ -40,32 +17,18 @@ const CameraSettings = ({
onSelect={(index) => setTabIndex(index)}
>
<TabList>
<Tab>Target Detection</Tab>
<Tab>Camera 1</Tab>
<Tab>Camera 2</Tab>
<Tab>Camera 3</Tab>
<Tab>Camera A</Tab>
<Tab>Camera B</Tab>
<Tab>Camera C</Tab>
</TabList>
<TabPanel>
<RegionSelector
regions={regions}
selectedRegionIndex={selectedRegionIndex}
onSelectRegion={onSelectRegion}
onChangeRegionColour={onChangeRegionColour}
mode={mode}
onSelectMode={onSelectMode}
paintedCells={paintedCells}
onAddRegion={onAddRegion}
OnRemoveRegion={OnRemoveRegion}
/>
<CameraPanel tabIndex={tabIndex} />
</TabPanel>
<TabPanel>
<div>Camera details {tabIndex}</div>
<CameraPanel tabIndex={tabIndex} />
</TabPanel>
<TabPanel>
<div>Camera details {tabIndex}</div>
</TabPanel>
<TabPanel>
<div>Camera details {tabIndex}</div>
<CameraPanel tabIndex={tabIndex} />
</TabPanel>
</Tabs>
</Card>

View File

@@ -1,45 +1,57 @@
import ColourPicker from "./ColourPicker";
import type { PaintedCell, Region } from "../../../../types/types";
import type { RefObject } from "react";
import ColourPicker from "./ColourPicker";
import { useCameraFeedContext } from "../../../../app/context/CameraFeedContext";
type RegionSelectorProps = {
regions: Region[];
selectedRegionIndex: number;
onSelectRegion: (index: number) => void;
onChangeRegionColour: (index: number, colour: string) => void;
mode: string;
onSelectMode: (mode: string) => void;
paintedCells: RefObject<Map<string, PaintedCell>>;
onAddRegion: () => void;
OnRemoveRegion: () => void;
cameraFeedID: "A" | "B" | "C";
};
const RegionSelector = ({
regions,
selectedRegionIndex,
onSelectRegion,
onChangeRegionColour,
mode,
onSelectMode,
paintedCells,
onAddRegion,
OnRemoveRegion,
}: RegionSelectorProps) => {
const RegionSelector = ({ regions, selectedRegionIndex, mode, cameraFeedID }: RegionSelectorProps) => {
const { dispatch } = useCameraFeedContext();
const handleChange = (e: { target: { value: string } }) => {
onSelectMode(e.target.value);
dispatch({ type: "CHANGE_MODE", payload: { cameraFeedID: cameraFeedID, mode: e.target.value } });
};
const handleAddClick = () => {
onAddRegion();
const handleAddRegionClick = () => {
const regionName = `Region ${regions.length + 1}`;
dispatch({
type: "ADD_NEW_REGION",
payload: { cameraFeedID: cameraFeedID, regionName: regionName, brushColour: "#ffffff" },
});
};
const handleResetClick = () => {
const map = paintedCells.current;
map.clear();
const handleResetRegion = () => {
dispatch({
type: "RESET_PAINTED_CELLS",
payload: { cameraFeedID: cameraFeedID, paintedCells: new Map<string, PaintedCell>() },
});
};
const handleRemoveClick = () => {
OnRemoveRegion();
dispatch({
type: "REMOVE_REGION",
payload: { cameraFeedID: cameraFeedID, regionName: regions[selectedRegionIndex].name },
});
};
const handleModeChange = (newMode: string) => {
dispatch({ type: "CHANGE_MODE", payload: { cameraFeedID: cameraFeedID, mode: newMode } });
};
const handleRegionSelect = (index: number) => {
dispatch({ type: "SET_SELECTED_REGION_INDEX", payload: index });
};
const handleRegionColourChange = (index: number, newColour: string) => {
const regionName = regions[index].name;
dispatch({
type: "SET_SELECTED_REGION_COLOUR",
payload: { cameraFeedID: cameraFeedID, regionName: regionName, newColour: newColour },
});
};
return (
@@ -84,7 +96,7 @@ const RegionSelector = ({
<div className="p-2 border border-gray-600 rounded-lg flex flex-col">
<h2 className="text-2xl mb-2">Region Select</h2>
<>
{regions.map((region, idx) => {
{regions?.map((region, idx) => {
const isSelected = selectedRegionIndex === idx;
const inputId = `region-${idx}`;
return (
@@ -102,20 +114,20 @@ const RegionSelector = ({
name="region"
className="sr-only"
onChange={() => {
onSelectMode("painter");
onSelectRegion(idx);
handleModeChange("painter");
handleRegionSelect(idx);
}}
/>
<span className="text-xl">{region.name}</span>
</div>
<ColourPicker colour={region.brushColour} setColour={(c: string) => onChangeRegionColour(idx, c)} />
<ColourPicker colour={region.brushColour} setColour={(c: string) => handleRegionColourChange(idx, c)} />
<p className="text-slate-400">{region.brushColour}</p>
</label>
);
})}
</>
<div className=" mx-auto flex flex-row gap-4 mt-4">
<button className="border border-blue-900 bg-blue-700 px-4 rounded-md" onClick={handleAddClick}>
<button className="border border-blue-900 bg-blue-700 px-4 rounded-md" onClick={handleAddRegionClick}>
Add Region
</button>
<button className="border border-red-900 px-4 rounded-md" onClick={handleRemoveClick}>
@@ -128,10 +140,10 @@ const RegionSelector = ({
<div className="flex flex-col">
<h2 className="text-2xl mb-2">Actions</h2>
<button
onClick={handleResetClick}
onClick={handleResetRegion}
className="mt-2 px-4 py-2 border border-red-600 rounded-md text-white bg-red-600 w-full md:w-[40%] hover:bg-red-700 hover:cursor-pointer"
>
Reset Regions
Reset Region
</button>
</div>
</div>

View File

@@ -1,7 +0,0 @@
import Card from "../../../../ui/Card";
const PlatePatch = () => {
return <Card className="md:row-start-4 md:col-span-2">PlatePatch</Card>;
};
export default PlatePatch;

View File

@@ -0,0 +1,44 @@
import { useCameraFeedContext } from "../../../../app/context/CameraFeedContext";
import type { DecodeReading } from "../../../../types/types";
import { useSightingEntryAndExit } from "../../hooks/useSightingEntryAndExit";
const SightingEntryTable = () => {
const { state } = useCameraFeedContext();
const cameraFeedID = state.cameraFeedID;
const { entryQuery } = useSightingEntryAndExit(cameraFeedID);
const isLoading = entryQuery?.isFetching;
const readings = entryQuery?.data?.decodes;
if (isLoading) return <span className="text-slate-500">Loading Sighting data</span>;
return (
<div className="border border-gray-600 rounded-lg overflow-hidden m-2">
<div className="overflow-y-auto ">
<table className="w-full text-left text-sm">
<thead className="bg-gray-700/50 text-gray-200 sticky top-0">
<tr>
<th className="px-4 py-3 font-semibold">VRM</th>
<th className="px-4 py-3 font-semibold">Lane ID</th>
<th className="px-4 py-3 font-semibold text-center">Seen Count</th>
<th className="px-4 py-3 font-semibold">First Seen</th>
<th className="px-4 py-3 font-semibold">Last Seen</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-700">
{readings?.map((reading: DecodeReading) => (
<tr className="hover:bg-gray-800/30 transition-colors" key={reading?.id}>
<td className="px-4 py-3 font-mono font-semibold text-blue-400 text-lg">{reading?.vrm}</td>
<td className="px-4 py-3 text-gray-300">{reading?.laneID}</td>
<td className="px-4 py-3 text-center text-gray-300">{reading?.seenCount}</td>
<td className="px-4 py-3 text-gray-400 text-md">{reading?.firstSeenTimeHumane}</td>
<td className="px-4 py-3 text-gray-400 text-md">{reading?.lastSeenTimeHumane}</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
);
};
export default SightingEntryTable;

View File

@@ -0,0 +1,44 @@
import { useCameraFeedContext } from "../../../../app/context/CameraFeedContext";
import type { DecodeReading } from "../../../../types/types";
import { useSightingEntryAndExit } from "../../hooks/useSightingEntryAndExit";
const SightingExitTable = () => {
const { state } = useCameraFeedContext();
const cameraFeedID = state.cameraFeedID;
const { exitQuery } = useSightingEntryAndExit(cameraFeedID);
const isLoading = exitQuery?.isFetching;
const readings = exitQuery?.data?.decodes;
if (isLoading) return <span className="text-slate-500">Loading Sighting data</span>;
return (
<div className="border border-gray-600 rounded-lg overflow-hidden m-2">
<div className="overflow-y-auto ">
<table className="w-full text-left text-sm">
<thead className="bg-gray-700/50 text-gray-200 sticky top-0">
<tr>
<th className="px-4 py-3 font-semibold">VRM</th>
<th className="px-4 py-3 font-semibold">Lane ID</th>
<th className="px-4 py-3 font-semibold text-center">Seen Count</th>
<th className="px-4 py-3 font-semibold">First Seen</th>
<th className="px-4 py-3 font-semibold">Last Seen</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-700">
{readings?.map((reading: DecodeReading) => (
<tr className="hover:bg-gray-800/30 transition-colors" key={reading?.id}>
<td className="px-4 py-3 font-mono font-semibold text-red-400 text-lg">{reading?.vrm}</td>
<td className="px-4 py-3 text-gray-300">{reading?.laneID}</td>
<td className="px-4 py-3 text-center text-gray-300">{reading?.seenCount}</td>
<td className="px-4 py-3 text-gray-400 text-md">{reading?.firstSeenTimeHumane}</td>
<td className="px-4 py-3 text-gray-400 text-md">{reading?.lastSeenTimeHumane}</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
);
};
export default SightingExitTable;

View File

@@ -0,0 +1,27 @@
import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
import Card from "../../../../ui/Card";
import CardHeader from "../../../../ui/CardHeader";
import SightingEntryTable from "./SightingEntryTable";
import SightingExitTable from "./SightingExitTable";
const PlatePatch = () => {
return (
<Card className="md:row-start-4 md:col-span-2 p-4 h-[190%]">
<CardHeader title="Entry / Exit" />
<Tabs>
<TabList>
<Tab>Entry Sightings</Tab>
<Tab>Exit Sightings</Tab>
</TabList>
<TabPanel>
<SightingEntryTable />
</TabPanel>
<TabPanel>
<SightingExitTable />
</TabPanel>
</Tabs>
</Card>
);
};
export default PlatePatch;

View File

@@ -2,22 +2,22 @@ import { useEffect, useRef, useState, type RefObject } from "react";
import { Stage, Layer, Image, Shape } from "react-konva";
import type { KonvaEventObject } from "konva/lib/Node";
import { useCreateVideoSnapshot } from "../../hooks/useGetvideoSnapshots";
import type { PaintedCell, Region } from "../../../../types/types";
import Card from "../../../../ui/Card";
import { useCameraFeedContext } from "../../../../app/context/CameraFeedContext";
const rows = 40;
const cols = 40;
const size = 20;
const gap = 0;
type VideoFeedGridPainterProps = {
regions: Region[];
selectedRegionIndex: number;
mode: string;
paintedCells: RefObject<Map<string, PaintedCell>>;
};
const VideoFeedGridPainter = ({ regions, selectedRegionIndex, mode, paintedCells }: VideoFeedGridPainterProps) => {
const VideoFeedGridPainter = () => {
const { state } = useCameraFeedContext();
const cameraFeedID = state.cameraFeedID;
const paintedCells = state.paintedCells[cameraFeedID];
const regions = state.regionsByCamera[cameraFeedID];
const selectedRegionIndex = state.selectedRegionIndex;
const mode = state.modeByCamera[cameraFeedID];
const { latestBitmapRef, isloading } = useCreateVideoSnapshot();
const [stageSize, setStageSize] = useState({ width: 740, height: 460 });
const isDrawingRef = useRef(false);
@@ -47,7 +47,7 @@ const VideoFeedGridPainter = ({ regions, selectedRegionIndex, mode, paintedCells
const key = `${row}-${col}`;
const currentColour = regions[selectedRegionIndex].brushColour;
const map = paintedCells.current;
const map = paintedCells;
const existing = map.get(key);
if (mode === "eraser") {
@@ -88,7 +88,7 @@ const VideoFeedGridPainter = ({ regions, selectedRegionIndex, mode, paintedCells
const width = window.innerWidth;
const aspectRatio = 740 / 460;
const newWidth = width * 0.36;
const newWidth = width * 0.39;
const newHeight = newWidth / aspectRatio;
setStageSize({ width: newWidth, height: newHeight });
};
@@ -121,7 +121,7 @@ const VideoFeedGridPainter = ({ regions, selectedRegionIndex, mode, paintedCells
<Layer ref={paintLayerRef} opacity={0.6}>
<Shape
sceneFunc={(ctx, shape) => {
const cells = paintedCells.current;
const cells = paintedCells;
cells.forEach((cell, key) => {
const [rowStr, colStr] = key.split("-");
const row = Number(rowStr);

View File

@@ -1,7 +1,8 @@
import { useQuery } from "@tanstack/react-query";
import { CAMBASE } from "../../../utils/config";
const getfeed = async () => {
const response = await fetch(`http://100.115.148.59/TargetDetectionColour-preview`, {
const getfeed = async (cameraFeedID: "A" | "B" | "C" | null) => {
const response = await fetch(`${CAMBASE}TargetDetectionColour${cameraFeedID}-preview`, {
signal: AbortSignal.timeout(300000),
cache: "no-store",
});
@@ -11,10 +12,10 @@ const getfeed = async () => {
return response.blob();
};
export const useGetVideoFeed = () => {
export const useGetVideoFeed = (cameraFeedID: "A" | "B" | "C" | null) => {
const videoQuery = useQuery({
queryKey: ["getfeed"],
queryFn: getfeed,
queryKey: ["getfeed", cameraFeedID],
queryFn: () => getfeed(cameraFeedID),
refetchInterval: 500,
});

View File

@@ -1,9 +1,12 @@
import { useEffect, useRef } from "react";
import { useGetVideoFeed } from "./useGetVideoFeed";
import { useCameraFeedContext } from "../../../app/context/CameraFeedContext";
export const useCreateVideoSnapshot = () => {
const { state } = useCameraFeedContext();
const cameraFeedID = state?.cameraFeedID;
const latestBitmapRef = useRef<ImageBitmap | null>(null);
const { videoQuery } = useGetVideoFeed();
const { videoQuery } = useGetVideoFeed(cameraFeedID);
const snapShot = videoQuery?.data;
const isloading = videoQuery.isPending;

View File

@@ -0,0 +1,28 @@
import { useQuery } from "@tanstack/react-query";
import { CAMBASE } from "../../../utils/config";
const fetchEntrySightings = async (cameraFeedID: string) => {
const response = await fetch(`${CAMBASE}/EntrySightingCreator${cameraFeedID}-list-proto-sightings`);
if (!response.ok) throw new Error("Cannot reach sighing entry endpoint");
return response.json();
};
const fetchExitSightings = async (cameraFeedID: string) => {
const response = await fetch(`${CAMBASE}/ExitSightingCreator${cameraFeedID}-list-proto-sightings`);
if (!response.ok) throw new Error("Cannot reach sighing exit endpoint");
return response.json();
};
export const useSightingEntryAndExit = (cameraFeedID: string) => {
const entryQuery = useQuery({
queryKey: ["Entry Sightings", cameraFeedID],
queryFn: () => fetchEntrySightings(cameraFeedID),
});
const exitQuery = useQuery({
queryKey: ["Exit Sightings", cameraFeedID],
queryFn: () => fetchExitSightings(cameraFeedID),
});
return { entryQuery, exitQuery };
};

View File

@@ -1,17 +1,35 @@
import type { SystemHealthStatus } from "../../../types/types";
import Card from "../../../ui/Card";
import CardHeader from "../../../ui/CardHeader";
import StatusIndicators from "../../../ui/StatusIndicators";
import { capitalize } from "../../../utils/utils";
import CameraStatusGridItem from "./CameraStatusGridItem";
type CameraStatusProps = {
title: string;
status?: string;
description: string;
category: SystemHealthStatus[];
};
const CameraStatus = ({ title, status, description }: CameraStatusProps) => {
const CameraStatus = ({ title, category }: CameraStatusProps) => {
const isAllGood = category?.every((status) => status.tags.includes("RUNNING"));
// check if some are down
// check if all are down
//check if offline
return (
<Card className="p-4">
<CardHeader title={title} status={status} />
<p className=" text-gray-500">{description}</p>
<div className="border-b border-gray-600">
<h3 className="text-lg flex flex-row items-center">
{isAllGood ? <StatusIndicators status={"bg-green-500"} /> : <StatusIndicators status={"bg-amber-500"} />}
{capitalize(title)}
</h3>
<p className="text-sm text-slate-300">{isAllGood ? "All systems running" : "Some systems down"}</p>
</div>
{category && category?.length <= 0 ? (
<p className=" text-gray-500">Loading Camera health...</p>
) : (
<div>
<CameraStatusGridItem title={title} statusCategory={category} />
</div>
)}
</Card>
);
};

View File

@@ -0,0 +1,38 @@
import { useState } from "react";
import type { SystemHealthStatus } from "../../../types/types";
import { capitalize } from "../../../utils/utils";
import SystemHealthModal from "./systemHealthModal/SystemHealthModal";
type CameraStatusGridItemProps = {
title: string;
statusCategory: SystemHealthStatus[];
};
const CameraStatusGridItem = ({ title, statusCategory }: CameraStatusGridItemProps) => {
const [isOpen, setIsOpen] = useState(false);
const isAllGood = statusCategory?.every((status) => status.tags.includes("RUNNING"));
const handleClick = () => {
setIsOpen(false);
};
return (
<>
<div
className="flex flex-col border border-gray-600 p-4 rounded-lg mr-4 hover:bg-[#233241] hover:cursor-pointer m-2 h-70"
onClick={() => setIsOpen(true)}
>
<h3 className="text-lg flex flex-row items-center">{capitalize(title)}</h3>
<p className="text-sm text-slate-300">{isAllGood ? "Click to view module status" : "Some systems down"}</p>
</div>
<SystemHealthModal
isSystemHealthModalOpen={isOpen}
handleClose={handleClick}
statusCategory={statusCategory}
title={title}
isAllGood={isAllGood}
/>
</>
);
};
export default CameraStatusGridItem;

View File

@@ -1,16 +1,55 @@
import type { SystemHealthStatus } from "../../../types/types";
import { useGetSystemHealth } from "../hooks/useGetSystemHealth";
import CameraStatus from "./CameraStatus";
import SystemOverview from "./SystemOverview";
import SystemStatusCard from "./SystemStatusCard";
const DashboardGrid = () => {
const { query } = useGetSystemHealth();
const startTime = query?.data?.StartTimeHumane;
const uptime = query?.data?.UptimeHumane;
const statuses: SystemHealthStatus[] = query?.data?.Status;
const isLoading = query?.isLoading;
const isError = query?.isError;
const dateUpdatedAt = query?.dataUpdatedAt;
const refetch = query?.refetch;
const statusCategories = statuses?.reduce<Record<string, SystemHealthStatus[]>>(
(acc, cur) => {
if (cur?.groupID === "ChannelA") acc?.channelA?.push(cur);
if (cur?.groupID === "ChannelB") acc?.channelB?.push(cur);
if (cur?.groupID === "ChannelC") acc?.channelC?.push(cur);
if (cur?.groupID === "Default") acc?.default?.push(cur);
return acc;
},
{
channelA: [],
channelB: [],
channelC: [],
default: [],
},
);
const categoryA = statusCategories?.channelA ?? [];
const categoryB = statusCategories?.channelB ?? [];
const categoryC = statusCategories?.channelC ?? [];
return (
<div className="grid grid-cols-1 md:grid-rows-2 md:grid-cols-2">
<SystemStatusCard />
<SystemOverview />
<SystemOverview
startTime={startTime}
uptime={uptime}
statuses={statuses}
isLoading={isLoading}
isError={isError}
dateUpdatedAt={dateUpdatedAt}
refetch={refetch}
/>
<div className="grid grid-cols-1 md:col-span-2 md:grid-cols-3">
<CameraStatus title="Camera 1" status={"bg-red-500"} description={"Camera not responding"} />
<CameraStatus title="Camera 2" status={"bg-gray-500"} description={"Camera Offline"} />
<CameraStatus title="Camera 3" status={"bg-gray-500"} description={"Camera Offline"} />
<CameraStatus title="Camera A" category={categoryA} />
<CameraStatus title="Camera B" category={categoryB} />
<CameraStatus title="Camera C" category={categoryC} />
</div>
</div>
);

View File

@@ -1,5 +1,5 @@
import type { SystemHealthStatus } from "../../../types/types";
import Badge from "../../../ui/Badge";
import StatusGridItem from "./statusGridItem/StatusGridItem";
type SystemHealthProps = {
startTime: string;
@@ -13,7 +13,23 @@ type SystemHealthProps = {
const SystemHealth = ({ startTime, uptime, statuses, isLoading, isError, dateUpdatedAt }: SystemHealthProps) => {
const updatedDate = dateUpdatedAt ? new Date(dateUpdatedAt).toLocaleString() : null;
// console.log(statuses);
const statusCategories = statuses?.reduce<Record<string, SystemHealthStatus[]>>(
(acc, cur) => {
if (cur?.groupID === "ChannelA") acc?.channelA?.push(cur);
if (cur?.groupID === "ChannelB") acc?.channelB?.push(cur);
if (cur?.groupID === "ChannelC") acc?.channelC?.push(cur);
if (cur?.groupID === "Default") acc?.default?.push(cur);
return acc;
},
{
channelA: [],
channelB: [],
channelC: [],
default: [],
},
);
const categoryDefault = statusCategories?.default ?? [];
if (isError) {
return <span className="text-red-500">Error loading system health.</span>;
@@ -31,12 +47,8 @@ const SystemHealth = ({ startTime, uptime, statuses, isLoading, isError, dateUpd
<h3 className="text-lg">Up Time</h3> <span className="text-slate-300">{uptime}</span>
</div>
</div>
<div className="h-50 overflow-auto">
{statuses?.map((status: SystemHealthStatus) => (
<div className="border border-gray-700 p-4 rounded-md m-2 flex justify-between" key={status.id}>
<span>{status.id}</span> <Badge text={status.tags[0]} />
</div>
))}
<div className="overflow-auto gap-4">
<StatusGridItem title={"Modules"} statusCategory={categoryDefault} />
</div>
<div className="border-t border-gray-500">
<small className="italic text-gray-400">{`Last refeshed ${updatedDate}`}</small>

View File

@@ -1,22 +1,32 @@
import { faArrowsRotate } from "@fortawesome/free-solid-svg-icons";
import Card from "../../../ui/Card";
import CardHeader from "../../../ui/CardHeader";
import { useGetSystemHealth } from "../hooks/useGetSystemHealth";
import SystemHealth from "./SystemHealth";
import type { SystemHealthStatus } from "../../../types/types";
const SystemOverview = () => {
const { query } = useGetSystemHealth();
const startTime = query?.data?.StartTimeHumane;
const uptime = query?.data?.UptimeHumane;
const statuses = query?.data?.Status;
const isLoading = query?.isLoading;
const isError = query?.isError;
const dateUpdatedAt = query?.dataUpdatedAt;
type SystemOverviewProps = {
startTime: string;
uptime: string;
statuses: SystemHealthStatus[];
isLoading: boolean;
isError: boolean;
dateUpdatedAt: number;
refetch: () => void;
};
const SystemOverview = ({
startTime,
uptime,
statuses,
isLoading,
isError,
dateUpdatedAt,
refetch,
}: SystemOverviewProps) => {
return (
<Card className="p-4">
<CardHeader title="System Health" refetch={query?.refetch} icon={faArrowsRotate} />
<CardHeader title="System Health" refetch={refetch} icon={faArrowsRotate} />
<SystemHealth
startTime={startTime}
uptime={uptime}

View File

@@ -0,0 +1,43 @@
import { useState } from "react";
import type { SystemHealthStatus } from "../../../../types/types";
import StatusIndicators from "../../../../ui/StatusIndicators";
import { capitalize } from "../../../../utils/utils";
import SystemHealthModal from "../systemHealthModal/SystemHealthModal";
type StatusGridItemProps = {
title: string;
statusCategory: SystemHealthStatus[];
};
const StatusGridItem = ({ title, statusCategory }: StatusGridItemProps) => {
const [isOpen, setIsOpen] = useState(false);
const isAllGood = statusCategory.every((status) => status.tags.includes("RUNNING"));
const handleClick = () => {
setIsOpen(false);
};
return (
<>
<div
className="flex flex-col border border-gray-600 p-4 rounded-lg mr-4 hover:bg-[#233241] hover:cursor-pointer"
onClick={() => setIsOpen(true)}
>
<h3 className="text-lg flex flex-row items-center">
{isAllGood ? <StatusIndicators status={"bg-green-500"} /> : <StatusIndicators status={"bg-amber-500"} />}
{capitalize(title)}
</h3>
<p className="text-sm text-slate-300">{isAllGood ? "All systems running" : "Some systems down"}</p>
</div>
<SystemHealthModal
isSystemHealthModalOpen={isOpen}
handleClose={handleClick}
statusCategory={statusCategory}
title={title}
isAllGood={isAllGood}
/>
</>
);
};
export default StatusGridItem;

View File

@@ -0,0 +1,48 @@
import type { SystemHealthStatus } from "../../../../types/types";
import Badge from "../../../../ui/Badge";
import ModalComponent from "../../../../ui/ModalComponent";
import StatusIndicators from "../../../../ui/StatusIndicators";
import { capitalize } from "../../../../utils/utils";
type SystemHealthModalProps = {
isSystemHealthModalOpen: boolean;
handleClose: () => void;
statusCategory: SystemHealthStatus[];
title: string;
isAllGood: boolean;
};
const SystemHealthModal = ({
isSystemHealthModalOpen,
handleClose,
statusCategory,
title,
isAllGood,
}: SystemHealthModalProps) => {
return (
<ModalComponent isModalOpen={isSystemHealthModalOpen} close={handleClose}>
<div>
<div className="border-b border-gray-500">
<h2 className="text-xl font-bold mb-4 flex flex-row items-center">
{isAllGood ? <StatusIndicators status={"bg-green-500"} /> : <StatusIndicators status={"bg-amber-500"} />}
{capitalize(title)}
</h2>
<p className="text-sm text-slate-300">{isAllGood ? "All systems running" : "Some systems down"}</p>
</div>
<div>
{statusCategory?.map((status: SystemHealthStatus) => (
<div
className="border border-gray-700 p-4 rounded-md m-2 flex justify-between hover:bg-[#233241]"
key={status.id}
>
<span>{status.id}</span> <Badge text={status.tags[0]} />
</div>
))}
</div>
</div>
</ModalComponent>
);
};
export default SystemHealthModal;

View File

@@ -4,9 +4,12 @@ import { RouterProvider, createRouter } from "@tanstack/react-router";
import { routeTree } from "./routeTree.gen"; // generated by plugin
import { AppProviders } from "./app/providers/AppProviders";
import "./index.css";
import Modal from "react-modal";
const router = createRouter({ routeTree });
Modal.setAppElement("#root");
declare module "@tanstack/react-router" {
interface Register {
router: typeof router;

View File

@@ -20,6 +20,14 @@ export type Region = {
export type SystemHealthStatus = {
id: string;
tags: string[];
groupID: string;
};
export type StatusGroups = {
channelA: SystemHealthStatus[];
channelB: SystemHealthStatus[];
channelC: SystemHealthStatus[];
default: SystemHealthStatus[];
};
export type BearerTypeFields = {
@@ -95,3 +103,64 @@ export type OptionalBOF2LaneIDs = {
LID2?: string;
LID3?: string;
};
export type CameraFeedState = {
cameraFeedID: "A" | "B" | "C";
paintedCells: {
A: Map<string, PaintedCell>;
B: Map<string, PaintedCell>;
C: Map<string, PaintedCell>;
};
regionsByCamera: {
A: Region[];
B: Region[];
C: Region[];
};
selectedRegionIndex: number;
modeByCamera: {
A: string;
B: string;
C: string;
};
tabIndex?: number;
};
export type CameraFeedAction =
| {
type: "SET_CAMERA_FEED";
payload: "A" | "B" | "C";
}
| {
type: "CHANGE_MODE";
payload: { cameraFeedID: "A" | "B" | "C"; mode: string };
}
| { type: "SET_SELECTED_REGION_INDEX"; payload: number }
| {
type: "SET_SELECTED_REGION_COLOUR";
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string; newColour: string };
}
| {
type: "ADD_NEW_REGION";
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string; brushColour: string };
}
| {
type: "REMOVE_REGION";
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string };
}
| {
type: "RESET_PAINTED_CELLS";
payload: { cameraFeedID: "A" | "B" | "C"; paintedCells: Map<string, PaintedCell> };
};
export type DecodeReading = {
id: number;
vrm: string;
laneID: number;
seenCount: number;
firstSeenTime?: number;
lastSeenTime?: number;
duplicate?: true;
firstSeenTimeHumane: string;
lastSeenTimeHumane: string;
};

22
src/ui/ModalComponent.tsx Normal file
View File

@@ -0,0 +1,22 @@
import Modal from "react-modal";
type ModalComponentProps = {
isModalOpen: boolean;
children: React.ReactNode;
close: () => void;
};
const ModalComponent = ({ isModalOpen, children, close }: ModalComponentProps) => {
return (
<Modal
isOpen={isModalOpen}
onRequestClose={close}
className="bg-[#1e2a38] p-6 rounded-lg shadow-lg w-[95%] mt-[2%] md:w-[40%] z-100 overflow-y-auto border border-gray-600"
overlayClassName="fixed inset-0 bg-[#1e2a38]/70 flex justify-center items-start z-100"
>
{children}
</Modal>
);
};
export default ModalComponent;

View File

@@ -1,3 +1,11 @@
import type { SystemHealthStatus } from "../types/types";
export function capitalize(s?: string) {
return s ? s.charAt(0).toUpperCase() + s.slice(1) : "";
}
export const convertObjtoArray = (obj: Record<string, SystemHealthStatus[]>) => {
if (!obj) return;
const statusCategoryArray = Object.entries(obj);
return statusCategoryArray;
};

View File

@@ -1018,6 +1018,13 @@
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.2.3.tgz#c1e305d15a52a3e508d54dca770d202cb63abf2c"
integrity sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==
"@types/react-modal@^3.16.3":
version "3.16.3"
resolved "https://registry.yarnpkg.com/@types/react-modal/-/react-modal-3.16.3.tgz#250f32c07f1de28e2bcf9c3e84b56adaa6897013"
integrity sha512-xXuGavyEGaFQDgBv4UVm8/ZsG+qxeQ7f77yNrW3n+1J6XAstUy5rYHeIHPh1KzsGc6IkCIdu6lQ2xWzu1jBTLg==
dependencies:
"@types/react" "*"
"@types/react-reconciler@^0.28.9":
version "0.28.9"
resolved "https://registry.yarnpkg.com/@types/react-reconciler/-/react-reconciler-0.28.9.tgz#d24b4864c384e770c83275b3fe73fba00269c83b"
@@ -1028,6 +1035,13 @@
resolved "https://registry.yarnpkg.com/@types/react-reconciler/-/react-reconciler-0.32.3.tgz#eb4b346f367f29f07628032934d30a4f3f9eaba7"
integrity sha512-cMi5ZrLG7UtbL7LTK6hq9w/EZIRk4Mf1Z5qHoI+qBh7/WkYkFXQ7gOto2yfUvPzF5ERMAhaXS5eTQ2SAnHjLzA==
"@types/react@*":
version "19.2.7"
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.2.7.tgz#84e62c0f23e8e4e5ac2cadcea1ffeacccae7f62f"
integrity sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==
dependencies:
csstype "^3.2.2"
"@types/react@^19.2.5":
version "19.2.6"
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.2.6.tgz#d27db1ff45012d53980f5589fda925278e1249ca"
@@ -1540,6 +1554,11 @@ esutils@^2.0.2:
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
exenv@^1.2.0:
version "1.2.2"
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
integrity sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
@@ -1934,7 +1953,7 @@ lodash@^4.17.21:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
loose-envify@^1.4.0:
loose-envify@^1.0.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@@ -2104,7 +2123,7 @@ prettier@^3.5.0:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393"
integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==
prop-types@^15.5.0:
prop-types@^15.5.0, prop-types@^15.7.2:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -2150,6 +2169,21 @@ react-konva@^19.2.0:
react-reconciler "0.33.0"
scheduler "0.27.0"
react-lifecycles-compat@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
react-modal@^3.16.3:
version "3.16.3"
resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.16.3.tgz#c412d41915782e3c261253435d01468e2439b11b"
integrity sha512-yCYRJB5YkeQDQlTt17WGAgFJ7jr2QYcWa1SHqZ3PluDmnKJ/7+tVU+E6uKyZ0nODaeEj+xCpK4LcSnKXLMC0Nw==
dependencies:
exenv "^1.2.0"
prop-types "^15.7.2"
react-lifecycles-compat "^3.0.0"
warning "^4.0.3"
react-reconciler@0.33.0:
version "0.33.0"
resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.33.0.tgz#9dd20208d45baa5b0b4701781f858236657f15e1"
@@ -2446,6 +2480,13 @@ vite@^7.1.7, vite@^7.2.4:
optionalDependencies:
fsevents "~2.3.3"
warning@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"
integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==
dependencies:
loose-envify "^1.0.0"
webpack-virtual-modules@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz#057faa9065c8acf48f24cb57ac0e77739ab9a7e8"