Views: Syntax betterings for readability
This commit is contained in:
parent
13f2f91295
commit
f1214e01a3
1 changed files with 69 additions and 62 deletions
31
lib/views.ml
31
lib/views.ml
|
@ -242,7 +242,8 @@ module Builds = struct
|
|||
Uuidm.pp latest_build.Builder_db.Build.uuid]
|
||||
[txtf "%a" pp_ptime latest_build.Builder_db.Build.start];
|
||||
H.txt " ";
|
||||
] @ (match latest_artifact with
|
||||
]
|
||||
@ (match latest_artifact with
|
||||
| Some main_binary ->
|
||||
artifact
|
||||
~basename:true
|
||||
|
@ -252,11 +253,13 @@ module Builds = struct
|
|||
| None ->
|
||||
[ txtf "Build failure: %a" Builder.pp_execution_result
|
||||
latest_build.Builder_db.Build.result ]
|
||||
) @ [ H.br () ]
|
||||
)
|
||||
@ [ H.br () ]
|
||||
|
||||
let make_jobs jobs =
|
||||
jobs |> List.map (fun (job_name, synopsis, platform_builds) ->
|
||||
H.li ([
|
||||
H.li (
|
||||
[
|
||||
H.a ~a:H.[a_href ("job/" ^ job_name ^ "/")]
|
||||
[H.txt job_name];
|
||||
H.br ();
|
||||
|
@ -279,8 +282,7 @@ module Builds = struct
|
|||
layout ~title:"Reproducible OPAM builds"
|
||||
(make_header
|
||||
@ make_body section_job_map
|
||||
@
|
||||
[ H.p [
|
||||
@ [ H.p [
|
||||
H.txt "View the latest failed builds ";
|
||||
H.a ~a:H.[a_href "/failed-builds/"]
|
||||
[H.txt "here"];
|
||||
|
@ -295,7 +297,8 @@ module Job = struct
|
|||
layout
|
||||
~nav:(`Job (job_name, platform))
|
||||
~title:(Fmt.str "Job %s %a" job_name pp_platform platform)
|
||||
((H.h1 [txtf "Job %s %a" job_name pp_platform platform] ::
|
||||
(
|
||||
(H.h1 [txtf "Job %s %a" job_name pp_platform platform] ::
|
||||
(match readme with
|
||||
| None -> []
|
||||
| Some data ->
|
||||
|
@ -303,12 +306,15 @@ module Job = struct
|
|||
H.h2 ~a:H.[a_id "readme"] [H.txt "README"];
|
||||
H.a ~a:H.[a_href "#builds"] [H.txt "Skip to builds"];
|
||||
H.Unsafe.data (Utils.Omd.html_of_string data)
|
||||
])) @
|
||||
[
|
||||
])
|
||||
)
|
||||
@ [
|
||||
H.h2 ~a:H.[a_id "builds"] [H.txt "Builds"];
|
||||
H.a ~a:H.[a_href "#readme"] [H.txt "Back to readme"];
|
||||
H.ul (List.map (fun (build, main_binary) ->
|
||||
H.li ([
|
||||
H.ul (
|
||||
builds |> List.map (fun (build, main_binary) ->
|
||||
H.li (
|
||||
[
|
||||
check_icon build.Builder_db.Build.result;
|
||||
txtf " %s " build.platform;
|
||||
H.a ~a:H.[
|
||||
|
@ -319,7 +325,8 @@ module Job = struct
|
|||
txtf "%a" pp_ptime build.Builder_db.Build.start;
|
||||
];
|
||||
H.txt " ";
|
||||
] @ match main_binary with
|
||||
]
|
||||
@ match main_binary with
|
||||
| Some main_binary ->
|
||||
artifact
|
||||
~basename:true
|
||||
|
@ -329,7 +336,7 @@ module Job = struct
|
|||
| None ->
|
||||
[ txtf "Build failure: %a" Builder.pp_execution_result
|
||||
build.Builder_db.Build.result ]))
|
||||
builds);
|
||||
);
|
||||
if failed then
|
||||
H.p [
|
||||
H.txt "Excluding failed builds " ;
|
||||
|
|
Loading…
Reference in a new issue