-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
125 additions
and
114 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
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
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,90 +1,102 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="refresh" content="10"> | ||
<title>swarm</title> | ||
|
||
<style> | ||
body { | ||
background-color: black; | ||
background-image: radial-gradient( | ||
rgba(0, 150, 0, 0.75), black 120% | ||
); | ||
height: 100vh; | ||
color: white; | ||
font-family: "Andale Mono", Courier, monospace; | ||
text-shadow: 0 0 5px #C8C8C8; | ||
} | ||
<head> | ||
<meta http-equiv="refresh" content="10"> | ||
<title>sprinkle</title> | ||
|
||
body::after { | ||
content: ""; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100vw; | ||
height: 100vh; | ||
background: repeating-linear-gradient( | ||
0deg, | ||
<style> | ||
body { | ||
background-color: black; | ||
background-image: radial-gradient(rgba(0, 150, 0, 0.75), black 120%); | ||
height: 100vh; | ||
color: white; | ||
font-family: "Andale Mono", Courier, monospace; | ||
text-shadow: 0 0 5px #C8C8C8; | ||
} | ||
|
||
body::after { | ||
content: ""; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100vw; | ||
height: 100vh; | ||
background: repeating-linear-gradient(0deg, | ||
black 25%, | ||
black 25% 2px, | ||
transparent 2px, | ||
transparent 4px); | ||
} | ||
} | ||
|
||
::selection { | ||
background: #0080FF; | ||
text-shadow: none; | ||
} | ||
|
||
table { | ||
table-layout: auto; | ||
width: 80%; | ||
border-collapse: collapse; | ||
border: 2px dashed; | ||
} | ||
|
||
::selection { | ||
background: #0080FF; | ||
text-shadow: none; | ||
} | ||
th, | ||
td { | ||
padding: 20px; | ||
} | ||
|
||
table { | ||
table-layout: auto; | ||
width: 80%; | ||
border-collapse: collapse; | ||
border: 2px dashed; | ||
} | ||
tbody td { | ||
text-align: center; | ||
} | ||
|
||
th, td { | ||
padding: 20px; | ||
} | ||
th { | ||
border-bottom: 1px solid; | ||
} | ||
</style> | ||
</head> | ||
|
||
tbody td { | ||
text-align: center; | ||
} | ||
<body> | ||
<h1>sprinkle</h1> | ||
<h2>status</h2> | ||
<table> | ||
<thead> | ||
<th>Id</th> | ||
<th>IP</th> | ||
<th>Host</th> | ||
<th>Total RAM (GB)</th> | ||
<th>Free RAM (GB)</th> | ||
</thead> | ||
{{range $id, $status := .Status}} | ||
<tr> | ||
<td>{{$id}}</td> | ||
<td>{{$status.Ip}}</td> | ||
<td>{{$status.Hostname}}</td> | ||
<td>{{toGB $status.TotalRam}}</td> | ||
<td>{{toGB $status.FreeRam}}</td> | ||
</tr> | ||
{{end}} | ||
</table> | ||
|
||
th { | ||
border-bottom: 1px solid; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>swarm</h1> | ||
<h2>status</h2> | ||
<table> | ||
<thead><th>Id</th><th>IP</th><th>Host</th><th>Total RAM (GB)</th><th>Free RAM (GB)</th></thead> | ||
{{range $id, $status := .Status}} | ||
<tr> | ||
<td>{{$id}}</td> | ||
<td>{{$status.Ip}}</td> | ||
<td>{{$status.Hostname}}</td> | ||
<td>{{toGB $status.TotalRam}}</td> | ||
<td>{{toGB $status.FreeRam}}</td> | ||
</tr> | ||
{{end}} | ||
</table> | ||
<h2>jobs</h2> | ||
<table> | ||
<thead> | ||
<th>Id</th> | ||
<th>Start time</th> | ||
<th>Exited</th> | ||
<th>Success</th> | ||
</thead> | ||
{{range $id, $jobs := .Jobs}} | ||
{{range $_, $job := $jobs}} | ||
<tr> | ||
<td>{{$id}}</td> | ||
<td>{{$job.StartTime}}</td> | ||
<td>{{$job.Exited}}</td> | ||
<td>{{$job.Success}}</td> | ||
</tr> | ||
{{end}} | ||
{{end}} | ||
</table> | ||
</body> | ||
|
||
<h2>jobs</h2> | ||
<table> | ||
<thead><th>Id</th><th>Start time</th><th>Exited</th><th>Success</th></thead> | ||
{{range $id, $jobs := .Jobs}} | ||
{{range $_, $job := $jobs}} | ||
<tr> | ||
<td>{{$id}}</td> | ||
<td>{{$job.StartTime}}</td> | ||
<td>{{$job.Exited}}</td> | ||
<td>{{$job.Success}}</td> | ||
</tr> | ||
{{end}} | ||
{{end}} | ||
</table> | ||
</body> | ||
</html> | ||
</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
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,4 +1,4 @@ | ||
module github.com/dominichamon/swarm | ||
module github.com/dominichamon/sprinkle | ||
|
||
go 1.18 | ||
|
||
|
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