Enhance camera management features: add debug endpoint for camera manager state, implement live camera routes without authentication, and improve logging for camera initialization and status checks. Update Docker configuration to include environment variables for the web app.
This commit is contained in:
25
management-dashboard-web-app/src/components/CameraRoute.tsx
Executable file
25
management-dashboard-web-app/src/components/CameraRoute.tsx
Executable file
@@ -0,0 +1,25 @@
|
||||
import { LiveCameraView } from './LiveCameraView'
|
||||
|
||||
interface CameraRouteProps {
|
||||
cameraNumber: string
|
||||
}
|
||||
|
||||
export function CameraRoute({ cameraNumber }: CameraRouteProps) {
|
||||
// Validate camera number (only allow camera1, camera2, etc.)
|
||||
if (!cameraNumber || !/^camera\d+$/.test(cameraNumber)) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gray-900">
|
||||
<div className="text-center text-white">
|
||||
<h1 className="text-2xl font-bold mb-4">Invalid Camera</h1>
|
||||
<p className="text-gray-300">Camera number must be in format: camera1, camera2, etc.</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return <LiveCameraView cameraName={cameraNumber} />
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user