feat: add Docker container management functionality
- Implement DockerHandler to handle API requests for listing Docker containers. - Create DockerService to interact with Docker API and retrieve container information. - Add routes for Docker container management in the API. - Introduce frontend API integration for Docker container listing. - Enhance ProxyHostForm to allow quick selection of Docker containers. - Update Docker-related tests to ensure functionality and error handling. - Modify Docker Compose files to enable Docker socket access for local and remote environments. - Add TypeScript configurations for improved build processes.
This commit is contained in:
@@ -93,6 +93,15 @@ func Register(router *gin.Engine, db *gorm.DB, cfg config.Config) error {
|
||||
protected.POST("/notifications/:id/read", notificationHandler.MarkAsRead)
|
||||
protected.POST("/notifications/read-all", notificationHandler.MarkAllAsRead)
|
||||
|
||||
// Docker
|
||||
dockerService, err := services.NewDockerService()
|
||||
if err == nil { // Only register if Docker is available
|
||||
dockerHandler := handlers.NewDockerHandler(dockerService)
|
||||
dockerHandler.RegisterRoutes(protected)
|
||||
} else {
|
||||
fmt.Printf("Warning: Docker service unavailable: %v\n", err)
|
||||
}
|
||||
|
||||
// Uptime Service
|
||||
uptimeService := services.NewUptimeService(db, notificationService)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user