Log output styling
This commit is contained in:
parent
e8aa906c00
commit
8b143ab062
1 changed files with 12 additions and 6 deletions
18
lib/views.ml
18
lib/views.ml
|
@ -21,7 +21,11 @@ let check_icon result =
|
||||||
let layout ~title:title_ body_ =
|
let layout ~title:title_ body_ =
|
||||||
html
|
html
|
||||||
(head (title (txt title_))
|
(head (title (txt title_))
|
||||||
[])
|
[style ~a:[a_mime_type "text/css"]
|
||||||
|
[
|
||||||
|
txt ".output-ts { white-space: nowrap; }";
|
||||||
|
txt ".output-code { overflow: visible; }"
|
||||||
|
]])
|
||||||
(body body_)
|
(body body_)
|
||||||
|
|
||||||
let builder jobs =
|
let builder jobs =
|
||||||
|
@ -71,10 +75,12 @@ let job_run
|
||||||
[ h1 [txtf "Job build %s %a (%a)" name ptime_pp start Uuidm.pp uuid];
|
[ h1 [txtf "Job build %s %a (%a)" name ptime_pp start Uuidm.pp uuid];
|
||||||
p [txtf "Took %a." Ptime.Span.pp delta ];
|
p [txtf "Took %a." Ptime.Span.pp delta ];
|
||||||
p [txtf "Status: %a." Builder.pp_execution_result result];
|
p [txtf "Status: %a." Builder.pp_execution_result result];
|
||||||
div (List.concat_map (fun (ts, line) ->
|
table (List.concat_map (fun (ts, line) ->
|
||||||
[
|
[tr [
|
||||||
code [txtf "%d ms %s" (Duration.to_ms (Int64.of_int ts)) line];
|
td ~a:[a_class ["output-ts"]]
|
||||||
br ();
|
[txtf "%d ms" (Duration.to_ms (Int64.of_int ts))];
|
||||||
])
|
td ~a:[a_class ["output-code"]]
|
||||||
|
[code [txt line]];
|
||||||
|
]])
|
||||||
(List.rev out));
|
(List.rev out));
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue