jepsen.web

Web server frontend for browsing test results.

app

(app req)

assert-file-in-scope!

(assert-file-in-scope! f)

Throws if the given file is outside our store directory.

basic-date-time

clj-escape

(clj-escape s)

Escape a Clojure string.

colors

content-type

Map of extensions to known content-types

dir

(dir dir)

Serves a directory.

dir-cell

(dir-cell f)

Renders a File (a directory) for a directory view.

dir-sort

(dir-sort files)

Sort a collection of Files. If everything’s an integer, sort numerically, else alphanumerically.

e404

fast-tests

(fast-tests)

Abbreviated set of tests: just name, start-time, results. Memoizes (partially) via test-cache.

file-cell

(file-cell f)

Renders a File for a directory view.

file-url

(file-url f)

URL for a File

files

(files req)

Serve requests for /files/ urls

home

(home req)

Home page

js-escape

(js-escape s)

Escape a Javascript string.

page-limit

How many test rows per page?

params

(params req)

Parses a query params map from a request.

parse-time

(parse-time t)

Parses a time from a string

relative-path

(relative-path base target)

Relative path, as a Path.

serve!

(serve! options)

Starts an http server with the given httpkit options.

test-cache

An in-memory cache of {:name, :start-time, :valid?} maps, indexed by an ordered map of :start-time :name. Earliest start times at the front.

test-cache-key

Function which extracts the key for the test cache from a map.

test-cache-mutable-window

How far back in the test cache do we refresh on every page load?

test-header

(test-header)

test-row

(test-row t)

Turns a test map into a table row.

url

(url t & args)

Takes a test and filename components; returns a URL for that file.

url-encode-path-components

(url-encode-path-components x)

URL encodes individual components of a path, leaving / as / instead of encoded.

valid-color

zip

(zip req dir)

Serves a directory as a zip file. Strips .zip off the extension.

zip-path!

(zip-path! zipper base file)

Writes a path to a zipoutputstream