-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_demo.py
More file actions
95 lines (81 loc) · 4.01 KB
/
run_demo.py
File metadata and controls
95 lines (81 loc) · 4.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env python3
"""
Quick Demo Launcher for PipeGuard
Runs the enhanced demo with real-time updates
"""
import subprocess
import sys
import os
import webbrowser
import time
def print_banner():
banner = """
╔══════════════════════════════════════════════════════════════╗
║ ║
║ ██████╗ ██╗██████╗ ███████╗ ██████╗ ██╗ ██╗ █████╗ ║
║ ██╔══██╗██║██╔══██╗██╔════╝██╔════╝ ██║ ██║██╔══██╗ ║
║ ██████╔╝██║██████╔╝█████╗ ██║ ███╗██║ ██║███████║ ║
║ ██╔═══╝ ██║██╔═══╝ ██╔══╝ ██║ ██║██║ ██║██╔══██║ ║
║ ██║ ██║██║ ███████╗╚██████╔╝╚██████╔╝██║ ██║ ║
║ ╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ║
║ ║
║ 🚀 LIVE DEMO - REAL-TIME MONITORING 🚀 ║
║ ║
╚══════════════════════════════════════════════════════════════╝
"""
print("\033[96m" + banner + "\033[0m")
def check_demo_data_generator():
"""Check if demo_data_generator.py exists"""
if not os.path.exists('demo_data_generator.py'):
print("❌ Error: demo_data_generator.py not found!")
print("Please make sure all demo files are in the current directory.")
return False
return True
def main():
print_banner()
print("\n✨ PipeGuard Pro - Interactive Demo")
print("=" * 60)
print("📊 This demo showcases:")
print(" • Real-time pipeline monitoring with live data updates")
print(" • Interactive anomaly detection")
print(" • AI-powered insights and recommendations")
print(" • Performance analytics with beautiful charts")
print(" • Manual build triggers for testing")
print("=" * 60)
# Check if demo files exist
if not check_demo_data_generator():
return
print("\n🔧 Starting demo server...")
print("📡 Demo features:")
print(" ✓ Auto-refresh every 10 seconds")
print(" ✓ Live statistics updates")
print(" ✓ Interactive build triggers")
print(" ✓ Real-time anomaly detection")
print("\n🌐 Opening browser at http://localhost:8080...")
print("⏰ Please wait 3 seconds...")
# Start the demo server
try:
# Wait a moment before opening browser
time.sleep(1)
# Open browser
def open_browser():
time.sleep(3)
webbrowser.open('http://localhost:8080')
import threading
browser_thread = threading.Thread(target=open_browser)
browser_thread.daemon = True
browser_thread.start()
# Run the demo app
print("\n" + "=" * 60)
print("🎯 Demo Server Starting...")
print("=" * 60 + "\n")
subprocess.run([sys.executable, 'demo_app.py'])
except KeyboardInterrupt:
print("\n\n👋 Demo stopped by user")
print("Thank you for trying PipeGuard Pro!")
except Exception as e:
print(f"\n❌ Error starting demo: {e}")
print("\nTry running manually:")
print(" python demo_app.py")
if __name__ == '__main__':
main()