| """ |
| Minimalist, Math-First UI Components for ARF OSS |
| Designed for engineers, not marketers. |
| |
| Principles: |
| - Deterministic layout |
| - Low visual entropy |
| - Computational semantics |
| - OSS-first credibility |
| """ |
|
|
| import gradio as gr |
| from typing import List, Dict, Any |
|
|
|
|
| |
| |
| |
| def create_header() -> gr.HTML: |
| return gr.HTML( |
| """ |
| <div style="font-family: monospace; padding-bottom: 8px;"> |
| <strong>ARF v3.3.6 (OSS)</strong> · Agentic Reliability Engine<br/> |
| Status: <span style="color: #2ecc71;">READY</span> |
| </div> |
| <hr/> |
| """ |
| ) |
|
|
|
|
| |
| |
| |
| def create_status_bar() -> gr.HTML: |
| return gr.HTML( |
| """ |
| <div style="font-family: monospace; font-size: 13px;"> |
| core=active | mode=oss | audit=enabled |
| </div> |
| """ |
| ) |
|
|
|
|
| |
| |
| |
| def create_tab1_incident_demo(): |
| with gr.Column(): |
| gr.Markdown("### 1. Incident Input", elem_classes=["mono"]) |
|
|
| scenario = gr.Dropdown( |
| label="Incident Scenario", |
| choices=[ |
| "cache_miss_storm", |
| "database_connection_leak", |
| "api_rate_limit_spike", |
| "memory_pressure_event", |
| ], |
| value="cache_miss_storm", |
| ) |
|
|
| mode = gr.Radio( |
| label="Execution Mode", |
| choices=["advisory", "approval", "autonomous"], |
| value="advisory", |
| ) |
|
|
| gr.Markdown("### 2. Execute Analysis") |
|
|
| run_btn = gr.Button("Run Analysis", variant="primary") |
|
|
| return { |
| "scenario": scenario, |
| "mode": mode, |
| "run_btn": run_btn, |
| } |
|
|
|
|
| |
| |
| |
| def create_tab2_business_roi(): |
| with gr.Column(): |
| gr.Markdown("### Estimated Impact (Model-Derived)") |
|
|
| output = gr.Markdown( |
| """ |
| Loss Rate: $0 / hour |
| Recovery Time: N/A |
| Confidence Interval: N/A |
| """, |
| elem_classes=["mono"], |
| ) |
|
|
| return {"roi_output": output} |
|
|
|
|
| |
| |
| |
| def create_tab3_enterprise_features(): |
| with gr.Column(): |
| gr.Markdown("### Enterprise Capabilities (Unavailable in OSS)") |
|
|
| gr.Markdown( |
| """ |
| - Autonomous execution |
| - Multi-agent arbitration |
| - Policy enforcement |
| - SLA-backed recovery |
| |
| _This OSS build exposes intent only._ |
| """, |
| elem_classes=["mono"], |
| ) |
|
|
|
|
| |
| |
| |
| def create_tab4_audit_trail(): |
| with gr.Column(): |
| gr.Markdown("### Execution Trace") |
|
|
| audit_log = gr.Dataframe( |
| headers=["phase", "status", "Δt (ms)"], |
| datatype=["str", "str", "number"], |
| row_count=5, |
| ) |
|
|
| return {"audit_log": audit_log} |
|
|
|
|
| |
| |
| |
| def create_tab5_learning_engine(): |
| with gr.Column(): |
| gr.Markdown("### Learning Engine State") |
|
|
| gr.Markdown( |
| """ |
| memory_vectors: enabled |
| outcome_feedback: passive |
| model_updates: disabled (OSS) |
| """, |
| elem_classes=["mono"], |
| ) |
|
|
|
|
| |
| |
| |
| def create_footer() -> gr.HTML: |
| return gr.HTML( |
| """ |
| <hr/> |
| <div style="font-family: monospace; font-size: 12px;"> |
| ARF OSS · Apache-2.0 · 2025 |
| </div> |
| """ |
| ) |
|
|