Formatting

This commit is contained in:
Nicolas Mowen 2024-04-30 16:02:06 -06:00
parent a43344a5af
commit 1f4b306285
4 changed files with 9 additions and 10 deletions

View File

@ -740,15 +740,12 @@ class CameraState:
if not obj.false_positive:
label = object_type
if (
obj.obj_data.get("sub_label")
):
if obj.obj_data.get("sub_label"):
if obj.obj_data.get("sub_label")[0] in ALL_ATTRIBUTE_LABELS:
label = obj.obj_data["sub_label"][0]
else:
label = f"{object_type}-verified"
camera_activity["objects"].append(
{"id": obj.obj_data["id"], "label": label, "stationary": not active}
)

View File

@ -29,6 +29,7 @@ export function useCameraActivity(
useEffect(() => {
if (updatedCameraState) {
console.log(`the initial objects are ${JSON.stringify(updatedCameraState.objects)}`)
setObjects(updatedCameraState.objects);
}
}, [updatedCameraState]);

View File

@ -35,6 +35,7 @@ export function getIconForGroup(icon: string, className: string = "size-4") {
}
export function getIconForLabel(label: string, className?: string) {
console.log(`the label is ${label}`)
if (label.endsWith("-verified")) {
return getVerifiedIcon(label, className);
}

View File

@ -12,24 +12,24 @@ export default defineConfig({
server: {
proxy: {
"/api": {
target: "http://localhost:5000",
target: "http://192.168.50.106:5000",
ws: true,
},
"/vod": {
target: "http://localhost:5000",
target: "http://192.168.50.106:5000",
},
"/clips": {
target: "http://localhost:5000",
target: "http://192.168.50.106:5000",
},
"/exports": {
target: "http://localhost:5000",
target: "http://192.168.50.106:5000",
},
"/ws": {
target: "ws://localhost:5000",
target: "ws://192.168.50.106:5000",
ws: true,
},
"/live": {
target: "ws://localhost:5000",
target: "ws://192.168.50.106:5000",
changeOrigin: true,
ws: true,
},