Enhance Docker Compose configuration and improve camera manager error handling
- Added container names for better identification of services in docker-compose.yml. - Refactored CameraManager to include error handling during initialization of camera recorders and streamers, ensuring the system remains operational even if some components fail. - Updated frontend components to support new MQTT Debug Panel functionality, enhancing monitoring capabilities.
This commit is contained in:
@@ -87,15 +87,15 @@ function App() {
|
||||
}
|
||||
}
|
||||
|
||||
// Check if current route is a camera live route
|
||||
const isCameraLiveRoute = (route: string) => {
|
||||
const cameraRoutePattern = /^\/camera(\d+)\/live$/
|
||||
// Check if current route is a camera route (no authentication required)
|
||||
const isCameraRoute = (route: string) => {
|
||||
const cameraRoutePattern = /^\/camera(\d+)$/
|
||||
return cameraRoutePattern.test(route)
|
||||
}
|
||||
|
||||
// Extract camera number from route
|
||||
const getCameraNumber = (route: string) => {
|
||||
const match = route.match(/^\/camera(\d+)\/live$/)
|
||||
const match = route.match(/^\/camera(\d+)$/)
|
||||
return match ? `camera${match[1]}` : null
|
||||
}
|
||||
|
||||
@@ -136,8 +136,8 @@ function App() {
|
||||
)
|
||||
}
|
||||
|
||||
// Handle camera live routes (no authentication required)
|
||||
if (isCameraLiveRoute(currentRoute)) {
|
||||
// Handle camera routes (no authentication required)
|
||||
if (isCameraRoute(currentRoute)) {
|
||||
const cameraNumber = getCameraNumber(currentRoute)
|
||||
if (cameraNumber) {
|
||||
return <CameraRoute cameraNumber={cameraNumber} />
|
||||
|
||||
Reference in New Issue
Block a user