fix(admin-web): fix agent-evals run endpoint + disable delete (no backend)
- B18: POST /agent-evals/suites/:id/run → /suites/:id/runs (plural) - B19: DELETE /agent-evals/suites/:id has no backend endpoint — disabled with TODO Q3
This commit is contained in:
parent
587d22e107
commit
c54a3fe277
@ -11,7 +11,6 @@ import {
|
|||||||
CheckCircle2,
|
CheckCircle2,
|
||||||
XCircle,
|
XCircle,
|
||||||
Clock,
|
Clock,
|
||||||
Trash2,
|
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
@ -104,15 +103,17 @@ export default function AgentEvalsPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleRun(id: string) {
|
async function handleRun(id: string) {
|
||||||
await apiFetch(`suites/${id}/run`, { method: 'POST' });
|
await apiFetch(`suites/${id}/runs`, { method: 'POST' });
|
||||||
loadData();
|
loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete(id: string) {
|
// TODO Q3: Backend has no DELETE /agent-evals/suites/:id endpoint.
|
||||||
if (!confirm('Delete this evaluation suite?')) return;
|
// When suite deletion is implemented, uncomment this.
|
||||||
await apiFetch(`suites/${id}`, { method: 'DELETE' });
|
// async function handleDelete(id: string) {
|
||||||
loadData();
|
// if (!confirm('Delete this evaluation suite?')) return;
|
||||||
}
|
// await apiFetch(`suites/${id}`, { method: 'DELETE' });
|
||||||
|
// loadData();
|
||||||
|
// }
|
||||||
|
|
||||||
const passedCount = suites.filter(s => s.lastRunStatus === 'passed').length;
|
const passedCount = suites.filter(s => s.lastRunStatus === 'passed').length;
|
||||||
const failedCount = suites.filter(s => s.lastRunStatus === 'failed').length;
|
const failedCount = suites.filter(s => s.lastRunStatus === 'failed').length;
|
||||||
@ -244,13 +245,7 @@ export default function AgentEvalsPage() {
|
|||||||
<Play className="mr-2 h-4 w-4" />
|
<Play className="mr-2 h-4 w-4" />
|
||||||
Run
|
Run
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
{/* TODO Q3: Delete disabled — no backend endpoint yet */}
|
||||||
onClick={() => handleDelete(s.id)}
|
|
||||||
className="text-destructive"
|
|
||||||
>
|
|
||||||
<Trash2 className="mr-2 h-4 w-4" />
|
|
||||||
Delete
|
|
||||||
</DropdownMenuItem>
|
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user