-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
118 lines (111 loc) · 6.97 KB
/
Copy pathindex.html
File metadata and controls
118 lines (111 loc) · 6.97 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GKE Capacity & Cost Analytics</title>
</head>
<body class="p-4 lg:p-8">
<div class="max-w-[1600px] mx-auto">
<header class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8 gap-4">
<div>
<h1 class="text-3xl font-bold text-blue-400 tracking-tight">GKE Capacity Strategy Simulation</h1>
<p class="text-slate-400 mt-1">Data saved in URL | Active Buffer Cost: 100% | Standby Buffer Cost: 5% Cost</p>
</div>
<div class="flex gap-3">
<a href="optimizer.html" class="bg-indigo-600 hover:bg-indigo-500 text-white font-bold py-2.5 px-6 rounded-lg transition shadow-lg shadow-indigo-900/20 active:scale-95 flex items-center gap-2">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>
<span>Open Optimizer</span>
</a>
<button id="run-btn" class="bg-blue-600 hover:bg-blue-500 text-white font-bold py-2.5 px-8 rounded-lg transition shadow-lg shadow-blue-900/20 active:scale-95">Run Scenario</button>
<button id="clear-btn" class="bg-red-900/40 hover:bg-red-900/60 text-red-200 border border-red-800/50 py-2.5 px-6 rounded-lg transition active:scale-95">Clear Saved Runs</button>
</div>
</header>
<div class="grid grid-cols-1 xl:grid-cols-5 gap-6">
<!-- Sidebar -->
<div class="xl:col-span-1 space-y-6">
<div class="card p-6 rounded-2xl shadow-xl">
<h2 class="text-lg font-bold mb-5 border-b border-slate-700 pb-2 flex items-center gap-2">
<span class="w-2 h-2 bg-blue-500 rounded-full"></span> Capacity Buffers
</h2>
<div class="space-y-4">
<div class="grid grid-cols-2 gap-4">
<div><label>Active Buffer</label><input type="number" id="activeCount" value="400"></div>
<div><label>Standby Buffer</label><input type="number" id="standbyCount" value="3000"></div>
</div>
<div class="grid grid-cols-2 gap-4">
<div><label>Standby Resume (s)</label><input type="number" id="standbyLatency" value="30"></div>
<div><label>New Buffer Creation (s)</label><input type="number" id="scaleLatency" value="60"></div>
</div>
<div class="grid grid-cols-2 gap-4">
<div><label>Idle To Standby (min)</label><input type="number" id="idleTimeout" value="5"></div>
</div>
</div>
<h2 class="text-lg font-bold mt-10 mb-5 border-b border-slate-700 pb-2 flex items-center gap-2">
<span class="w-2 h-2 bg-green-500 rounded-full"></span> Traffic Pattern
</h2>
<div class="space-y-4">
<div class="grid grid-cols-2 gap-4">
<div><label>Pods per Batch</label><input type="number" id="podsBatch" value="500"></div>
<div><label>Batch Pods/Second</label><input type="number" id="qps" value="50"></div>
</div>
<div class="grid grid-cols-2 gap-4">
<div><label>Batch Count</label><input type="number" id="numBatches" value="12"></div>
<div><label>Wait Between Batches(s)</label><input type="number" id="waitInterval" value="30"></div>
</div>
</div>
<div class="mt-8 pt-6 border-t border-slate-700/50">
<h3 class="text-xs font-bold text-slate-500 mb-3 uppercase tracking-widest">Legend</h3>
<div class="space-y-2 text-sm text-slate-400">
<div class="flex items-center gap-2">
<span class="font-mono text-blue-400 w-4">A:</span>
<span>Active Buffer</span>
</div>
<div class="flex items-center gap-2">
<span class="font-mono text-orange-400 w-4">S:</span>
<span>Standby Buffer</span>
</div>
<div class="flex items-center gap-2">
<span class="font-mono text-yellow-400 w-4">SW:</span>
<span>Standby Warm</span>
</div>
<div class="flex items-center gap-2">
<span class="font-mono text-orange-400 w-4">SS:</span>
<span>Standby Suspended</span>
</div>
<div class="flex items-center gap-2">
<span class="font-mono text-green-400 w-4">p:</span>
<span>Pods</span>
</div>
</div>
</div>
</div>
</div>
<!-- Dashboard -->
<div class="xl:col-span-4 space-y-6">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="card p-5 rounded-2xl">
<h3 class="text-xs font-bold text-slate-500 mb-5 uppercase tracking-widest">Multi-Run Latency Comparison</h3>
<div class="h-64"><canvas id="comparisonChart"></canvas></div>
</div>
<div class="card p-5 rounded-2xl">
<h3 class="text-xs font-bold text-slate-500 mb-5 uppercase tracking-widest">Infrastructure Cost Score</h3>
<div class="h-64"><canvas id="costChart"></canvas></div>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="card p-5 rounded-2xl">
<h3 class="text-xs font-bold text-slate-500 mb-5 uppercase tracking-widest">Last Run: Sorted Latencies</h3>
<div class="h-64"><canvas id="latencyChart"></canvas></div>
</div>
<div class="card p-5 rounded-2xl">
<h3 class="text-xs font-bold text-slate-500 mb-5 uppercase tracking-widest">Last Run: Inventory Timeline</h3>
<div class="h-64"><canvas id="inventoryChart"></canvas></div>
</div>
</div>
</div>
</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>