Add Docker monitoring integration with Capture API (partial implementation)

Backend changes:
- Update Check model to store Docker container data (container_id, status, health, ports, etc.)
- Refactor networkService to support both local Docker and remote Capture API
  - requestLocalDocker: Existing local Docker socket monitoring
  - requestCaptureDocker: New Capture API endpoint integration
  - requestDocker: Routes based on URL pattern (http/https vs container name)
- Update statusService to handle Docker check data storage
- Enforce proper error handling for Capture API (401, 404, 500, 207 responses)

Frontend changes:
- Add Hardware/Docker tabs to Infrastructure page
- Add query parameter support for monitor type selection
- Prepare form for Docker monitor creation (partial)

Status: Backend complete, frontend in progress
Next: Complete Docker monitor form, add container table component, test end-to-end
This commit is contained in:
Claude committed 2025-11-15 22:27:31 +00:00
1 parent 2d58facb97
commit 0f3c81c052
5 files changed
+278 -55

No files matched your search

@@ -13,7 +13,7 @@ import CustomAlertsSection from "./Components/CustomAlertsSection.jsx";
// Utils
import NotificationsConfig from "@/Components/v1/NotificationConfig/index.jsx";
import { useGetNotificationsByTeamId } from "../../../../Hooks/v1/useNotifications.js";
import { useParams } from "react-router-dom";
import { useParams, useSearchParams } from "react-router-dom";
import { useState, useEffect } from "react";
import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next";
@@ -29,11 +29,15 @@ import useInfrastructureSubmit from "./hooks/useInfrastructureSubmit.jsx";
const CreateInfrastructureMonitor = () => {
const { monitorId } = useParams();
const [searchParams] = useSearchParams();
const isCreate = typeof monitorId === "undefined";
const theme = useTheme();
const { t } = useTranslation();
// Get monitor type from query params (default to hardware for backwards compatibility)
const monitorType = searchParams.get("type") || "hardware";
// State
const [https, setHttps] = useState(false);
const [updateTrigger, setUpdateTrigger] = useState(false);