""" UI components for the 5-tab demo """ import gradio as gr from typing import Dict, List, Any, Optional, Tuple import plotly.graph_objects as go def create_header(oss_version: str, oss_available: bool) -> gr.Markdown: """Create the demo header""" status_badge = "✅ Connected" if oss_available else "⚠️ Mock Mode" return gr.Markdown(f"""

🚀 Agentic Reliability Framework

Investor Demo v3.8.0

🏢 Enterprise Edition
🆓 OSS v{oss_version}
📈 5.2× ROI
⚡ 85% MTTR Reduction
From OSS Advisory to Enterprise Autonomous Healing. Experience the complete journey in 5 focused tabs.
{status_badge}
""") def create_status_bar() -> gr.HTML: """Create system status bar""" return gr.HTML("""
System Status
Operational
Performance
8.2 min avg resolution
Learning Engine
5 patterns detected
""") def create_tab1_incident_demo(scenarios: Dict, default_scenario: str = "Cache Miss Storm") -> Tuple: """Create Tab 1: Live Incident Demo""" with gr.Row(): # Left Panel with gr.Column(scale=1): gr.Markdown("### 🎬 Select Incident Scenario") scenario_dropdown = gr.Dropdown( choices=list(scenarios.keys()), value=default_scenario, label="Choose an incident to analyze:", interactive=True ) scenario_description = gr.Markdown( value=scenarios[default_scenario]["description"] ) gr.Markdown("### 📊 Current Metrics") metrics_display = gr.JSON( value=scenarios[default_scenario].get("metrics", {}), label="", show_label=False ) gr.Markdown("### 💰 Business Impact") impact_display = gr.JSON( value=scenarios[default_scenario].get("impact", {}), label="", show_label=False ) # Right Panel with gr.Column(scale=2): gr.Markdown("### 📈 Incident Timeline") timeline_output = gr.Plot(label="") gr.Markdown("### ⚡ Take Action") with gr.Row(): oss_btn = gr.Button( "🆓 Run OSS Analysis", variant="secondary", size="lg", min_width=150 ) enterprise_btn = gr.Button( "🚀 Execute Enterprise Healing", variant="primary", size="lg", min_width=150 ) with gr.Row(): approval_toggle = gr.Checkbox( label="🔐 Require Manual Approval", value=True, interactive=True ) demo_btn = gr.Button( "⚡ Quick Demo", variant="secondary", size="sm" ) approval_display = gr.HTML( value="
" "Approval workflow will appear here after execution" "
" ) gr.Markdown("### ⚙️ Configuration") config_display = gr.JSON( value={"mode": "approval", "safety_guardrails": "active"}, label="" ) gr.Markdown("### 🎯 Results") results_display = gr.JSON( value={"status": "Ready to analyze incident..."}, label="" ) return (scenario_dropdown, scenario_description, metrics_display, impact_display, timeline_output, oss_btn, enterprise_btn, approval_toggle, demo_btn, approval_display, config_display, results_display) def create_tab2_business_roi() -> Tuple: """Create Tab 2: Business Impact & ROI""" with gr.Column(): gr.Markdown("### 📊 Executive Dashboard") dashboard_output = gr.Plot(label="") gr.Markdown("### 🧮 ROI Calculator") with gr.Row(): with gr.Column(scale=1): monthly_slider = gr.Slider( 1, 100, value=15, step=1, label="Monthly incidents", interactive=True ) impact_slider = gr.Slider( 1000, 50000, value=8500, step=500, label="Average cost per incident ($)", interactive=True ) team_slider = gr.Slider( 1, 20, value=5, step=1, label="Reliability team size", interactive=True ) calculate_btn = gr.Button( "Calculate My ROI", variant="primary", size="lg" ) with gr.Column(scale=2): roi_output = gr.JSON( value={}, label="Your Analysis" ) with gr.Row(): with gr.Column(): gr.Markdown(""" **📈 Industry Benchmarks** - **5.2×** Average ROI (first year) - **2-3 months** Payback period - **81.7%** Auto-heal rate - **85%** MTTR reduction - **$6.2M** Average annual savings """) with gr.Column(): gr.Markdown(""" **🎯 Business Outcomes** - **325+ hours** Engineer time reclaimed - **99.9%** SLA compliance maintained - **+40%** Customer satisfaction - **60%** Increased innovation capacity - **Zero** Audit findings """) return (dashboard_output, monthly_slider, impact_slider, team_slider, calculate_btn, roi_output) def create_tab3_audit_trail() -> Tuple: """Create Tab 3: Audit Trail & History""" with gr.Row(): # Left Column with gr.Column(scale=1): gr.Markdown("### 📋 Execution History") with gr.Row(): refresh_btn = gr.Button("🔄 Refresh", variant="secondary", size="sm") clear_btn = gr.Button("🗑️ Clear", variant="stop", size="sm") export_btn = gr.Button("📥 Export", variant="secondary", size="sm") execution_table = gr.Dataframe( headers=["Time", "Scenario", "Actions", "Status", "Savings", "Details"], value=[], label="", interactive=False ) gr.Markdown("### 📈 Cost Savings") savings_chart = gr.Plot(label="") # Right Column with gr.Column(scale=1): gr.Markdown("### 📊 Incident History") incident_table = gr.Dataframe( headers=["Time", "Service", "Type", "Severity", "Description"], value=[], label="", interactive=False ) gr.Markdown("### 🧠 Memory Graph") memory_graph = gr.Plot(label="") gr.Markdown("### 📤 Export") export_text = gr.Textbox( label="Audit Trail (JSON)", lines=6, interactive=False ) return (refresh_btn, clear_btn, export_btn, execution_table, savings_chart, incident_table, memory_graph, export_text) def create_tab4_enterprise_features() -> Tuple: """Create Tab 4: Enterprise Features""" with gr.Row(): # Left Column with gr.Column(scale=1): gr.Markdown("### 🔐 License Management") license_display = gr.JSON( value={}, label="Current License" ) with gr.Row(): validate_btn = gr.Button("🔍 Validate", variant="secondary") trial_btn = gr.Button("🆓 Start Trial", variant="primary") upgrade_btn = gr.Button("🚀 Upgrade", variant="secondary") gr.Markdown("### ⚡ Feature Comparison") features_table = gr.Dataframe( headers=["Feature", "OSS", "Starter", "Enterprise"], value=[ ["Autonomous Healing", "❌", "✅ Auto", "✅ AI-Driven"], ["Compliance Automation", "❌", "✅", "✅ SOC2/GDPR"], ["Predictive Analytics", "❌", "Basic", "✅ ML-Powered"], ["Multi-Cloud Support", "❌", "❌", "✅ Native"], ["Audit Trail", "Basic", "✅", "✅ Comprehensive"], ["Role-Based Access", "❌", "✅", "✅ Granular"], ], label="", interactive=False ) # Right Column with gr.Column(scale=1): gr.Markdown("### 📋 Compliance") compliance_display = gr.JSON( value={ "SOC2": "✅ Certified", "GDPR": "✅ Compliant", "ISO27001": "✅ Certified", "CCPA": "✅ Compliant" }, label="Certifications" ) gr.Markdown("### 🔗 Integrations") integrations_table = gr.Dataframe( headers=["Platform", "Status", "Last Sync"], value=[ ["AWS", "✅ Connected", "5 min ago"], ["Azure", "✅ Connected", "8 min ago"], ["GCP", "✅ Connected", "3 min ago"], ["Datadog", "✅ Connected", "Active"], ["PagerDuty", "✅ Connected", "Active"], ["ServiceNow", "✅ Connected", "15 min ago"], ], label="", interactive=False ) gr.Markdown("### ⚙️ MCP Mode") mcp_mode = gr.Radio( choices=["advisory", "approval", "autonomous"], value="approval", label="Execution Mode", interactive=True ) return (license_display, validate_btn, trial_btn, upgrade_btn, features_table, compliance_display, integrations_table, mcp_mode) def create_tab5_learning_engine() -> Tuple: """Create Tab 5: Learning Engine""" with gr.Row(): # Left Column with gr.Column(scale=2): gr.Markdown("### 🧠 Incident Memory Graph") learning_graph = gr.Plot(label="") with gr.Row(): graph_type = gr.Radio( choices=["Force", "Hierarchical", "Circular"], value="Force", label="Layout", interactive=True ) show_labels = gr.Checkbox(label="Show Labels", value=True, interactive=True) gr.Markdown("### 🔍 Similarity Search") search_query = gr.Textbox( label="Describe incident or paste metrics", placeholder="e.g., 'Redis cache miss causing database overload'", lines=2, interactive=True ) with gr.Row(): search_btn = gr.Button("🔍 Search", variant="primary") clear_btn = gr.Button("Clear", variant="secondary") search_results = gr.Dataframe( headers=["Incident", "Similarity", "Resolution", "Actions"], value=[], label="", interactive=False ) # Right Column with gr.Column(scale=1): gr.Markdown("### 📊 Learning Stats") stats_display = gr.JSON( value={ "total_incidents": 0, "patterns_detected": 0, "similarity_searches": 0, "confidence_threshold": 0.85 }, label="Statistics" ) gr.Markdown("### 🎯 Pattern Detection") patterns_display = gr.JSON( value={}, label="Detected Patterns" ) gr.Markdown("### 📈 Performance") performance_display = gr.JSON( value={ "avg_resolution_time": "0 min", "success_rate": "0%", "auto_heal_rate": "0%" }, label="Performance Metrics" ) return (learning_graph, graph_type, show_labels, search_query, search_btn, clear_btn, search_results, stats_display, patterns_display, performance_display) def create_footer() -> gr.Markdown: """Create the demo footer""" return gr.Markdown("""

🚀 User Journey

  1. Start with OSS Analysis
  2. Calculate Your ROI
  3. Execute Enterprise Healing
  4. Explore Audit Trail
  5. Discover Learning Engine

📞 Get Started

  • 📧 sales@arfinvestor.com
  • 📚 docs.arfinvestor.com
  • 💬 Join Slack Community
  • 🆓 30-Day Enterprise Trial

🛡️ Enterprise Grade

  • ✅ SOC 2 Type II
  • ✅ GDPR & CCPA
  • ✅ ISO 27001
  • ✅ HIPAA Ready

© 2024 Agentic Reliability Framework. Demo v3.8.0 Enterprise Edition.

This demonstration showcases capabilities. Actual results may vary.

""")