petter2025 commited on
Commit
b315041
·
verified ·
1 Parent(s): d83d0aa

Update ui/components.py

Browse files
Files changed (1) hide show
  1. ui/components.py +26 -65
ui/components.py CHANGED
@@ -24,81 +24,42 @@ except ImportError:
24
  # -----------------------------
25
  # Header & Status - UPDATED WITH INSTALLATION CHECK
26
  # -----------------------------
27
- def create_header(version="3.3.7", mock_mode=False) -> gr.HTML:
28
- # Try to get installation status
29
- try:
30
- from app import get_installation_badges
31
- installation_badges = get_installation_badges()
32
- except ImportError:
33
- installation_badges = """
34
- <div style="display: flex; justify-content: center; gap: 10px; margin-top: 10px; flex-wrap: wrap;">
35
- <span style="padding: 4px 12px; background: #f59e0b;
36
- color: white; border-radius: 20px; font-size: 12px; font-weight: bold;
37
- display: flex; align-items: center; gap: 6px;">
38
- ⚠️ Mock ARF
39
- </span>
40
- <span style="padding: 4px 12px; background: #64748b;
41
- color: white; border-radius: 20px; font-size: 12px; font-weight: bold;
42
- display: flex; align-items: center; gap: 6px;">
43
- 🔒 Enterprise Required
44
- </span>
45
- </div>
46
- """
47
-
48
- mock_text = " · MOCK MODE" if mock_mode else ""
49
  return gr.HTML(f"""
50
- <div style="text-align: center; margin-bottom: 25px; padding: 30px 40px; background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); color: white; border-radius: 16px; box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);">
51
- <h1 style="margin: 0 0 10px 0; font-size: 32px;">🚀 Agentic Reliability Framework</h1>
52
- <h2 style="margin: 0; font-size: 24px; opacity: 0.9;">v{version} (OSS Edition){mock_text}</h2>
53
- <p style="margin: 15px 0 0 0; font-size: 16px; opacity: 0.8;">
 
 
 
 
54
  Production-grade multi-agent AI for autonomous system reliability intelligence
55
  </p>
56
 
57
- <!-- Installation Status Badges -->
58
- {installation_badges}
 
 
 
59
  </div>
60
  """)
61
 
62
  def create_status_bar() -> gr.HTML:
63
- # Try to get installation status
64
- try:
65
- from app import get_installation_status
66
- installation = get_installation_status()
67
- oss_badge = installation["badges"]["oss"]
68
- enterprise_badge = installation["badges"]["enterprise"]
69
-
70
- oss_status_html = f"""
71
- <span style="padding: 8px 16px; background: {oss_badge['color']}; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid {oss_badge['color']};">
72
- {oss_badge['icon']} {oss_badge['text']}
73
  </span>
74
- """
75
-
76
- enterprise_status_html = f"""
77
- <span style="padding: 8px 16px; background: {enterprise_badge['color']}; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid {enterprise_badge['color']};">
78
- {enterprise_badge['icon']} {enterprise_badge['text']}
79
  </span>
80
- """
81
-
82
- except ImportError:
83
- oss_status_html = """
84
- <span style="padding: 8px 16px; background: #f59e0b; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #f59e0b;">
85
- ⚠️ Mock ARF
86
  </span>
87
- """
88
-
89
- enterprise_status_html = """
90
- <span style="padding: 8px 16px; background: #64748b; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #64748b;">
91
- 🔒 Enterprise Required
92
  </span>
93
- """
94
-
95
- return gr.HTML(f"""
96
- <div style="display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; padding: 15px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; flex-wrap: wrap;">
97
- <span style="padding: 8px 16px; background: #10b981; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #10b981;">✅ System Online</span>
98
- <span style="padding: 8px 16px; background: #10b981; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #10b981;">🧠 Agentic Core Active</span>
99
- {oss_status_html}
100
- {enterprise_status_html}
101
- <span style="padding: 8px 16px; background: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #e2e8f0;">💰 <a href="#tab2" style="color: #10b981; text-decoration: underline;">Enterprise ROI: 5.2×</a></span>
102
  </div>
103
  """)
104
 
@@ -957,13 +918,13 @@ def create_realism_panel(scenario_data: Dict, scenario_name: str) -> gr.HTML:
957
  def create_footer() -> gr.HTML:
