mirror of
https://github.com/zix99/traefik-lazyload.git
synced 2025-12-21 13:23:04 +01:00
Splash tweaks
This commit is contained in:
@@ -15,6 +15,7 @@ const httpAssetPrefix = "/__llassets/"
|
||||
|
||||
type SplashModel struct {
|
||||
Name string
|
||||
CID string
|
||||
WaitForCode int
|
||||
WaitForPath string
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
1
main.go
1
main.go
@@ -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,
|
||||
})
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user