Documentation
¶
Overview ¶
Package ui exposes the admin observability web UI as an embedded filesystem so the admin server binary is fully self-contained.
Build pipeline (no copy step — vite writes straight into this package):
- `npm run build` in ui/ (tsc -b && vite build) writes the bundle directly to server/ui/dist/ — ui/vite.config.ts sets outDir to ../server/ui/dist, so the //go:embed below picks it up as-is.
- `go build ./cmd/admin-server` (from server/; or `go build ./server/cmd/admin-server` from the workspace root) produces a binary that serves the static UI at "/" without depending on anything on disk.
During development you run `npm run dev` in ui/ (Vite on :5173 with a proxy to :8080) and access the admin UI directly without going through the Go embed path. The embed path is for production binaries.
The built dist directory (index.html + hashed assets) is committed so the binary is self-contained and `go install …/admin-server` works without a Node toolchain. If a checkout somehow lacks dist, FS still embeds an empty filesystem and the server falls back to the placeholder index from PlaceholderHTML.
Index ¶
Constants ¶
const PlaceholderHTML = `` /* 1023-byte string literal not displayed */
PlaceholderHTML is what the server serves at "/" when no dist has been built. It tells operators what to do; it never ships in a real release because the committed server/ui/dist is what releases embed.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.