diff --git a/tools/nightcrawler/frontend-controlpanel/src/pages/CaptchaStats.tsx b/tools/nightcrawler/frontend-controlpanel/src/pages/CaptchaStats.tsx index d09d41c58..f65815405 100644 --- a/tools/nightcrawler/frontend-controlpanel/src/pages/CaptchaStats.tsx +++ b/tools/nightcrawler/frontend-controlpanel/src/pages/CaptchaStats.tsx @@ -26,7 +26,7 @@ import type { CaptchaStatsResponse, CaptchaRecentAttempt, CaptchaModelsResponse const ChartGrid = styled.div` display: grid; - grid-template-columns: 280px 1fr; + grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; @@ -35,6 +35,30 @@ const ChartGrid = styled.div` } `; +const ChartLegend = styled.div` + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 12px; + margin-top: 12px; +`; + +const ChartLegendItem = styled.div` + display: flex; + align-items: center; + gap: 6px; + font-size: 12px; + color: ${({ theme }) => theme.colors.text.secondary}; +`; + +const LegendDot = styled.span<{ $color: string }>` + display: inline-block; + width: 8px; + height: 8px; + border-radius: 50%; + background: ${({ $color }) => $color}; +`; + const EmptyState = styled.div` padding: 32px; text-align: center; @@ -350,11 +374,23 @@ export const CaptchaStats = () => {
Status Breakdown d.value > 0)} minHeight={200} size={200}> - 1} size={200} /> - {pieData.length === 1 && firstPieSlice && ( -
- {firstPieSlice.label}: {firstPieSlice.value} (100%) -
+ + {pieData.length === 1 && firstPieSlice ? ( + + + + {firstPieSlice.label}: {firstPieSlice.value} (100%) + + + ) : ( + + {pieData.filter((d) => d.value > 0).map((d) => ( + + + {d.label} + + ))} + )}
@@ -363,6 +399,16 @@ export const CaptchaStats = () => { Hourly Activity (24h) 0} minHeight={160} variant="bar"> + + + + Success > Failed + + + + Failed > Success + + diff --git a/tools/nightcrawler/frontend-controlpanel/src/pages/CrawlJobs.tsx b/tools/nightcrawler/frontend-controlpanel/src/pages/CrawlJobs.tsx index c93580002..145205b50 100644 --- a/tools/nightcrawler/frontend-controlpanel/src/pages/CrawlJobs.tsx +++ b/tools/nightcrawler/frontend-controlpanel/src/pages/CrawlJobs.tsx @@ -743,7 +743,7 @@ export const CrawlJobs = () => { Fill Processing Queue - Enqueue providers missing bio data for reprocessing. + Enqueue providers missing bio data for reprocessing. Set quantity to 0 for all. {settings?.fromHtml ? ' Using saved HTML snapshots (offline mode).' : ' Live scrape mode.'} @@ -759,8 +759,8 @@ export const CrawlJobs = () => { setFillLimit(e.target.value)} style={{ width: 80, fontSize: 11 }}