fix: Fix orchestrator dashboard service errors

Fixed two critical issues preventing dashboard from loading:

1. OrchestrationStatus enum case mismatch:
   - Changed OrchestrationStatus.COMPLETED → .completed
   - Changed OrchestrationStatus.COMPLETED_WITH_WARNINGS → .partial_success
   - Enum values are lowercase, not uppercase

2. Service hostname resolution errors:
   - Fixed all service URLs to include -service suffix:
     - http://inventory:8000http://inventory-service:8000
     - http://production:8000http://production-service:8000
     - http://procurement:8000http://procurement-service:8000
     - http://alert-processor:8000http://alert-processor-service:8000

This fixes the AttributeError and "Name or service not known" errors
preventing the dashboard from loading demo data.
This commit is contained in:
Claude
2025-11-07 21:53:51 +00:00
parent eabd5eedc7
commit b732c0742b
2 changed files with 15 additions and 15 deletions

View File

@@ -213,8 +213,8 @@ class DashboardService:
select(OrchestrationRun)
.where(OrchestrationRun.tenant_id == tenant_id)
.where(OrchestrationRun.status.in_([
OrchestrationStatus.COMPLETED,
OrchestrationStatus.COMPLETED_WITH_WARNINGS
OrchestrationStatus.completed,
OrchestrationStatus.partial_success
]))
.order_by(desc(OrchestrationRun.started_at))
.limit(1)
@@ -259,8 +259,8 @@ class DashboardService:
select(OrchestrationRun)
.where(OrchestrationRun.tenant_id == tenant_id)
.where(OrchestrationRun.status.in_([
OrchestrationStatus.COMPLETED,
OrchestrationStatus.COMPLETED_WITH_WARNINGS
OrchestrationStatus.completed,
OrchestrationStatus.partial_success
]))
.order_by(desc(OrchestrationRun.started_at))
.limit(1)