alot of othe mess fro autoamtion overview an ddetiaeld run apge sonly

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-17 10:13:08 +00:00
parent 6b1fa0c1ee
commit 0435a5cf70
14 changed files with 1727 additions and 470 deletions

View File

@@ -344,4 +344,70 @@ export const automationService = {
}> => {
return fetchAPI(buildUrl('/eligibility/', { site_id: siteId }));
},
/**
* Get trend data for credits usage visualization
*/
getTrendData: async (siteId: number, limit: number = 10): Promise<{
trend_data: Array<{
run_id: string;
run_number: number;
credits_used: number;
items_created: number;
date: string;
status: string;
}>;
summary: {
total_runs: number;
total_credits: number;
total_items: number;
avg_credits_per_run: number;
avg_credits_per_item: number;
};
}> => {
return fetchAPI(buildUrl('/trend_data/', { site_id: siteId, limit }));
},
/**
* Get actual production statistics - what was really created
*/
getProductionStats: async (siteId: number): Promise<{
totals: {
total_runs: number;
productive_runs: number;
total_credits: number;
clusters_created: number;
ideas_created: number;
tasks_created: number;
content_created: number;
prompts_created: number;
images_created: number;
approved_content: number;
};
stage_efficiency: Array<{
stage: number;
name: string;
total_input: number;
total_output: number;
total_credits: number;
runs_with_data: number;
}>;
meaningful_runs: Array<{
run_id: string;
run_number: number;
status: string;
started_at: string;
duration_seconds: number;
total_credits: number;
stages: Array<{
stage: number;
name: string;
input: number;
output: number;
credits: number;
}>;
}>;
}> => {
return fetchAPI(buildUrl('/production_stats/', { site_id: siteId }));
},
};