Update ui/components.py
Browse files- ui/components.py +299 -283
ui/components.py
CHANGED
|
@@ -102,12 +102,13 @@ def create_status_bar() -> gr.HTML:
|
|
| 102 |
""")
|
| 103 |
|
| 104 |
# -----------------------------
|
| 105 |
-
# Tab 1: Live Incident Demo - UPDATED TO USE INLINE STYLES
|
| 106 |
# -----------------------------
|
| 107 |
def create_tab1_incident_demo(scenarios=INCIDENT_SCENARIOS, default_scenario="Cache Miss Storm") -> tuple:
|
| 108 |
"""
|
| 109 |
Create an expressive, comprehensive incident demo tab for ARF.
|
| 110 |
Shows the complete OSS analysis → Enterprise execution workflow.
|
|
|
|
| 111 |
"""
|
| 112 |
|
| 113 |
# Get the default scenario data
|
|
@@ -115,318 +116,334 @@ def create_tab1_incident_demo(scenarios=INCIDENT_SCENARIOS, default_scenario="Ca
|
|
| 115 |
business_impact = default_scenario_data.get("business_impact", {})
|
| 116 |
metrics = default_scenario_data.get("metrics", {})
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
<div style="
|
| 134 |
-
<
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
<div style="margin-top: 15px;">
|
| 138 |
-
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 0;">
|
| 139 |
-
<span style="font-size: 13px; color: #64748b; font-weight: 500;">Component:</span>
|
| 140 |
-
<span style="font-size: 14px; color: #1e293b; font-weight: 600;">{default_scenario_data.get('component', 'Unknown').replace('_', ' ').title()}</span>
|
| 141 |
-
</div>
|
| 142 |
-
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 0;">
|
| 143 |
-
<span style="font-size: 13px; color: #64748b; font-weight: 500;">Affected Users:</span>
|
| 144 |
-
<span style="font-size: 14px; color: #1e293b; font-weight: 600;">{metrics.get('affected_users', 'Unknown') if 'affected_users' in metrics else 'Unknown'}</span>
|
| 145 |
-
</div>
|
| 146 |
-
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 0;">
|
| 147 |
-
<span style="font-size: 13px; color: #64748b; font-weight: 500;">Revenue Risk:</span>
|
| 148 |
-
<span style="font-size: 14px; color: #ef4444; font-weight: 700;">${business_impact.get('revenue_loss_per_hour', 0):,}/hour</span>
|
| 149 |
-
</div>
|
| 150 |
-
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 0;">
|
| 151 |
-
<span style="font-size: 13px; color: #64748b; font-weight: 500;">Detection Time:</span>
|
| 152 |
-
<span style="font-size: 14px; color: #1e293b; font-weight: 600;">45 seconds (ARF AI)</span>
|
| 153 |
-
</div>
|
| 154 |
-
<div style="display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #f1f5f9;">
|
| 155 |
-
<span style="padding: 3px 8px; background: #f1f5f9; border-radius: 6px; font-size: 11px; color: #475569; font-weight: 500;">{default_scenario_data.get('component', 'unknown').split('_')[0]}</span>
|
| 156 |
-
<span style="padding: 3px 8px; background: #f1f5f9; border-radius: 6px; font-size: 11px; color: #475569; font-weight: 500;">{default_scenario_data.get('severity', 'high').lower()}</span>
|
| 157 |
-
<span style="padding: 3px 8px; background: #f1f5f9; border-radius: 6px; font-size: 11px; color: #475569; font-weight: 500;">production</span>
|
| 158 |
-
<span style="padding: 3px 8px; background: #f1f5f9; border-radius: 6px; font-size: 11px; color: #475569; font-weight: 500;">incident</span>
|
| 159 |
</div>
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
<div style="font-size: 32px; margin-bottom: 10px; opacity: 0.5;">🕵️♂️</div>
|
| 183 |
-
<div style="width: 100%;">
|
| 184 |
-
<h4 style="margin: 0 0 8px 0; font-size: 16px; color: #94a3b8;">Detection Agent</h4>
|
| 185 |
-
<p style="font-size: 13px; color: #cbd5e1; margin-bottom: 12px; line-height: 1.4;">Click "Run OSS Analysis" to activate</p>
|
| 186 |
-
<div style="display: flex; justify-content: space-around; margin-bottom: 12px;">
|
| 187 |
-
<span style="font-size: 11px; padding: 3px 8px; background: rgba(255, 255, 255, 0.5); border-radius: 6px; color: #cbd5e1; font-weight: 500;">Status: Inactive</span>
|
| 188 |
</div>
|
| 189 |
-
<div style="display: inline-block; padding: 5px 14px; background: #e2e8f0; border-radius: 20px; font-size: 12px; font-weight: bold; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;">WAITING</div>
|
| 190 |
</div>
|
| 191 |
</div>
|
| 192 |
""")
|
| 193 |
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
</div>
|
| 203 |
-
<div style="display: inline-block; padding: 5px 14px; background: #e2e8f0; border-radius: 20px; font-size: 12px; font-weight: bold; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;">WAITING</div>
|
| 204 |
</div>
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
<
|
|
|
|
| 216 |
</div>
|
| 217 |
-
<div style="display: inline-block; padding: 5px 14px; background: #e2e8f0; border-radius: 20px; font-size: 12px; font-weight: bold; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;">WAITING</div>
|
| 218 |
</div>
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
<
|
| 232 |
</div>
|
| 233 |
-
|
| 234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
</div>
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
</div>
|
| 241 |
-
<div>
|
| 242 |
-
<p style="margin:
|
| 243 |
-
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Pattern Match:</strong> Similar incident resolved with scaling (87% success rate)</p>
|
| 244 |
-
<p style="margin: 8px 0; font-size= 14px; color: #475569;"><strong>Safety Check:</strong> ✅ Passed (blast radius: 2 services)</p>
|
| 245 |
-
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Estimated Impact:</strong> Reduce MTTR from 45min to 12min</p>
|
| 246 |
</div>
|
| 247 |
-
<div style="
|
| 248 |
-
<div style="
|
| 249 |
-
|
| 250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
</div>
|
| 252 |
</div>
|
| 253 |
-
|
| 254 |
-
""")
|
| 255 |
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
</div>
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 271 |
<div>
|
| 272 |
-
<
|
| 273 |
-
<p style="
|
| 274 |
-
<p style="
|
| 275 |
-
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Users Protected:</strong> 45,000 → 0 impacted</p>
|
| 276 |
</div>
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
</div>
|
| 282 |
</div>
|
| 283 |
-
|
| 284 |
-
""")
|
| 285 |
-
|
| 286 |
-
# Execution Controls
|
| 287 |
-
with gr.Row():
|
| 288 |
-
with gr.Column(scale=1):
|
| 289 |
-
oss_btn = gr.Button(
|
| 290 |
-
"🆓 Run OSS Analysis",
|
| 291 |
-
variant="secondary",
|
| 292 |
-
size="lg"
|
| 293 |
-
)
|
| 294 |
-
oss_info = gr.Markdown("*Free, open-source analysis*")
|
| 295 |
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
choices=["👤 Require Human Approval"],
|
| 309 |
-
label="Safety Controls",
|
| 310 |
-
value=[],
|
| 311 |
-
info="Toggle human oversight"
|
| 312 |
-
)
|
| 313 |
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
timeline_viz = gr.Plot(label="", show_label=False)
|
| 326 |
-
|
| 327 |
-
# Right Column: Results & Metrics
|
| 328 |
-
with gr.Column(scale=1, variant="panel") as right_col:
|
| 329 |
-
# Real-time Metrics Dashboard
|
| 330 |
-
metrics_header = gr.Markdown("## 📊 Performance Metrics")
|
| 331 |
-
|
| 332 |
-
# Metric Cards Grid - USING INLINE STYLES
|
| 333 |
-
with gr.Row():
|
| 334 |
-
detection_time = gr.HTML("""
|
| 335 |
-
<div style="border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; background: white; margin: 8px; text-align: center; flex: 1; min-width: 140px; border-left: 4px solid #3b82f6;">
|
| 336 |
-
<div style="font-size: 28px; margin-bottom: 10px;">⏱️</div>
|
| 337 |
-
<div>
|
| 338 |
-
<h4 style="margin: 0 0 8px 0; font-size: 14px; color: #64748b; font-weight: 600;">Detection Time</h4>
|
| 339 |
-
<p style="font-size: 28px; font-weight: bold; color: #1e40af; margin: 8px 0;">45s</p>
|
| 340 |
-
<p style="font-size: 12px; color: #64748b; margin: 0;">↓ 89% faster than average</p>
|
| 341 |
-
</div>
|
| 342 |
-
</div>
|
| 343 |
-
""")
|
| 344 |
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
<div>
|
| 349 |
-
<h4 style="margin: 0
|
| 350 |
-
<
|
| 351 |
-
<p style="font-size: 12px; color: #64748b; margin: 0;">↓ 73% faster than manual</p>
|
| 352 |
</div>
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
<h4 style="margin: 0 0 8px 0; font-size: 14px; color: #64748b; font-weight: 600;">Auto-Heal Rate</h4>
|
| 362 |
-
<p style="font-size: 28px; font-weight: bold; color: #8b5cf6; margin: 8px 0;">81.7%</p>
|
| 363 |
-
<p style="font-size: 12px; color: #64748b; margin: 0;">↑ 5.4× industry average</p>
|
| 364 |
</div>
|
| 365 |
</div>
|
| 366 |
""")
|
| 367 |
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
</div>
|
| 376 |
-
</div>
|
| 377 |
-
""")
|
| 378 |
-
|
| 379 |
-
# Results Display Areas
|
| 380 |
-
oss_results_header = gr.Markdown("### 🆓 OSS Analysis Results")
|
| 381 |
-
oss_results_display = gr.JSON(
|
| 382 |
-
label="",
|
| 383 |
-
value={
|
| 384 |
-
"status": "Analysis Pending",
|
| 385 |
-
"agents": ["Detection", "Recall", "Decision"],
|
| 386 |
-
"mode": "Advisory Only",
|
| 387 |
-
"action": "Generate HealingIntent"
|
| 388 |
-
},
|
| 389 |
-
height=200
|
| 390 |
-
)
|
| 391 |
-
|
| 392 |
-
enterprise_results_header = gr.Markdown("### 💰 Enterprise Results")
|
| 393 |
-
enterprise_results_display = gr.JSON(
|
| 394 |
-
label="",
|
| 395 |
-
value={
|
| 396 |
-
"status": "Execution Pending",
|
| 397 |
-
"requires_license": True,
|
| 398 |
-
"available_modes": ["Approval", "Autonomous"],
|
| 399 |
-
"expected_outcome": "12m MTTR, $6.3K saved"
|
| 400 |
-
},
|
| 401 |
-
height=200
|
| 402 |
-
)
|
| 403 |
-
|
| 404 |
-
# Approval Status - USING INLINE STYLES
|
| 405 |
-
approval_display = gr.HTML("""
|
| 406 |
-
<div style="border: 2px solid #e2e8f0; border-radius: 14px; padding: 20px; background: white; margin-top: 20px;">
|
| 407 |
-
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 2px solid #f1f5f9;">
|
| 408 |
-
<h4 style="margin: 0; font-size: 16px; color: #1e293b;">👤 Human Approval Status</h4>
|
| 409 |
-
<span style="padding: 4px 12px; background: #10b981; color: white; border-radius: 8px; font-size: 12px; font-weight: bold; text-transform: uppercase;">Not Required</span>
|
| 410 |
-
</div>
|
| 411 |
-
<div style="margin-top: 15px;">
|
| 412 |
-
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Current Mode:</strong> Advisory (OSS Only)</p>
|
| 413 |
-
<p style="margin: 8px 0; font-size: 14px; color: #475569; font-style: italic;">Switch to "Approval" mode to enable human-in-the-loop workflows</p>
|
| 414 |
-
<div style="display: flex; flex-direction: column; gap: 10px; margin-top: 20px;">
|
| 415 |
-
<div style="padding: 12px; background: #f8fafc; border-radius: 10px; border-left: 4px solid #3b82f6; font-size: 14px; color: #475569; font-weight: 500;">1. ARF generates intent</div>
|
| 416 |
-
<div style="padding: 12px; background: #f8fafc; border-radius: 10px; border-left: 4px solid #3b82f6; font-size: 14px; color: #475569; font-weight: 500;">2. Human reviews & approves</div>
|
| 417 |
-
<div style="padding: 12px; background: #f8fafc; border-radius: 10px; border-left: 4px solid #3b82f6; font-size: 14px; color: #475569; font-weight: 500;">3. ARF executes safely</div>
|
| 418 |
-
</div>
|
| 419 |
-
</div>
|
| 420 |
-
</div>
|
| 421 |
-
""")
|
| 422 |
-
|
| 423 |
-
# Demo Actions
|
| 424 |
-
demo_btn = gr.Button(
|
| 425 |
-
"▶️ Run Complete Demo Walkthrough",
|
| 426 |
-
variant="secondary",
|
| 427 |
-
size="lg"
|
| 428 |
-
)
|
| 429 |
-
demo_info = gr.Markdown("*Experience the full ARF workflow from detection to resolution*")
|
| 430 |
|
| 431 |
return (
|
| 432 |
# Left column returns
|
|
@@ -439,7 +456,6 @@ def create_tab1_incident_demo(scenarios=INCIDENT_SCENARIOS, default_scenario="Ca
|
|
| 439 |
detection_time, mttr, auto_heal, savings,
|
| 440 |
oss_results_display, enterprise_results_display, approval_display, demo_btn
|
| 441 |
)
|
| 442 |
-
|
| 443 |
# -----------------------------
|
| 444 |
# Tab 2: Business ROI - Updated
|
| 445 |
# -----------------------------
|
|
|
|
| 102 |
""")
|
| 103 |
|
| 104 |
# -----------------------------
|
| 105 |
+
# Tab 1: Live Incident Demo - UPDATED TO USE INLINE STYLES AND PROPER PLOTLY HANDLING
|
| 106 |
# -----------------------------
|
| 107 |
def create_tab1_incident_demo(scenarios=INCIDENT_SCENARIOS, default_scenario="Cache Miss Storm") -> tuple:
|
| 108 |
"""
|
| 109 |
Create an expressive, comprehensive incident demo tab for ARF.
|
| 110 |
Shows the complete OSS analysis → Enterprise execution workflow.
|
| 111 |
+
UPDATED: Properly handles Plotly figures from app.py
|
| 112 |
"""
|
| 113 |
|
| 114 |
# Get the default scenario data
|
|
|
|
| 116 |
business_impact = default_scenario_data.get("business_impact", {})
|
| 117 |
metrics = default_scenario_data.get("metrics", {})
|
| 118 |
|
| 119 |
+
with gr.Row():
|
| 120 |
+
# Left Column: Scenario Selection & Live Visualization
|
| 121 |
+
with gr.Column(scale=1, variant="panel") as left_col:
|
| 122 |
+
# Scenario Selection with rich preview
|
| 123 |
+
scenario_dropdown = gr.Dropdown(
|
| 124 |
+
choices=list(scenarios.keys()),
|
| 125 |
+
value=default_scenario,
|
| 126 |
+
label="🎯 Select Incident Scenario",
|
| 127 |
+
info="Choose a production incident to analyze",
|
| 128 |
+
interactive=True,
|
| 129 |
+
container=False
|
| 130 |
+
)
|
| 131 |
+
|
| 132 |
+
# Scenario Card with rich information - USING INLINE STYLES
|
| 133 |
+
scenario_card = gr.HTML(f"""
|
| 134 |
+
<div style="border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-bottom: 20px;">
|
| 135 |
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 2px solid #f1f5f9;">
|
| 136 |
+
<h3 style="margin: 0; font-size: 18px; color: #1e293b;">🚨 {default_scenario}</h3>
|
| 137 |
+
<span style="padding: 4px 12px; background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); border-radius: 20px; font-size: 12px; font-weight: bold; color: white; text-transform: uppercase; letter-spacing: 0.5px;">{default_scenario_data.get('severity', 'HIGH')}</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
</div>
|
| 139 |
+
<div style="margin-top: 15px;">
|
| 140 |
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 0;">
|
| 141 |
+
<span style="font-size: 13px; color: #64748b; font-weight: 500;">Component:</span>
|
| 142 |
+
<span style="font-size: 14px; color: #1e293b; font-weight: 600;">{default_scenario_data.get('component', 'Unknown').replace('_', ' ').title()}</span>
|
| 143 |
+
</div>
|
| 144 |
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 0;">
|
| 145 |
+
<span style="font-size: 13px; color: #64748b; font-weight: 500;">Affected Users:</span>
|
| 146 |
+
<span style="font-size: 14px; color: #1e293b; font-weight: 600;">{metrics.get('affected_users', 'Unknown') if 'affected_users' in metrics else 'Unknown'}</span>
|
| 147 |
+
</div>
|
| 148 |
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 0;">
|
| 149 |
+
<span style="font-size: 13px; color: #64748b; font-weight: 500;">Revenue Risk:</span>
|
| 150 |
+
<span style="font-size: 14px; color: #ef4444; font-weight: 700;">${business_impact.get('revenue_loss_per_hour', 0):,}/hour</span>
|
| 151 |
+
</div>
|
| 152 |
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 0;">
|
| 153 |
+
<span style="font-size: 13px; color: #64748b; font-weight: 500;">Detection Time:</span>
|
| 154 |
+
<span style="font-size: 14px; color: #1e293b; font-weight: 600;">45 seconds (ARF AI)</span>
|
| 155 |
+
</div>
|
| 156 |
+
<div style="display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #f1f5f9;">
|
| 157 |
+
<span style="padding: 3px 8px; background: #f1f5f9; border-radius: 6px; font-size: 11px; color: #475569; font-weight: 500;">{default_scenario_data.get('component', 'unknown').split('_')[0]}</span>
|
| 158 |
+
<span style="padding: 3px 8px; background: #f1f5f9; border-radius: 6px; font-size: 11px; color: #475569; font-weight: 500;">{default_scenario_data.get('severity', 'high').lower()}</span>
|
| 159 |
+
<span style="padding: 3px 8px; background: #f1f5f9; border-radius: 6px; font-size: 11px; color: #475569; font-weight: 500;">production</span>
|
| 160 |
+
<span style="padding: 3px 8px; background: #f1f5f9; border-radius: 6px; font-size: 11px; color: #475569; font-weight: 500;">incident</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
</div>
|
|
|
|
| 162 |
</div>
|
| 163 |
</div>
|
| 164 |
""")
|
| 165 |
|
| 166 |
+
# Visualization section - USING gr.Plot() FOR PLOTLY FIGURES
|
| 167 |
+
with gr.Row():
|
| 168 |
+
with gr.Column(scale=1):
|
| 169 |
+
telemetry_header = gr.Markdown("### 📈 Live Telemetry")
|
| 170 |
+
# This expects a Plotly figure from app.py
|
| 171 |
+
telemetry_viz = gr.Plot(
|
| 172 |
+
label="",
|
| 173 |
+
show_label=False,
|
| 174 |
+
elem_id="telemetry_plot"
|
| 175 |
+
)
|
| 176 |
+
|
| 177 |
+
with gr.Column(scale=1):
|
| 178 |
+
impact_header = gr.Markdown("### 💰 Business Impact")
|
| 179 |
+
impact_viz = gr.Plot(
|
| 180 |
+
label="",
|
| 181 |
+
show_label=False,
|
| 182 |
+
elem_id="impact_plot"
|
| 183 |
+
)
|
| 184 |
+
|
| 185 |
+
# Middle Column: Agent Workflow
|
| 186 |
+
with gr.Column(scale=2, variant="panel") as middle_col:
|
| 187 |
+
# Agent Workflow Header
|
| 188 |
+
workflow_header = gr.Markdown("## 🔄 ARF Agent Workflow")
|
| 189 |
+
workflow_subheader = gr.Markdown("### How ARF transforms incidents into autonomous healing")
|
| 190 |
+
|
| 191 |
+
# Agent Status Cards - USING INLINE STYLES
|
| 192 |
+
with gr.Row():
|
| 193 |
+
detection_agent = gr.HTML("""
|
| 194 |
+
<div style="border: 2px solid #e2e8f0; border-radius: 14px; padding: 18px; background: #f8fafc; text-align: center; flex: 1; margin: 5px; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0.7;">
|
| 195 |
+
<div style="font-size: 32px; margin-bottom: 10px; opacity: 0.5;">🕵️♂️</div>
|
| 196 |
+
<div style="width: 100%;">
|
| 197 |
+
<h4 style="margin: 0 0 8px 0; font-size: 16px; color: #94a3b8;">Detection Agent</h4>
|
| 198 |
+
<p style="font-size: 13px; color: #cbd5e1; margin-bottom: 12px; line-height: 1.4;">Click "Run OSS Analysis" to activate</p>
|
| 199 |
+
<div style="display: flex; justify-content: space-around; margin-bottom: 12px;">
|
| 200 |
+
<span style="font-size: 11px; padding: 3px 8px; background: rgba(255, 255, 255, 0.5); border-radius: 6px; color: #cbd5e1; font-weight: 500;">Status: Inactive</span>
|
| 201 |
+
</div>
|
| 202 |
+
<div style="display: inline-block; padding: 5px 14px; background: #e2e8f0; border-radius: 20px; font-size: 12px; font-weight: bold; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;">WAITING</div>
|
| 203 |
</div>
|
|
|
|
| 204 |
</div>
|
| 205 |
+
""")
|
| 206 |
+
|
| 207 |
+
recall_agent = gr.HTML("""
|
| 208 |
+
<div style="border: 2px solid #e2e8f0; border-radius: 14px; padding: 18px; background: #f8fafc; text-align: center; flex: 1; margin: 5px; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0.7;">
|
| 209 |
+
<div style="font-size: 32px; margin-bottom: 10px; opacity: 0.5;">🧠</div>
|
| 210 |
+
<div style="width: 100%;">
|
| 211 |
+
<h4 style="margin: 0 0 8px 0; font-size: 16px; color: #94a3b8;">Recall Agent</h4>
|
| 212 |
+
<p style="font-size: 13px; color: #cbd5e1; margin-bottom: 12px; line-height: 1.4;">Click "Run OSS Analysis" to activate</p>
|
| 213 |
+
<div style="display: flex; justify-content: space-around; margin-bottom: 12px;">
|
| 214 |
+
<span style="font-size: 11px; padding: 3px 8px; background: rgba(255, 255, 255, 0.5); border-radius: 6px; color: #cbd5e1; font-weight: 500;">Status: Inactive</span>
|
| 215 |
+
</div>
|
| 216 |
+
<div style="display: inline-block; padding: 5px 14px; background: #e2e8f0; border-radius: 20px; font-size: 12px; font-weight: bold; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;">WAITING</div>
|
| 217 |
</div>
|
|
|
|
| 218 |
</div>
|
| 219 |
+
""")
|
| 220 |
+
|
| 221 |
+
decision_agent = gr.HTML("""
|
| 222 |
+
<div style="border: 2px solid #e2e8f0; border-radius: 14px; padding: 18px; background: #f8fafc; text-align: center; flex: 1; margin: 5px; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0.7;">
|
| 223 |
+
<div style="font-size: 32px; margin-bottom: 10px; opacity: 0.5;">🎯</div>
|
| 224 |
+
<div style="width: 100%;">
|
| 225 |
+
<h4 style="margin: 0 0 8px 0; font-size: 16px; color: #94a3b8;">Decision Agent</h4>
|
| 226 |
+
<p style="font-size: 13px; color: #cbd5e1; margin-bottom: 12px; line-height: 1.4;">Click "Run OSS Analysis" to activate</p>
|
| 227 |
+
<div style="display: flex; justify-content: space-around; margin-bottom: 12px;">
|
| 228 |
+
<span style="font-size: 11px; padding: 3px 8px; background: rgba(255, 255, 255, 0.5); border-radius: 6px; color: #cbd5e1; font-weight: 500;">Status: Inactive</span>
|
| 229 |
+
</div>
|
| 230 |
+
<div style="display: inline-block; padding: 5px 14px; background: #e2e8f0; border-radius: 20px; font-size: 12px; font-weight: bold; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;">WAITING</div>
|
| 231 |
+
</div>
|
| 232 |
</div>
|
| 233 |
+
""")
|
| 234 |
+
|
| 235 |
+
# OSS vs Enterprise Boundary Visualization
|
| 236 |
+
boundary_header = gr.Markdown("### 🎭 OSS vs Enterprise: The Safety Boundary")
|
| 237 |
+
|
| 238 |
+
with gr.Row():
|
| 239 |
+
oss_section = gr.HTML("""
|
| 240 |
+
<div style="padding: 20px; border-radius: 14px; margin-bottom: 15px; flex: 1; min-height: 320px; background: #f0f9ff; border: 2px solid #0ea5e9;">
|
| 241 |
+
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 2px solid rgba(0, 0, 0, 0.1);">
|
| 242 |
+
<div style="font-size: 28px;">🆓</div>
|
| 243 |
+
<h3 style="margin: 0; font-size: 20px; color: #1e293b; flex: 1;">OSS Edition</h3>
|
| 244 |
+
<span style="padding: 4px 10px; background: rgba(255, 255, 255, 0.9); border-radius: 8px; font-size: 11px; font-weight: bold; color: #475569;">Apache 2.0</span>
|
| 245 |
+
</div>
|
| 246 |
+
<div style="margin-bottom: 20px; padding: 12px; background: rgba(255, 255, 255, 0.7); border-radius: 10px;">
|
| 247 |
+
<p style="margin: 0; font-size: 14px; color: #475569; font-weight: 500;"><strong>Analysis & Advisory Only</strong> - No execution, permanently safe</p>
|
| 248 |
+
</div>
|
| 249 |
+
<div style="background: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05);">
|
| 250 |
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9;">
|
| 251 |
+
<h4 style="margin: 0; font-size: 16px; color: #1e293b;">📝 Healing Intent Created</h4>
|
| 252 |
+
<span style="padding: 4px 10px; background: #dbeafe; color: #1d4ed8; border-radius: 6px; font-size: 12px; font-weight: bold;">94% confidence</span>
|
| 253 |
+
</div>
|
| 254 |
+
<div>
|
| 255 |
+
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Action:</strong> Scale Redis cluster from 3 to 5 nodes</p>
|
| 256 |
+
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Pattern Match:</strong> Similar incident resolved with scaling (87% success rate)</p>
|
| 257 |
+
<p style="margin: 8px 0; font-size= 14px; color: #475569;"><strong>Safety Check:</strong> ✅ Passed (blast radius: 2 services)</p>
|
| 258 |
+
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Estimated Impact:</strong> Reduce MTTR from 45min to 12min</p>
|
| 259 |
+
</div>
|
| 260 |
+
<div style="margin-top: 20px; text-align: center;">
|
| 261 |
+
<div style="height: 2px; background: linear-gradient(90deg, transparent, #3b82f6, transparent); margin: 8px 0;"></div>
|
| 262 |
+
<div style="font-size: 12px; font-weight: bold; padding: 6px 12px; background: #fee2e2; color: #dc2626; border-radius: 8px; display: inline-block;">🚫 OSS STOPS HERE - No execution</div>
|
| 263 |
+
<div style="height: 2px; background: linear-gradient(90deg, transparent, #3b82f6, transparent); margin: 8px 0;"></div>
|
| 264 |
+
</div>
|
| 265 |
+
</div>
|
| 266 |
</div>
|
| 267 |
+
""")
|
| 268 |
+
|
| 269 |
+
enterprise_section = gr.HTML("""
|
| 270 |
+
<div style="padding: 20px; border-radius: 14px; margin-bottom: 15px; flex: 1; min-height: 320px; background: #f0fdf4; border: 2px solid #10b981;">
|
| 271 |
+
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 2px solid rgba(0, 0, 0, 0.1);">
|
| 272 |
+
<div style="font-size: 28px;">💰</div>
|
| 273 |
+
<h3 style="margin: 0; font-size: 20px; color: #1e293b; flex: 1;">Enterprise Edition</h3>
|
| 274 |
+
<span style="padding: 4px 10px; background: rgba(255, 255, 255, 0.9); border-radius: 8px; font-size: 11px; font-weight: bold; color: #475569;">Commercial</span>
|
| 275 |
</div>
|
| 276 |
+
<div style="margin-bottom: 20px; padding: 12px; background: rgba(255, 255, 255, 0.7); border-radius: 10px;">
|
| 277 |
+
<p style="margin: 0; font-size: 14px; color: #475569; font-weight: 500;"><strong>Full Execution & Learning</strong> - Autonomous healing with safety guarantees</p>
|
|
|
|
|
|
|
|
|
|
| 278 |
</div>
|
| 279 |
+
<div style="background: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05);">
|
| 280 |
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9;">
|
| 281 |
+
<h4 style="margin: 0; font-size: 16px; color: #1e293b;">⚡ Ready to Execute</h4>
|
| 282 |
+
<span style="padding: 4px 10px; background: #10b981; color: white; border-radius: 6px; font-size: 12px; font-weight: bold; text-transform: uppercase;">AUTONOMOUS</span>
|
| 283 |
+
</div>
|
| 284 |
+
<div>
|
| 285 |
+
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Mode:</strong> Autonomous (Requires Enterprise license)</p>
|
| 286 |
+
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Expected Recovery:</strong> 12 minutes (vs 45 min manual)</p>
|
| 287 |
+
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Cost Saved:</strong> <span style="color: #10b981; font-weight: 700;">$6,375</span></p>
|
| 288 |
+
<p style="margin: 8px 0; font-size= 14px; color: #475569;"><strong>Users Protected:</strong> 45,000 → 0 impacted</p>
|
| 289 |
+
</div>
|
| 290 |
+
<div style="margin-top: 20px; text-align: center;">
|
| 291 |
+
<div style="height: 2px; background: linear-gradient(90deg, transparent, #10b981, transparent); margin: 8px 0;"></div>
|
| 292 |
+
<div style="font-size: 12px; font-weight: bold; padding: 6px 12px; background: #dcfce7; color: #166534; border-radius: 8px; display: inline-block;">✅ Enterprise executes with MCP safety</div>
|
| 293 |
+
<div style="height: 2px; background: linear-gradient(90deg, transparent, #10b981, transparent); margin: 8px 0;"></div>
|
| 294 |
+
</div>
|
| 295 |
</div>
|
| 296 |
</div>
|
| 297 |
+
""")
|
|
|
|
| 298 |
|
| 299 |
+
# Execution Controls
|
| 300 |
+
with gr.Row():
|
| 301 |
+
with gr.Column(scale=1):
|
| 302 |
+
oss_btn = gr.Button(
|
| 303 |
+
"🆓 Run OSS Analysis",
|
| 304 |
+
variant="secondary",
|
| 305 |
+
size="lg"
|
| 306 |
+
)
|
| 307 |
+
oss_info = gr.Markdown("*Free, open-source analysis*")
|
| 308 |
+
|
| 309 |
+
with gr.Column(scale=1):
|
| 310 |
+
enterprise_btn = gr.Button(
|
| 311 |
+
"💰 Execute Enterprise Healing",
|
| 312 |
+
variant="primary",
|
| 313 |
+
size="lg"
|
| 314 |
+
)
|
| 315 |
+
enterprise_info = gr.Markdown("*Requires Enterprise license*")
|
| 316 |
+
|
| 317 |
+
# Mode Selection & Safety Controls
|
| 318 |
+
with gr.Row():
|
| 319 |
+
with gr.Column(scale=1):
|
| 320 |
+
approval_toggle = gr.CheckboxGroup(
|
| 321 |
+
choices=["👤 Require Human Approval"],
|
| 322 |
+
label="Safety Controls",
|
| 323 |
+
value=[],
|
| 324 |
+
info="Toggle human oversight"
|
| 325 |
+
)
|
| 326 |
+
|
| 327 |
+
with gr.Column(scale=2):
|
| 328 |
+
mcp_mode = gr.Radio(
|
| 329 |
+
choices=["🛡️ Advisory (OSS Only)", "👥 Approval", "⚡ Autonomous"],
|
| 330 |
+
value="🛡️ Advisory (OSS Only)",
|
| 331 |
+
label="MCP Safety Mode",
|
| 332 |
+
info="Control execution safety level",
|
| 333 |
+
interactive=True
|
| 334 |
+
)
|
| 335 |
+
|
| 336 |
+
# Timeline visualization
|
| 337 |
+
timeline_header = gr.Markdown("### ⏰ Incident Timeline")
|
| 338 |
+
timeline_viz = gr.Plot(
|
| 339 |
+
label="",
|
| 340 |
+
show_label=False,
|
| 341 |
+
elem_id="timeline_plot"
|
| 342 |
+
)
|
| 343 |
+
|
| 344 |
+
# Right Column: Results & Metrics
|
| 345 |
+
with gr.Column(scale=1, variant="panel") as right_col:
|
| 346 |
+
# Real-time Metrics Dashboard
|
| 347 |
+
metrics_header = gr.Markdown("## 📊 Performance Metrics")
|
| 348 |
+
|
| 349 |
+
# Metric Cards Grid - USING INLINE STYLES
|
| 350 |
+
with gr.Row():
|
| 351 |
+
detection_time = gr.HTML("""
|
| 352 |
+
<div style="border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; background: white; margin: 8px; text-align: center; flex: 1; min-width: 140px; border-left: 4px solid #3b82f6;">
|
| 353 |
+
<div style="font-size: 28px; margin-bottom: 10px;">⏱️</div>
|
| 354 |
+
<div>
|
| 355 |
+
<h4 style="margin: 0 0 8px 0; font-size: 14px; color: #64748b; font-weight: 600;">Detection Time</h4>
|
| 356 |
+
<p style="font-size: 28px; font-weight: bold; color: #1e40af; margin: 8px 0;">45s</p>
|
| 357 |
+
<p style="font-size: 12px; color: #64748b; margin: 0;">↓ 89% faster than average</p>
|
| 358 |
+
</div>
|
| 359 |
</div>
|
| 360 |
+
""")
|
| 361 |
+
|
| 362 |
+
mttr = gr.HTML("""
|
| 363 |
+
<div style="border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; background: white; margin: 8px; text-align: center; flex: 1; min-width: 140px; border-left: 4px solid #10b981;">
|
| 364 |
+
<div style="font-size: 28px; margin-bottom: 10px;">⚡</div>
|
| 365 |
+
<div>
|
| 366 |
+
<h4 style="margin: 0 0 8px 0; font-size: 14px; color: #64748b; font-weight: 600;">Mean Time to Resolve</h4>
|
| 367 |
+
<p style="font-size: 28px; font-weight: bold; color: #10b981; margin: 8px 0;">12m</p>
|
| 368 |
+
<p style="font-size: 12px; color: #64748b; margin: 0;">↓ 73% faster than manual</p>
|
| 369 |
</div>
|
| 370 |
+
</div>
|
| 371 |
+
""")
|
| 372 |
+
|
| 373 |
+
with gr.Row():
|
| 374 |
+
auto_heal = gr.HTML("""
|
| 375 |
+
<div style="border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; background: white; margin: 8px; text-align: center; flex: 1; min-width: 140px; border-left: 4px solid #8b5cf6;">
|
| 376 |
+
<div style="font-size: 28px; margin-bottom: 10px;">🤖</div>
|
| 377 |
<div>
|
| 378 |
+
<h4 style="margin: 0 0 8px 0; font-size: 14px; color: #64748b; font-weight: 600;">Auto-Heal Rate</h4>
|
| 379 |
+
<p style="font-size: 28px; font-weight: bold; color: #8b5cf6; margin: 8px 0;">81.7%</p>
|
| 380 |
+
<p style="font-size: 12px; color: #64748b; margin: 0;">↑ 5.4× industry average</p>
|
|
|
|
| 381 |
</div>
|
| 382 |
+
</div>
|
| 383 |
+
""")
|
| 384 |
+
|
| 385 |
+
savings = gr.HTML(f"""
|
| 386 |
+
<div style="border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; background: white; margin: 8px; text-align: center; flex: 1; min-width: 140px; border-left: 4px solid #f59e0b;">
|
| 387 |
+
<div style="font-size: 28px; margin-bottom: 10px;">💰</div>
|
| 388 |
+
<div>
|
| 389 |
+
<h4 style="margin: 0 0 8px 0; font-size: 14px; color: #64748b; font-weight: 600;">Cost Saved</h4>
|
| 390 |
+
<p style="font-size: 28px; font-weight: bold; color: #f59e0b; margin: 8px 0;">${int(business_impact.get('revenue_loss_per_hour', 8500) * 0.85 / 1000):.1f}K</p>
|
| 391 |
+
<p style="font-size: 12px; color: #64748b; margin: 0;">Per incident avoided</p>
|
| 392 |
</div>
|
| 393 |
</div>
|
| 394 |
+
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 395 |
|
| 396 |
+
# Results Display Areas
|
| 397 |
+
oss_results_header = gr.Markdown("### 🆓 OSS Analysis Results")
|
| 398 |
+
oss_results_display = gr.JSON(
|
| 399 |
+
label="",
|
| 400 |
+
value={
|
| 401 |
+
"status": "Analysis Pending",
|
| 402 |
+
"agents": ["Detection", "Recall", "Decision"],
|
| 403 |
+
"mode": "Advisory Only",
|
| 404 |
+
"action": "Generate HealingIntent"
|
| 405 |
+
},
|
| 406 |
+
height=200
|
| 407 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
|
| 409 |
+
enterprise_results_header = gr.Markdown("### 💰 Enterprise Results")
|
| 410 |
+
enterprise_results_display = gr.JSON(
|
| 411 |
+
label="",
|
| 412 |
+
value={
|
| 413 |
+
"status": "Execution Pending",
|
| 414 |
+
"requires_license": True,
|
| 415 |
+
"available_modes": ["Approval", "Autonomous"],
|
| 416 |
+
"expected_outcome": "12m MTTR, $6.3K saved"
|
| 417 |
+
},
|
| 418 |
+
height=200
|
| 419 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 420 |
|
| 421 |
+
# Approval Status - USING INLINE STYLES
|
| 422 |
+
approval_display = gr.HTML("""
|
| 423 |
+
<div style="border: 2px solid #e2e8f0; border-radius: 14px; padding: 20px; background: white; margin-top: 20px;">
|
| 424 |
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 2px solid #f1f5f9;">
|
| 425 |
+
<h4 style="margin: 0; font-size: 16px; color: #1e293b;">👤 Human Approval Status</h4>
|
| 426 |
+
<span style="padding: 4px 12px; background: #10b981; color: white; border-radius: 8px; font-size: 12px; font-weight: bold; text-transform: uppercase;">Not Required</span>
|
|
|
|
| 427 |
</div>
|
| 428 |
+
<div style="margin-top: 15px;">
|
| 429 |
+
<p style="margin: 8px 0; font-size: 14px; color: #475569;"><strong>Current Mode:</strong> Advisory (OSS Only)</p>
|
| 430 |
+
<p style="margin: 8px 0; font-size: 14px; color: #475569; font-style: italic;">Switch to "Approval" mode to enable human-in-the-loop workflows</p>
|
| 431 |
+
<div style="display: flex; flex-direction: column; gap: 10px; margin-top: 20px;">
|
| 432 |
+
<div style="padding: 12px; background: #f8fafc; border-radius: 10px; border-left: 4px solid #3b82f6; font-size: 14px; color: #475569; font-weight: 500;">1. ARF generates intent</div>
|
| 433 |
+
<div style="padding: 12px; background: #f8fafc; border-radius: 10px; border-left: 4px solid #3b82f6; font-size: 14px; color: #475569; font-weight: 500;">2. Human reviews & approves</div>
|
| 434 |
+
<div style="padding: 12px; background: #f8fafc; border-radius: 10px; border-left: 4px solid #3b82f6; font-size: 14px; color: #475569; font-weight: 500;">3. ARF executes safely</div>
|
| 435 |
+
</div>
|
|
|
|
|
|
|
|
|
|
| 436 |
</div>
|
| 437 |
</div>
|
| 438 |
""")
|
| 439 |
|
| 440 |
+
# Demo Actions
|
| 441 |
+
demo_btn = gr.Button(
|
| 442 |
+
"▶️ Run Complete Demo Walkthrough",
|
| 443 |
+
variant="secondary",
|
| 444 |
+
size="lg"
|
| 445 |
+
)
|
| 446 |
+
demo_info = gr.Markdown("*Experience the full ARF workflow from detection to resolution*")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 447 |
|
| 448 |
return (
|
| 449 |
# Left column returns
|
|
|
|
| 456 |
detection_time, mttr, auto_heal, savings,
|
| 457 |
oss_results_display, enterprise_results_display, approval_display, demo_btn
|
| 458 |
)
|
|
|
|
| 459 |
# -----------------------------
|
| 460 |
# Tab 2: Business ROI - Updated
|
| 461 |
# -----------------------------
|