Compare commits
18 Commits
b88a20a811
...
9c18cc2d48
| Author | SHA1 | Date | |
|---|---|---|---|
|
9c18cc2d48
|
|||
|
0097bdd525
|
|||
|
04af503e40
|
|||
|
d7154e7157
|
|||
|
8314da68c2
|
|||
|
764ad34a2f
|
|||
|
2a1cde7896
|
|||
|
87ab8d6180
|
|||
|
9abfbc95b8
|
|||
|
1ce22a56b5
|
|||
|
8dbb1659bf
|
|||
|
ad49e4538b
|
|||
|
6da5d5a58a
|
|||
|
61f2837388
|
|||
|
32e5235359
|
|||
|
9624c224b8
|
|||
|
19857a02dc
|
|||
|
6fffc4ccfc
|
4
.gitignore
vendored
@@ -31,10 +31,6 @@ go.work.sum
|
|||||||
/cmd/pkgserver/ui/static/*.js
|
/cmd/pkgserver/ui/static/*.js
|
||||||
/cmd/pkgserver/ui/static/*.css*
|
/cmd/pkgserver/ui/static/*.css*
|
||||||
/cmd/pkgserver/ui/static/*.css.map
|
/cmd/pkgserver/ui/static/*.css.map
|
||||||
/cmd/pkgserver/ui_test/*.js
|
|
||||||
/cmd/pkgserver/ui_test/lib/*.js
|
|
||||||
/cmd/pkgserver/ui_test/lib/*.css*
|
|
||||||
/cmd/pkgserver/ui_test/lib/*.css.map
|
|
||||||
/internal/pkg/testdata/testtool
|
/internal/pkg/testdata/testtool
|
||||||
/internal/rosa/hakurei_current.tar.gz
|
/internal/rosa/hakurei_current.tar.gz
|
||||||
|
|
||||||
|
|||||||
@@ -25,14 +25,38 @@ func serveStaticContent(w http.ResponseWriter, r *http.Request) {
|
|||||||
http.ServeFileFS(w, r, content, "ui/static/favicon.ico")
|
http.ServeFileFS(w, r, content, "ui/static/favicon.ico")
|
||||||
case "/static/index.js":
|
case "/static/index.js":
|
||||||
http.ServeFileFS(w, r, content, "ui/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:
|
default:
|
||||||
http.NotFound(w, r)
|
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) {
|
func uiRoutes(mux *http.ServeMux) {
|
||||||
mux.HandleFunc("GET /{$}", serveWebUI)
|
mux.HandleFunc("GET /{$}", serveWebUI)
|
||||||
mux.HandleFunc("GET /favicon.ico", serveStaticContent)
|
mux.HandleFunc("GET /favicon.ico", serveStaticContent)
|
||||||
mux.HandleFunc("GET /static/", serveStaticContent)
|
mux.HandleFunc("GET /static/", serveStaticContent)
|
||||||
|
mux.HandleFunc("GET /test.html", serveTester)
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 788 B After Width: | Height: | Size: 788 B |
@@ -1,3 +1,3 @@
|
|||||||
import "../all_tests.js";
|
import "./all_tests.js";
|
||||||
import { GoTestReporter, TESTS } from "./test.js";
|
import { GoTestReporter, TESTS } from "./test.js";
|
||||||
TESTS.run(new GoTestReporter());
|
TESTS.run(new GoTestReporter());
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
// provides faster iteration, especially for those acclimated to test-driven
|
// provides faster iteration, especially for those acclimated to test-driven
|
||||||
// development.
|
// development.
|
||||||
|
|
||||||
import "../all_tests.js";
|
import "./all_tests.js";
|
||||||
import { StreamReporter, TESTS } from "./test.js";
|
import { StreamReporter, TESTS } from "./test.js";
|
||||||
|
|
||||||
// TypeScript doesn't like process and Deno as their type definitions aren't
|
// TypeScript doesn't like process and Deno as their type definitions aren't
|
||||||
|
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 812 B |
|
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 812 B |
|
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 572 B |
|
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 572 B |
@@ -1,5 +1,4 @@
|
|||||||
import "../ui/static/index.js"
|
import { NoOpReporter, TestRegistrar, context, group, suite, test } from "./test.js";
|
||||||
import { NoOpReporter, TestRegistrar, context, group, suite, test } from "./lib/test.js";
|
|
||||||
|
|
||||||
suite("dog", [
|
suite("dog", [
|
||||||
group("tail", [
|
group("tail", [
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="static/style.css">
|
<link rel="stylesheet" href="static/test.css">
|
||||||
<title>PkgServer Tests</title>
|
<title>PkgServer Tests</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -4,6 +4,6 @@ package main
|
|||||||
|
|
||||||
import "embed"
|
import "embed"
|
||||||
|
|
||||||
//go:generate sh -c "sass ui/static/dark.scss ui/static/dark.css && sass ui/static/light.scss ui/static/light.css && tsc -p ui/static"
|
//go:generate sh -c "sass ui/static/dark.scss ui/static/dark.css && sass ui/static/light.scss ui/static/light.css && sass ui/static/test.scss ui/static/test.css && tsc -p ui/static"
|
||||||
//go:embed ui/*
|
//go:embed ui/*
|
||||||
var content embed.FS
|
var content embed.FS
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"strict": true,
|
|
||||||
"target": "ES2024"
|
|
||||||
}
|
|
||||||
}
|
|
||||||