spb/trouve-ka Public
Trouve-KA — moteur de recherche web indépendant, Québec-first. Crawler distribué, index OpenSearch, ranking bilingue, galerie d'images. En prod : www.trouve-ka.com
Python 76.8%
TypeScript 15.7%
SQL 3.9%
Shell 1.4%
CSS 1.3%
Dockerfile 0.7%
1/**2 * Trouve-KA — table des erreurs de crawl récentes3 * Author: Simon-Pierre Boucher4 * Contact: contact@spboucher.ai5 */67import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";8import { formatTime } from "@/lib/format";9import type { AdminOverview } from "@/lib/types";1011interface RecentErrorsProps {12 errors: AdminOverview["recent_errors"];13}1415export function RecentErrors({ errors }: RecentErrorsProps) {16 return (17 <Card>18 <CardHeader>19 <CardTitle>Erreurs récentes</CardTitle>20 </CardHeader>21 <CardContent>22 {errors.length === 0 ? (23 <p className="text-sm text-ink-2">24 Aucune erreur récente. Tout roule.25 </p>26 ) : (27 <table className="src-table">28 <caption className="sr-only">29 Erreurs de crawl récentes, avec l'URL, le code d'erreur et30 l'heure31 </caption>32 <thead>33 <tr>34 <th scope="col">URL</th>35 <th scope="col">Code d'erreur</th>36 <th scope="col" className="!text-right">37 Heure38 </th>39 </tr>40 </thead>41 <tbody>42 {errors.map((error, index) => (43 <tr key={`${error.url}-${error.at}-${index}`}>44 <td className="max-w-0 truncate text-ink">{error.url}</td>45 <td className="gk-mono whitespace-nowrap text-xs font-bold text-danger">46 {error.error_code}47 </td>48 <td className="gk-mono whitespace-nowrap text-right tabular-nums text-ink-2">49 {formatTime(error.at)}50 </td>51 </tr>52 ))}53 </tbody>54 </table>55 )}56 </CardContent>57 </Card>58 );59}60