feat(sources): replace WatcherGuru with CNBC Business
Add the CNBC Business RSS source, switch supported-source wiring and reporting, and migrate existing WatcherGuru rows to disabled historical status without rewriting references. Refs #23 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -1,7 +1,11 @@
|
||||
import type { GenerationOutcome } from '@/api/summaries'
|
||||
|
||||
function sourceLabel(type: string) {
|
||||
return type === 'cnbc_business' ? 'CNBC Business' : type
|
||||
}
|
||||
|
||||
export function GenerationDetails({ outcome }: { outcome: GenerationOutcome }) {
|
||||
const unavailable = outcome.source_stats.filter(source => source.status === 'failed').map(source => source.source_type)
|
||||
const unavailable = outcome.source_stats.filter(source => source.status === 'failed').map(source => sourceLabel(source.source_type))
|
||||
return (
|
||||
<section className="space-y-3" aria-label="Bilan de la génération">
|
||||
{outcome.status === 'partial' && (
|
||||
@ -23,7 +27,7 @@ export function GenerationDetails({ outcome }: { outcome: GenerationOutcome }) {
|
||||
<thead><tr><th scope="col">Source</th><th scope="col">État</th><th scope="col">Examinés</th><th scope="col">Sélectionnés par Laya</th><th scope="col">Retenus</th><th scope="col">Plafond</th></tr></thead>
|
||||
<tbody>{outcome.source_stats.map(source => (
|
||||
<tr key={source.source_id}>
|
||||
<th scope="row">{source.source_type}</th>
|
||||
<th scope="row">{sourceLabel(source.source_type)}</th>
|
||||
<td>{source.status === 'failed' ? 'Indisponible' : 'Disponible'}</td>
|
||||
<td>{source.candidates}</td><td>{source.laya_selected}</td><td>{source.selected}</td><td>{source.article_limit}</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user