This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
- Loading branch information
1 parent
6877c57
commit d5c17bb
Showing
6 changed files
with
100 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
package ha | ||
|
||
var HtmlPage = `<html> | ||
<body> | ||
<table> | ||
<thead> | ||
<tr> | ||
<td>Name</td> | ||
<td>Type</td> | ||
<td>Replicas</td> | ||
<td>Rollout Strategy</td> | ||
<td>Anti-Affinity</td> | ||
<td>PVCs</td> | ||
<td>Rank</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{range .Items}} | ||
<tr> | ||
<td>{{.Name}}</td> | ||
<td>{{.Type}}</td> | ||
<td>{{.Replicas}}</td> | ||
<td>{{.RolloutStrategy}}</td> | ||
<td>{{.PodAntiAffinity}}</td> | ||
<td>{{.PVC}}</td> | ||
<td>{{.Rank}}</td> | ||
</tr> | ||
{{end}} | ||
</tbody> | ||
</table> | ||
</body> | ||
</html>` | ||
var HtmlPage = ` | ||
<h2>High Availability</h2> | ||
<table class="responsive-table highlight"> | ||
<thead> | ||
<tr> | ||
<th>Namespace</th> | ||
<th>Name</th> | ||
<th>Type</th> | ||
<th>Replicas</th> | ||
<th>Rollout Strategy</th> | ||
<th>Anti-Affinity</th> | ||
<th>PVCs</th> | ||
<th>Rank</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{range .Items}} | ||
<tr> | ||
<td>{{.Namespace}}</td> | ||
<td>{{.Name}}</td> | ||
<td>{{.Type}}</td> | ||
<td>{{.Replicas}}</td> | ||
<td>{{.RolloutStrategy}}</td> | ||
<td>{{.PodAntiAffinity}}</td> | ||
<td>{{.PVC}}</td> | ||
<td>{{.Rank}}</td> | ||
</tr> | ||
{{end}} | ||
</tbody> | ||
</table> | ||
<br/> | ||
<div style="white-space: pre-wrap;">%s</div>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package printer | ||
|
||
var HtmlContainer = `<html> | ||
<head> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<link type="text/css" rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" | ||
media="screen,projection" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
%s | ||
</div> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> | ||
</body> | ||
</html>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
package resources | ||
|
||
var HtmlPage = `<html> | ||
<body> | ||
<table> | ||
<thead> | ||
<tr> | ||
<td>Pod</td> | ||
<td>Memory Requests</td> | ||
<td>Memory Limits</td> | ||
<td>CPU Requests</td> | ||
<td>CPU Limits</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{range .Items}} | ||
<tr> | ||
<td>{{.Pod}}</td> | ||
<td>{{.MemoryRequests.Min.FormatMemory}}<br>{{.MemoryRequests.Avg.FormatMemory}}<br>{{.MemoryRequests.Max.FormatMemory}}</td> | ||
<td>{{.MemoryLimits.Min.FormatMemory}}<br>{{.MemoryLimits.Avg.FormatMemory}}<br>{{.MemoryLimits.Max.FormatMemory}}</td> | ||
<td>{{.CPURequests.Min.FormatCPU}}<br>{{.CPURequests.Avg.FormatCPU}}<br>{{.CPURequests.Max.FormatCPU}}</td> | ||
<td>{{.CPULimits.Min.FormatCPU}}<br>{{.CPULimits.Avg.FormatCPU}}<br>{{.CPULimits.Max.FormatCPU}}</td> | ||
</tr> | ||
{{end}} | ||
</tbody> | ||
</table> | ||
</body> | ||
</html>` | ||
var HtmlPage = ` | ||
<h2>Resource usage</h2> | ||
<table class="responsive-table highlight"> | ||
<thead> | ||
<tr> | ||
<th>Namespace</th> | ||
<th>Pod</th> | ||
<th>Memory Requests</th> | ||
<th>Memory Limits</th> | ||
<th>CPU Requests</th> | ||
<th>CPU Limits</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{range .Items}} | ||
<tr> | ||
<td>{{.Namespace}}</td> | ||
<td>{{.Pod}}</td> | ||
<td>{{.MemoryRequests.Min.FormatMemory}}<br>{{.MemoryRequests.Avg.FormatMemory}}<br>{{.MemoryRequests.Max.FormatMemory}}</td> | ||
<td>{{.MemoryLimits.Min.FormatMemory}}<br>{{.MemoryLimits.Avg.FormatMemory}}<br>{{.MemoryLimits.Max.FormatMemory}}</td> | ||
<td>{{.CPURequests.Min.FormatCPU}}<br>{{.CPURequests.Avg.FormatCPU}}<br>{{.CPURequests.Max.FormatCPU}}</td> | ||
<td>{{.CPULimits.Min.FormatCPU}}<br>{{.CPULimits.Avg.FormatCPU}}<br>{{.CPULimits.Max.FormatCPU}}</td> | ||
</tr> | ||
{{end}} | ||
</tbody> | ||
</table>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters