forked from rosa/hakurei
cmd/pkgserver: relocate JS tests
This commit is contained in:
@@ -25,38 +25,14 @@ func serveStaticContent(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFileFS(w, r, content, "ui/static/favicon.ico")
|
||||
case "/static/index.js":
|
||||
http.ServeFileFS(w, r, content, "ui/static/index.js")
|
||||
case "/static/test.js":
|
||||
http.ServeFileFS(w, r, content, "ui/static/test.js")
|
||||
case "/static/test.css":
|
||||
http.ServeFileFS(w, r, content, "ui/static/test.css")
|
||||
case "/static/all_tests.js":
|
||||
http.ServeFileFS(w, r, content, "ui/static/all_tests.js")
|
||||
case "/static/test_tests.js":
|
||||
http.ServeFileFS(w, r, content, "ui/static/test_tests.js")
|
||||
case "/static/success-closed.svg":
|
||||
http.ServeFileFS(w, r, content, "ui/static/success-closed.svg")
|
||||
case "/static/success-open.svg":
|
||||
http.ServeFileFS(w, r, content, "ui/static/success-open.svg")
|
||||
case "/static/failure-closed.svg":
|
||||
http.ServeFileFS(w, r, content, "ui/static/failure-closed.svg")
|
||||
case "/static/failure-open.svg":
|
||||
http.ServeFileFS(w, r, content, "ui/static/failure-open.svg")
|
||||
case "/static/skip-closed.svg":
|
||||
http.ServeFileFS(w, r, content, "ui/static/skip-closed.svg")
|
||||
case "/static/skip-open.svg":
|
||||
http.ServeFileFS(w, r, content, "ui/static/skip-open.svg")
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
|
||||
}
|
||||
}
|
||||
func serveTester(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFileFS(w, r, content, "ui/test.html")
|
||||
}
|
||||
|
||||
func uiRoutes(mux *http.ServeMux) {
|
||||
mux.HandleFunc("GET /{$}", serveWebUI)
|
||||
mux.HandleFunc("GET /favicon.ico", serveStaticContent)
|
||||
mux.HandleFunc("GET /static/", serveStaticContent)
|
||||
mux.HandleFunc("GET /test.html", serveTester)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user