Splash tweaks

This commit is contained in:
Christopher LaPointe
2023-05-25 22:06:16 -04:00
parent 6cf0ab301c
commit af94d29dd3
5 changed files with 15 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ const httpAssetPrefix = "/__llassets/"
type SplashModel struct {
Name string
CID string
WaitForCode int
WaitForPath string
}

View File

@@ -70,10 +70,13 @@ body {
.message {
margin: 16px;
font-size: 1.6em;
font-weight: bold;
color: #333;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
text-align: center;
}
.message h1,h2,h3 {
margin: 8px;
}
.square {

View File

@@ -22,7 +22,8 @@
<div class="square last"></div>
</div>
<div class="message">
Starting {{.Name}}
<h2>Starting {{.Name}}</h2>
<h3>{{.CID}}</h3>
</div>
</div>
<script>

View File

@@ -78,6 +78,7 @@ func ContainerHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusAccepted)
renderErr := splashTemplate.Execute(w, SplashModel{
Name: host,
CID: sOpts.ContainerName,
WaitForCode: sOpts.WaitForCode,
WaitForPath: sOpts.WaitForPath,
})

View File

@@ -58,6 +58,7 @@ func (s *Core) Close() error {
type StartResult struct {
WaitForCode int
WaitForPath string
ContainerName string
}
func (s *Core) StartHost(hostname string) (*StartResult, error) {
@@ -77,6 +78,7 @@ func (s *Core) StartHost(hostname string) (*StartResult, error) {
return &StartResult{
WaitForCode: ets.waitForCode,
WaitForPath: ets.waitForPath,
ContainerName: containerShort(ct),
}, nil
}