// deployment-edit-service/IngressListItem.tsx — 单个 Ingress 卡片(关联高亮 + 路由规则) // 纯展示组件:接收 ing + matched 状态 + 编辑/删除回调。 import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { CheckCircle, GitBranch, Pencil, Server, Trash2 } from 'lucide-react'; import i18n from '@/i18n'; import type { IngSummary } from './types'; interface Props { ing: IngSummary; matched: boolean; onEdit: () => void; onDelete: () => void; } export function IngressListItem({ ing, matched, onEdit, onDelete }: Props) { return (
{r.host || '*'}
{r.paths.map((p, j) => (
{p.path} → {p.backend.service}:{String(p.backend.port)}
))}