feat: add log viewer components and fix build issues
Some checks failed
Build and Push Docker Image to Gitea / build-and-push (push) Failing after 53s
Some checks failed
Build and Push Docker Image to Gitea / build-and-push (push) Failing after 53s
- Add LogViewer component with syntax highlighting and auto-scroll - Add LogControls for play/pause, auto-scroll, refresh, download, clear - Add LogSearch component with search highlighting - Add Input UI component - Fix TypeScript type issues in ProcessCard and types.ts - Fix XML-RPC client type issues - Add force-dynamic to layout to prevent SSR issues with client components - Add mounted state to Navbar for theme toggle hydration - Add custom 404 page Components added: - components/logs/LogViewer.tsx - Main log viewer with real-time display - components/logs/LogControls.tsx - Control panel for log viewing - components/logs/LogSearch.tsx - Search input for filtering logs - components/ui/input.tsx - Reusable input component Fixes: - ProcessStateCode type casting in ProcessCard - XML-RPC client options type (use any to avoid library type issues) - canStartProcess/canStopProcess type assertions - Dynamic rendering to prevent SSR hydration issues 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import { Play, Square, RotateCw, Activity } from 'lucide-react';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { ProcessInfo, getProcessStateClass, formatUptime, canStartProcess, canStopProcess } from '@/lib/supervisor/types';
|
||||
import { ProcessInfo, ProcessStateCode, getProcessStateClass, formatUptime, canStartProcess, canStopProcess } from '@/lib/supervisor/types';
|
||||
import { useStartProcess, useStopProcess, useRestartProcess } from '@/lib/hooks/useSupervisor';
|
||||
import { cn } from '@/lib/utils/cn';
|
||||
|
||||
@@ -36,7 +36,7 @@ export function ProcessCard({ process }: ProcessCardProps) {
|
||||
<Badge
|
||||
className={cn(
|
||||
'ml-2',
|
||||
getProcessStateClass(process.state),
|
||||
getProcessStateClass(process.state as ProcessStateCode),
|
||||
'border px-3 py-1 font-mono text-xs'
|
||||
)}
|
||||
>
|
||||
@@ -77,7 +77,7 @@ export function ProcessCard({ process }: ProcessCardProps) {
|
||||
size="sm"
|
||||
variant="success"
|
||||
onClick={handleStart}
|
||||
disabled={!canStartProcess(process.state) || isLoading}
|
||||
disabled={!canStartProcess(process.state as ProcessStateCode) || isLoading}
|
||||
className="flex-1"
|
||||
>
|
||||
<Play className="h-4 w-4" />
|
||||
@@ -87,7 +87,7 @@ export function ProcessCard({ process }: ProcessCardProps) {
|
||||
size="sm"
|
||||
variant="warning"
|
||||
onClick={handleStop}
|
||||
disabled={!canStopProcess(process.state) || isLoading}
|
||||
disabled={!canStopProcess(process.state as ProcessStateCode) || isLoading}
|
||||
className="flex-1"
|
||||
>
|
||||
<Square className="h-4 w-4" />
|
||||
|
||||
Reference in New Issue
Block a user