123
This commit is contained in:
@@ -458,45 +458,6 @@ export default function DebugStatus() {
|
||||
return checks;
|
||||
}, []);
|
||||
|
||||
// Check Content Manager module health (taxonomy relations)
|
||||
const checkContentManagerModule = useCallback(async (): Promise<HealthCheck[]> => {
|
||||
const checks: HealthCheck[] = [];
|
||||
|
||||
// Check Taxonomy endpoint
|
||||
try {
|
||||
const { response: taxonomyResp, data: taxonomyData } = await apiCall('/v1/writer/taxonomy/');
|
||||
|
||||
if (taxonomyResp.ok && taxonomyData?.success !== false) {
|
||||
checks.push({
|
||||
name: 'Taxonomy System',
|
||||
description: 'Content taxonomy endpoint',
|
||||
status: 'healthy',
|
||||
message: `Found ${taxonomyData?.count || 0} taxonomy items`,
|
||||
lastChecked: new Date().toISOString(),
|
||||
});
|
||||
} else {
|
||||
checks.push({
|
||||
name: 'Taxonomy System',
|
||||
description: 'Content taxonomy endpoint',
|
||||
status: 'error',
|
||||
message: taxonomyData?.error || `Failed with ${taxonomyResp.status}`,
|
||||
details: 'Check ContentTaxonomyRelation through model and field mappings',
|
||||
lastChecked: new Date().toISOString(),
|
||||
});
|
||||
}
|
||||
} catch (error: any) {
|
||||
checks.push({
|
||||
name: 'Taxonomy System',
|
||||
description: 'Content taxonomy endpoint',
|
||||
status: 'error',
|
||||
message: error.message || 'Network error',
|
||||
lastChecked: new Date().toISOString(),
|
||||
});
|
||||
}
|
||||
|
||||
return checks;
|
||||
}, []);
|
||||
|
||||
// Run all health checks
|
||||
const runAllChecks = useCallback(async () => {
|
||||
setLoading(true);
|
||||
@@ -506,12 +467,11 @@ export default function DebugStatus() {
|
||||
const schemaCheck = await checkDatabaseSchemaMapping();
|
||||
|
||||
// Run module checks in parallel
|
||||
const [writerChecks, plannerChecks, sitesChecks, integrationChecks, contentMgrChecks] = await Promise.all([
|
||||
const [writerChecks, plannerChecks, sitesChecks, integrationChecks] = await Promise.all([
|
||||
checkWriterModule(),
|
||||
checkPlannerModule(),
|
||||
checkSitesModule(),
|
||||
checkIntegrationModule(),
|
||||
checkContentManagerModule(),
|
||||
]);
|
||||
|
||||
// Build module health results
|
||||
@@ -541,11 +501,6 @@ export default function DebugStatus() {
|
||||
description: 'External platform sync (WordPress, etc.)',
|
||||
checks: integrationChecks,
|
||||
},
|
||||
{
|
||||
module: 'Content Manager',
|
||||
description: 'Taxonomy and content organization',
|
||||
checks: contentMgrChecks,
|
||||
},
|
||||
];
|
||||
|
||||
setModuleHealths(moduleHealthResults);
|
||||
@@ -560,7 +515,6 @@ export default function DebugStatus() {
|
||||
checkPlannerModule,
|
||||
checkSitesModule,
|
||||
checkIntegrationModule,
|
||||
checkContentManagerModule,
|
||||
]);
|
||||
|
||||
// Run checks on mount
|
||||
|
||||
Reference in New Issue
Block a user