From d072ba7d23be495e27730c399c64cb384f47e881 Mon Sep 17 00:00:00 2001 From: samang-dauth Date: Thu, 3 Jul 2025 17:17:34 +0700 Subject: [PATCH 1/4] Fix: Server detail page background color Ensure consistent background color on server detail and docker pages. --- application/src/pages/ContainerMonitoring.tsx | 8 ++++---- application/src/pages/ServerDetail.tsx | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/application/src/pages/ContainerMonitoring.tsx b/application/src/pages/ContainerMonitoring.tsx index 8e760e2..c302806 100644 --- a/application/src/pages/ContainerMonitoring.tsx +++ b/application/src/pages/ContainerMonitoring.tsx @@ -74,9 +74,9 @@ const ContainerMonitoring = () => { if (error) { console.error('Container monitoring error:', error); return ( -
+
-
+
{ } return ( -
+
-
+
{ if (serverError) { console.error('Server detail error:', serverError); return ( -
+
-
+
{ if (serverLoading) { return ( -
+
-
+
{ } return ( -
+
-
+
Date: Thu, 3 Jul 2025 17:22:30 +0700 Subject: [PATCH 2/4] Fix: Instance monitoring dashboard styling --- application/src/pages/InstanceMonitoring.tsx | 66 ++++++++++++-------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/application/src/pages/InstanceMonitoring.tsx b/application/src/pages/InstanceMonitoring.tsx index 586cdfe..7ad1fc4 100644 --- a/application/src/pages/InstanceMonitoring.tsx +++ b/application/src/pages/InstanceMonitoring.tsx @@ -1,3 +1,4 @@ + import { useState, useEffect } from "react"; import { useQuery } from "@tanstack/react-query"; import { useTheme } from "@/contexts/ThemeContext"; @@ -11,70 +12,83 @@ import { Server, ServerStats } from "@/types/server.types"; import { useSidebar } from "@/contexts/SidebarContext"; import { authService } from "@/services/authService"; import { useNavigate } from "react-router-dom"; + const InstanceMonitoring = () => { - const { - theme - } = useTheme(); - const { - t - } = useLanguage(); - const { - sidebarCollapsed, - toggleSidebar - } = useSidebar(); + const { theme } = useTheme(); + const { t } = useLanguage(); + const { sidebarCollapsed, toggleSidebar } = useSidebar(); const navigate = useNavigate(); + const [stats, setStats] = useState({ total: 0, online: 0, offline: 0, warning: 0 }); + const [currentUser, setCurrentUser] = useState(authService.getCurrentUser()); - const { - data: servers = [], - isLoading, - error, - refetch - } = useQuery({ + + const { data: servers = [], isLoading, error, refetch } = useQuery({ queryKey: ['servers'], queryFn: serverService.getServers, refetchInterval: 30000 // Refetch every 30 seconds }); + useEffect(() => { if (servers.length > 0) { serverService.getServerStats(servers).then(setStats); } }, [servers]); + const handleRefresh = () => { refetch(); }; + const handleLogout = () => { authService.logout(); navigate('/login'); }; + if (error) { - return
+ return ( +
-
-
+
+

Error loading servers

Unable to fetch server data. Please check your connection and try again.

-
-
; +
+ ); } - return
+ + return ( +
-
-
+
+
{/* Header Section */} @@ -103,6 +117,8 @@ const InstanceMonitoring = () => {
-
; +
+ ); }; + export default InstanceMonitoring; \ No newline at end of file From dc9e8b981a5866dab76a4c58ccca32f3295aa6c1 Mon Sep 17 00:00:00 2001 From: Tola Leng Date: Thu, 3 Jul 2025 19:33:43 +0700 Subject: [PATCH 3/4] =?UTF-8?q?removed=20file=20while=20the=20root=20direc?= =?UTF-8?q?tory=20doesn=E2=80=99t=20need=20a=20package.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 6e8487c..0000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "checkcle-dev", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} From f80b2c8a51688fdb5cced76a225b916d343f8b6d Mon Sep 17 00:00:00 2001 From: Tola Leng Date: Thu, 3 Jul 2025 19:50:12 +0700 Subject: [PATCH 4/4] Improved docker compose configuration --- docker-compose.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d624b38..cca2a22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,11 @@ services: container_name: checkcle restart: unless-stopped ports: - - "8090:8090" # Web Application + - "8090:8090" # Map ports for external access, if local only "127.0.0.1:8090:8090" volumes: - - /opt/pb_data:/mnt/pb_data # Host directory mapped to container path + - /opt/pb_data:/mnt/pb_data # Mount persistent data + + # Optional: set user limits ulimits: nofile: soft: 4096