-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (72 loc) · 2.53 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>OptiKube</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h1 class="text-center">OptiKube</h1>
<h2>Cluster Summary</h2>
<table class="table table-striped">
<thead>
<tr>
<th>Namespace</th>
<th>CPU (Req/Lim)</th>
<th>MEM (Req/Lim)</th>
<th>Efficiency (CPU/MEM)</th>
</tr>
</thead>
<tbody>
{{range .ClusterSummary}}
<tr>
<td>{{.Namespace}}</td>
<td>{{.TotalCPURequest}}/{{.TotalCPULimit}}</td>
<td>{{.TotalMemoryRequest}}/{{.TotalMemoryLimit}}</td>
<td>{{.EfficiencyCPU}}/{{.EfficiencyMemory}}</td>
</tr>
{{end}}
<tr>
<th>Total</th>
<th>{{.ClusterData.TotalCPURequest}}/{{.ClusterData.TotalCPULimit}}</th>
<th>{{.ClusterData.TotalMemoryRequest}}/{{.ClusterData.TotalMemoryLimit}}</th>
<th>{{.ClusterData.EfficiencyCPU}}/{{.ClusterData.EfficiencyMemory}}</th>
</tr>
</tbody>
</table>
<h2>Namespace Details</h2>
{{range .NamespaceData}}
<h3>{{.Namespace}}</h3>
<table class="table table-striped">
<thead>
<tr>
<th>Pod Name</th>
<th>CPU (Req/Lim)</th>
<th>MEM (Req/Lim)</th>
<th>Efficiency (CPU/MEM)</th>
</tr>
</thead>
<tbody>
{{range .Pods}}
<tr>
<td>{{.Name}}</td>
<td>{{.CPURequest}}/{{.CPULimit}}</td>
<td>{{.MemoryRequest}}/{{.MemoryLimit}}</td>
<td>{{.EfficiencyCPU}}/{{.EfficiencyMemory}}</td>
</tr>
{{end}}
<tr>
<th>Total</th>
<th>{{.TotalCPURequest}}/{{.TotalCPULimit}}</th>
<th>{{.TotalMemoryRequest}}/{{.TotalMemoryLimit}}</th>
<th>{{.EfficiencyCPU}}/{{.EfficiencyMemory}}</th>
</tr>
</tbody>
</table>
<br>
{{end}}
</div>
</body>
</html>