- {/* Keywords */}
-
-
-
- {(() => {
- const res = getStageResult(1);
- const total = res?.total ?? pipelineOverview[0]?.counts?.total ?? metrics?.keywords?.total ?? pipelineOverview[0]?.pending ?? 0;
- return (
-
- );
- })()}
-
- {(() => {
- const res = getStageResult(1);
- const newCount = res?.new ?? res?.new_items ?? pipelineOverview[0]?.counts?.new ?? metrics?.keywords?.new ?? 0;
- const mapped = res?.mapped ?? pipelineOverview[0]?.counts?.mapped ?? metrics?.keywords?.mapped ?? 0;
- return (
- renderMetricRow([
- { label: 'New:', value: newCount, colorCls: 'text-brand-600' },
- { label: 'Mapped:', value: mapped, colorCls: 'text-brand-600' },
- ])
- );
- })()}
-
-
- {/* Clusters */}
-
-
-
- {(() => {
- const res = getStageResult(2);
- const total = res?.total ?? pipelineOverview[1]?.counts?.total ?? metrics?.clusters?.total ?? pipelineOverview[1]?.pending ?? 0;
- return (
-
- );
- })()}
-
- {(() => {
- const res = getStageResult(2);
- const newCount = res?.new ?? res?.new_items ?? pipelineOverview[1]?.counts?.new ?? metrics?.clusters?.new ?? 0;
- const mapped = res?.mapped ?? pipelineOverview[1]?.counts?.mapped ?? metrics?.clusters?.mapped ?? 0;
- return (
- renderMetricRow([
- { label: 'New:', value: newCount, colorCls: 'text-purple-600' },
- { label: 'Mapped:', value: mapped, colorCls: 'text-purple-600' },
- ])
- );
- })()}
-
-
- {/* Ideas */}
-
-
-
- {(() => {
- const res = getStageResult(3);
- const total = res?.total ?? pipelineOverview[2]?.counts?.total ?? metrics?.ideas?.total ?? pipelineOverview[2]?.pending ?? 0;
- return (
-
- );
- })()}
-
- {(() => {
- const res = getStageResult(3);
- const newCount = res?.new ?? res?.new_items ?? pipelineOverview[2]?.counts?.new ?? metrics?.ideas?.new ?? 0;
- const queued = res?.queued ?? pipelineOverview[2]?.counts?.queued ?? metrics?.ideas?.queued ?? 0;
- const completed = res?.completed ?? pipelineOverview[2]?.counts?.completed ?? metrics?.ideas?.completed ?? 0;
- return (
- renderMetricRow([
- { label: 'New:', value: newCount, colorCls: 'text-warning-600' },
- { label: 'Queued:', value: queued, colorCls: 'text-warning-600' },
- { label: 'Completed:', value: completed, colorCls: 'text-warning-600' },
- ])
- );
- })()}
-
-
- {/* Content */}
-
-
-
- {(() => {
- const res = getStageResult(4);
- const total = res?.total ?? pipelineOverview[3]?.counts?.total ?? metrics?.content?.total ?? pipelineOverview[3]?.pending ?? 0;
- return (
-
- );
- })()}
-
- {(() => {
- const res = getStageResult(4);
- const draft = res?.draft ?? res?.drafts ?? pipelineOverview[3]?.counts?.draft ?? metrics?.content?.draft ?? 0;
- const review = res?.review ?? res?.in_review ?? pipelineOverview[3]?.counts?.review ?? metrics?.content?.review ?? 0;
- const publish = res?.published ?? res?.publish ?? pipelineOverview[3]?.counts?.published ?? metrics?.content?.published ?? 0;
- return (
- renderMetricRow([
- { label: 'Draft:', value: draft, colorCls: 'text-success-600' },
- { label: 'Review:', value: review, colorCls: 'text-success-600' },
- { label: 'Publish:', value: publish, colorCls: 'text-success-600' },
- ])
- );
- })()}
-
-
- {/* Images */}
-
-
-
- {(() => {
- const res = getStageResult(6);
- const total = res?.total ?? pipelineOverview[5]?.counts?.total ?? metrics?.images?.total ?? pipelineOverview[5]?.pending ?? 0;
- return (
-
- );
- })()}
-
- {(() => {
- const res = getStageResult(6); // stage 6 is Image Prompts -> Images
- if (res && typeof res === 'object') {
- const entries = Object.entries(res);
- const items = entries.slice(0,3).map(([k, v]) => ({ label: `${k.replace(/_/g, ' ')}:`, value: Number(v) || 0, colorCls: 'text-info-600' }));
- return renderMetricRow(items);
- }
- const counts = pipelineOverview[5]?.counts ?? metrics?.images ?? null;
- if (counts && typeof counts === 'object') {
- const entries = Object.entries(counts);
- const items = entries.slice(0,3).map(([k, v]) => ({ label: `${k.replace(/_/g, ' ')}:`, value: Number(v) || 0, colorCls: 'text-info-600' }));
- return renderMetricRow(items);
- }
- return renderMetricRow([
- { label: 'Pending:', value: pipelineOverview[5]?.pending ?? metrics?.images?.pending ?? 0, colorCls: 'text-info-600' },
- ]);
- })()}
-
-
-
{/* Global Progress Bar - Shows full pipeline progress during automation run */}
{currentRun && (currentRun.status === 'running' || currentRun.status === 'paused') && (