958
  return gr.HTML("""
959
  <div style="text-align: center; padding: 25px; color: #6b7280; font-size: 14px; margin-top: 40px; border-top: 2px solid #e5e7eb; background: #f9fafb; border-radius: 12px;">
960
- <p><strong style="color: #1e293b; font-size: 16px;">Agentic Reliability Framework</strong> © 2025</p>
961
  <p>Production-grade multi-agent AI for autonomous system reliability intelligence</p>
962
  <div style="margin-top: 15px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;">
963
  <a href="https://github.com/petterjuan/agentic-reliability-framework" target="_blank" style="color: #3b82f6; text-decoration: none; font-weight: 500;">GitHub</a> •
964
  <a href="https://huggingface.co/spaces/petter2025/agentic-reliability-framework" target="_blank" style="color: #3b82f6; text-decoration: none; font-weight: 500;">Demo</a> •
965
  <a href="https://pypi.org/project/agentic-reliability-framework" target="_blank" style="color: #3b82f6; text-decoration: none; font-weight: 500;">PyPI</a> •
966
- <a href="mailto:sales@arf.dev" style="color: #3b82f6; text-decoration: none; font-weight: 500;">Enterprise Inquiries</a>
967
  </div>
968
  </div>
969
  """)
 
24
  # -----------------------------
25
  # Header & Status - UPDATED WITH INSTALLATION CHECK
26
  # -----------------------------
27
+ def create_header(version="3.3.9") -> gr.HTML: # Removed mock_mode parameter
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  return gr.HTML(f"""
29
+ <div style="text-align: center; margin-bottom: 25px;">
30
+ <img src="https://raw.githubusercontent.com/petterjuan/agentic-reliability-framework/main/assets/agentic-reliability-banner.png"
31
+ alt="Agentic Reliability Framework"
32
+ style="max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);">
33
+ <h2 style="margin: 15px 0 5px 0; font-size: 24px; color: #1e293b; font-weight: 600;">
34
+ v{version} (OSS + Enterprise Edition)
35
+ </h2>
36
+ <p style="margin: 0 0 15px 0; font-size: 16px; color: #64748b; max-width: 600px; margin-left: auto; margin-right: auto;">
37
  Production-grade multi-agent AI for autonomous system reliability intelligence
38
  </p>
39
 
40
+ <!-- Clean Architecture Badge -->
41
+ <div style="display: inline-block; padding: 8px 20px; background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
42
+ border: 2px solid #3b82f6; border-radius: 20px; font-size: 14px; font-weight: 600; color: #1e40af;">
43
+ 🏗️ Architecture: OSS advises → Enterprise executes
44
+ </div>
45
  </div>
46
  """)
47
 
48
  def create_status_bar() -> gr.HTML:
49
+ return gr.HTML("""
50
+ <div style="display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; padding: 15px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; flex-wrap: wrap;">
51
+ <span style="padding: 8px 16px; background: #10b981; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #10b981;">
52
+ System Online
 
 
 
 
 
 
53
  </span>
54
+ <span style="padding: 8px 16px; background: #8b5cf6; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #8b5cf6;">
55
+ ✅ ARF OSS v3.3.9
 
 
 
56
  </span>
57
+ <span style="padding: 8px 16px; background: #3b82f6; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #3b82f6;">
58
+ 🏢 Enterprise Edition
 
 
 
 
59
  </span>
60
+ <span style="padding: 8px 16px; background: #f59e0b; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid #f59e0b;">
61
+ 📈 ROI: 5.2×
 
 
 
62
  </span>
 
 
 
 
 
 
 
 
 
63
  </div>
64
  """)
65
 
 
918
  def create_footer() -> gr.HTML:
919
  return gr.HTML("""
920
  <div style="text-align: center; padding: 25px; color: #6b7280; font-size: 14px; margin-top: 40px; border-top: 2px solid #e5e7eb; background: #f9fafb; border-radius: 12px;">
921
+ <p><strong style="color: #1e293b; font-size: 16px;">Agentic Reliability Framework</strong> © 2026</p>
922
  <p>Production-grade multi-agent AI for autonomous system reliability intelligence</p>
923
  <div style="margin-top: 15px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;">
924
  <a href="https://github.com/petterjuan/agentic-reliability-framework" target="_blank" style="color: #3b82f6; text-decoration: none; font-weight: 500;">GitHub</a> •
925
  <a href="https://huggingface.co/spaces/petter2025/agentic-reliability-framework" target="_blank" style="color: #3b82f6; text-decoration: none; font-weight: 500;">Demo</a> •
926
  <a href="https://pypi.org/project/agentic-reliability-framework" target="_blank" style="color: #3b82f6; text-decoration: none; font-weight: 500;">PyPI</a> •
927
+ <a href="mailto:petter2025us@outmail.com" style="color: #3b82f6; text-decoration: none; font-weight: 500;">Enterprise Inquiries</a>
928
  </div>
929
  </div>
930
  """)