| 35 | } |
| 36 | |
| 37 | func (w *Watcher) writeLoadingPage(rw http.ResponseWriter) error { |
| 38 | msg := w.cfg.ContainerName() + " is starting..." |
| 39 | |
| 40 | data := new(templateData) |
| 41 | data.Title = w.cfg.ContainerName() |
| 42 | data.Message = msg |
| 43 | data.FavIconPath = idlewatcher.FavIconPath |
| 44 | data.LoadingPageCSSPath = idlewatcher.LoadingPageCSSPath |
| 45 | data.LoadingPageJSPath = idlewatcher.LoadingPageJSPath |
| 46 | data.WakeEventsPath = idlewatcher.WakeEventsPath |
| 47 | |
| 48 | rw.Header().Set("Content-Type", "text/html; charset=utf-8") |
| 49 | setNoStoreHeaders(rw.Header()) |
| 50 | rw.Header().Add("Connection", "close") |
| 51 | err := loadingPageTmpl.Execute(rw, data) |
| 52 | return err |
| 53 | } |