feat(devops-panel): add comprehensive health monitoring and enhance s…#53
feat(devops-panel): add comprehensive health monitoring and enhance s…#53
Conversation
…ecurity ## New Features ### Health Monitoring System - Add `/api/health` endpoint to monitor all services - Checks Attorney Finder Bot (production and preview) - Checks DevOps Panel production deployment - Monitors all VLN subdomains (design, preview, dev, staging) - Tracks response times and status codes - Provides overall system health status - Add `/health` page with comprehensive dashboard - Real-time service status monitoring - Auto-refresh capability (30s intervals) - Manual refresh option - Detailed service information with response times - Color-coded status indicators (healthy/degraded/down) - Clickable service URLs - Last checked timestamps - Integrate health monitoring into main dashboard - Live health status cards - Services online counter - Link to dedicated health monitor page ### Security Enhancements - Add password protection indicator in dashboard header - Protect new `/api/health` endpoint with authentication - Update middleware with proper TypeScript typing ### Design Standards Compliance - Add "sky" color naming to match VLN design standards - Maintain backwards compatibility with "bluegray" aliases - Update Tailwind config with proper color documentation - Ensure WCAG AAA accessibility compliance ## Technical Details **New Files:** - `app/api/health/route.ts` - Health check API endpoint - `app/health/page.tsx` - Health monitor page - `components/devops/health-status.tsx` - Health dashboard component **Modified Files:** - `app/page.tsx` - Integrated health monitoring - `middleware.ts` - Added TypeScript types and health endpoint protection - `app/globals.css` - Added sky color naming - `tailwind.config.ts` - Added sky color support - `README.md` - Updated documentation **Features:** - 10-second timeout per service check - Parallel health checks for better performance - Graceful error handling - Framer Motion animations for smooth UX - Responsive grid layouts All TypeScript compilation checks passed ✓
| export default function HealthStatus() { | ||
| const [healthData, setHealthData] = useState<HealthData | null>(null); | ||
| const [loading, setLoading] = useState(true); | ||
| const [lastUpdate, setLastUpdate] = useState<Date>(new Date()); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to remove the unused state variable declaration. Specifically, in HealthStatus, the state tuple const [lastUpdate, setLastUpdate] = useState<Date>(new Date()); should be removed entirely since neither the getter (lastUpdate) nor the corresponding setter (setLastUpdate) are used elsewhere for rendering or logic. Additionally, the invocation of setLastUpdate(new Date()); within the fetchHealthData function should be eliminated, as it serves no practical purpose if the state is not being used. No imports need to be changed.
| @@ -39,7 +39,6 @@ | ||
| export default function HealthStatus() { | ||
| const [healthData, setHealthData] = useState<HealthData | null>(null); | ||
| const [loading, setLoading] = useState(true); | ||
| const [lastUpdate, setLastUpdate] = useState<Date>(new Date()); | ||
| const [autoRefresh, setAutoRefresh] = useState(true); | ||
|
|
||
| const fetchHealthData = async () => { | ||
| @@ -49,7 +48,6 @@ | ||
| if (response.ok) { | ||
| const data = await response.json(); | ||
| setHealthData(data); | ||
| setLastUpdate(new Date()); | ||
| } | ||
| } catch (error) { | ||
| console.error("Failed to fetch health data:", error); |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
⚪ Workflow Summary: SEO & Marketing AutomationStatus: Pending | Progress: 0% Complete 📊 Check Results
📝 Detailed Results🔗 LinksReport generated at 2025-11-21 15:06:41 UTC by Workflow Summary Reporter |
⚪ Workflow Summary: Commit Message LintingStatus: Pending | Progress: 0% Complete 📊 Check Results
📝 Detailed Results🔗 LinksReport generated at 2025-11-21 15:06:42 UTC by Workflow Summary Reporter |
⚪ Workflow Summary: Enhanced CI/CD PipelineStatus: Pending | Progress: 0% Complete 📊 Check Results
📝 Detailed Results🔗 LinksReport generated at 2025-11-21 15:06:59 UTC by Workflow Summary Reporter |
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
Auto-generated by SEO workflow on branch: claude/deploy-attorney-finder-bot-01NoiQY72vvG3Tk37bAQdDnC - Updated sitemap.xml - Updated robots.txt - Updated CHANGELOG.md - Updated schema.json - Generated CNAME for custom domains - Generated social media graphics Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
✅ Auto-Merge ApprovedAll required checks passed! Merging automatically. 📊 Check Summary$CHECK_SUMMARY 📈 Statistics
Auto-merged by workflow at $(date -u '+%Y-%m-%d %H:%M:%S UTC') |
⚪ Workflow Summary: Auto PR & MergeStatus: Pending | Progress: 0% Complete 📊 Check Results
📝 Detailed Results🔗 LinksReport generated at 2025-11-21 15:08:40 UTC by Workflow Summary Reporter |
|
Closing due to merge conflicts and age (4 days old). Health monitoring and deployment features have been merged through subsequent PRs. Please rebase if this specific functionality is still needed. |
Pull request was closed
…ecurity
New Features
Health Monitoring System
Add
/api/healthendpoint to monitor all servicesAdd
/healthpage with comprehensive dashboardIntegrate health monitoring into main dashboard
Security Enhancements
/api/healthendpoint with authenticationDesign Standards Compliance
Technical Details
New Files:
app/api/health/route.ts- Health check API endpointapp/health/page.tsx- Health monitor pagecomponents/devops/health-status.tsx- Health dashboard componentModified Files:
app/page.tsx- Integrated health monitoringmiddleware.ts- Added TypeScript types and health endpoint protectionapp/globals.css- Added sky color namingtailwind.config.ts- Added sky color supportREADME.md- Updated documentationFeatures:
All TypeScript compilation checks passed ✓