petter2025 commited on
Commit
5a8e8df
·
verified ·
1 Parent(s): 8f8a739

Update ui/components.py

Browse files
Files changed (1) hide show
  1. ui/components.py +11 -12
ui/components.py CHANGED
@@ -1402,12 +1402,11 @@ def create_tab1_incident_demo(scenarios=INCIDENT_SCENARIOS, default_scenario="Ca
1402
  # Real-time Metrics Dashboard
1403
  metrics_header = gr.Markdown("## 📊 Performance Metrics")
1404
 
1405
- # Metric Cards Grid - FIXED to match app.py expectations
1406
- # app.py expects: detection_time, recall_quality, confidence_score, sequencing_stage
1407
  detection_time = gr.HTML()
1408
- recall_quality = gr.HTML() # Changed from mttr
1409
- confidence_score = gr.HTML() # Changed from auto_heal
1410
- sequencing_stage = gr.HTML() # Changed from savings
1411
 
1412
  # Results Display Areas
1413
  oss_results_header = gr.Markdown("### 🆓 Policy Analysis Results")
@@ -1461,18 +1460,18 @@ def create_tab1_incident_demo(scenarios=INCIDENT_SCENARIOS, default_scenario="Ca
1461
  )
1462
  demo_info = gr.Markdown("*Experience the full workflow from detection to resolution*")
1463
 
 
1464
  return (
1465
- # Left column returns
1466
  scenario_dropdown, historical_panel, scenario_card, telemetry_viz, impact_viz,
1467
- # Middle column returns
1468
  observation_gate_placeholder, sequencing_panel, workflow_header, detection_process,
1469
  recall_process, decision_process, oss_section, enterprise_section, oss_btn, enterprise_btn,
1470
  approval_toggle, mcp_mode, timeline_viz,
1471
- # Right column returns - FIXED to match app.py expectations
1472
- detection_time, recall_quality, confidence_score, sequencing_stage, # Changed variable names
1473
- oss_results_display, enterprise_results_display, approval_display, demo_btn,
1474
- # Also return the info elements that app.py might need
1475
- oss_info, enterprise_info, demo_info
1476
  )
1477
 
1478
  # -----------------------------
 
1402
  # Real-time Metrics Dashboard
1403
  metrics_header = gr.Markdown("## 📊 Performance Metrics")
1404
 
1405
+ # Metric Cards Grid - MUST MATCH app.py expectations: detection_time, mttr, auto_heal, savings
 
1406
  detection_time = gr.HTML()
1407
+ mttr = gr.HTML() # Mean Time to Resolve
1408
+ auto_heal = gr.HTML() # Auto-heal rate
1409
+ savings = gr.HTML() # Cost savings
1410
 
1411
  # Results Display Areas
1412
  oss_results_header = gr.Markdown("### 🆓 Policy Analysis Results")
 
1460
  )
1461
  demo_info = gr.Markdown("*Experience the full workflow from detection to resolution*")
1462
 
1463
+ # CRITICAL: Return EXACTLY 26 values that app.py expects
1464
  return (
1465
+ # Left column returns (5 values)
1466
  scenario_dropdown, historical_panel, scenario_card, telemetry_viz, impact_viz,
1467
+ # Middle column returns (13 values)
1468
  observation_gate_placeholder, sequencing_panel, workflow_header, detection_process,
1469
  recall_process, decision_process, oss_section, enterprise_section, oss_btn, enterprise_btn,
1470
  approval_toggle, mcp_mode, timeline_viz,
1471
+ # Right column returns (8 values - MUST BE: detection_time, mttr, auto_heal, savings, oss_results_display, enterprise_results_display, approval_display, demo_btn)
1472
+ detection_time, mttr, auto_heal, savings,
1473
+ oss_results_display, enterprise_results_display, approval_display, demo_btn
1474
+ # DO NOT include: oss_info, enterprise_info, demo_info - app.py doesn't expect them
 
1475
  )
1476
 
1477
  # -----------------------------