serveStatic serves the dashboard's static assets. Any unrecognized path falls back to the models explorer (single-page-style entry).
(w http.ResponseWriter, r *http.Request, dir string)
| 241 | "models": "models.html", |
| 242 | "login": "login.html", |
| 243 | "models.html": "models.html", |
| 244 | "login.html": "login.html", |
| 245 | } |
| 246 | |
| 247 | // serveStatic serves the dashboard's static assets. Any unrecognized path falls |
| 248 | // back to the models explorer (single-page-style entry). |
| 249 | func serveStatic(w http.ResponseWriter, r *http.Request, dir string) { |
| 250 | file, ok := dashboardPages[strings.TrimPrefix(r.URL.Path, "/")] |
| 251 | if !ok { |
| 252 | file = "models.html" |