Update ui/components.py
Browse files- 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 -
|
| 1406 |
-
# app.py expects: detection_time, recall_quality, confidence_score, sequencing_stage
|
| 1407 |
detection_time = gr.HTML()
|
| 1408 |
-
|
| 1409 |
-
|
| 1410 |
-
|
| 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 -
|
| 1472 |
-
detection_time,
|
| 1473 |
-
oss_results_display, enterprise_results_display, approval_display, demo_btn
|
| 1474 |
-
#
|
| 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 |
# -----------------------------
|