feat(backoffice): améliorer les détails de job avec historique des phases
- Ajoute migration 0015 : colonne phase2_started_at sur index_jobs - Indexer : renseigne phase2_started_at lors du passage à generating_thumbnails - API : expose phase2_started_at et book_id dans IndexJobDetailResponse - Page détail : timeline avec durée de chaque phase (Discovery / Thumbnails) - Page détail : banners contextuels (success/failed/cancelled) avec résumé en une ligne - Page détail : description textuelle du type de job, durée dans l'overview - Page détail : stats normalisées selon le type (index vs thumbnail-only) - JobRow : affiche le type via JobTypeBadge (cohérence visuelle) - Badge : labels lisibles pour tous les types de jobs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { JobProgress } from "./JobProgress";
|
||||
import { StatusBadge, Button, MiniProgressBar } from "./ui";
|
||||
import { StatusBadge, JobTypeBadge, Button, MiniProgressBar } from "./ui";
|
||||
|
||||
interface JobRowProps {
|
||||
job: {
|
||||
@@ -93,8 +93,8 @@ export function JobRow({ job, libraryName, highlighted, onCancel, formatDate, fo
|
||||
<td className="px-4 py-3 text-sm text-foreground">
|
||||
{job.library_id ? libraryName || job.library_id.slice(0, 8) : "—"}
|
||||
</td>
|
||||
<td className="px-4 py-3 text-sm text-foreground">
|
||||
{job.type === "cbr_to_cbz" ? "CBR → CBZ" : job.type}
|
||||
<td className="px-4 py-3">
|
||||
<JobTypeBadge type={job.type} />
|
||||
</td>
|
||||
<td className="px-4 py-3">
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
|
||||
@@ -94,8 +94,11 @@ const jobTypeVariants: Record<string, BadgeVariant> = {
|
||||
};
|
||||
|
||||
const jobTypeLabels: Record<string, string> = {
|
||||
rebuild: "Index",
|
||||
full_rebuild: "Full Index",
|
||||
thumbnail_rebuild: "Thumbnails",
|
||||
thumbnail_regenerate: "Regenerate",
|
||||
thumbnail_regenerate: "Regen. Thumbnails",
|
||||
cbr_to_cbz: "CBR → CBZ",
|
||||
};
|
||||
|
||||
interface JobTypeBadgeProps {
|
||||
|
||||
Reference in New Issue
Block a user