import React from 'react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/index'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/index'; import { Button } from '@/components/ui/index'; import { MoreHorizontal } from 'lucide-react'; interface HAResourceInfo { id: string; name: string; type: string; group: string; node: string; managed: boolean; failed: boolean; status: string; } interface HAResourcesListProps { resources: HAResourceInfo[]; onRefresh?: () => void; isLoading?: boolean; onManage?: (resource: HAResourceInfo) => void; onUnmanage?: (resource: HAResourceInfo) => void; onFailover?: (resource: HAResourceInfo) => void; } export function HAResourcesList({ resources, onRefresh, isLoading, onManage, onUnmanage, onFailover, }: HAResourcesListProps) { const managedCount = resources.filter((r) => r.managed).length; const failedCount = resources.filter((r) => r.failed).length; return ( HA Resources
{managedCount} Managed
{failedCount} Failed
Name Type Group Node Status Actions {resources.map((resource) => ( {resource.name} {resource.type} {resource.group} {resource.node} {resource.failed ? 'Failed' : resource.managed ? 'Managed' : 'Unmanaged'}
{resource.managed ? ( ) : ( )}
))}
); }