Remove README from build page

This commit is contained in:
Robur 2021-12-02 14:49:45 +00:00
parent 19633e84ea
commit 8489d1ff36
2 changed files with 4 additions and 15 deletions

View file

@ -177,7 +177,6 @@ let add_routes datadir =
and build = Dream.param "build" req in
get_uuid build >>= fun uuid ->
Dream.sql req (fun conn ->
Model.readme job_name conn >>= fun readme ->
Model.build uuid conn >>= fun (build_id, build) ->
Model.build_artifacts build_id conn >>= fun artifacts ->
Model.builds_with_same_input_and_same_main_binary build_id conn >>= fun same_input_same_output ->
@ -186,12 +185,12 @@ let add_routes datadir =
Model.latest_successful_build build.job_id (Some build.Builder_db.Build.platform) conn >>= fun latest ->
Model.next_successful_build_different_output build_id conn >>= fun next ->
Model.previous_successful_build_different_output build_id conn >|= fun previous ->
(readme, build, artifacts, same_input_same_output, different_input_same_output, same_input_different_output, latest, next, previous)
(build, artifacts, same_input_same_output, different_input_same_output, same_input_different_output, latest, next, previous)
)
|> if_error "Error getting job build"
~log:(fun e -> Log.warn (fun m -> m "Error getting job build: %a" pp_error e))
>>= fun (readme, build, artifacts, same_input_same_output, different_input_same_output, same_input_different_output, latest, next, previous) ->
Views.job_build job_name readme build artifacts same_input_same_output different_input_same_output same_input_different_output latest next previous
>>= fun (build, artifacts, same_input_same_output, different_input_same_output, same_input_different_output, latest, next, previous) ->
Views.job_build job_name build artifacts same_input_same_output different_input_same_output same_input_different_output latest next previous
|> string_of_html |> Dream.html |> Lwt_result.ok
in

View file

@ -337,7 +337,6 @@ let job ~failed name platform readme builds =
let job_build
name
readme
({ Builder_db.Build.uuid; start; finish; result; platform; _ } as build)
artifacts
same_input_same_output different_input_same_output same_input_different_output
@ -345,18 +344,9 @@ let job_build
=
let delta = Ptime.diff finish start in
layout ~nav:(`Build (name, build)) ~title:(Fmt.str "Job %s %a" name pp_ptime start)
((h1 [txtf "Job %s" name] ::
(match readme with
| None -> []
| Some data ->
[
h2 ~a:[a_id "readme"] [txt "README"];
a ~a:[a_href "#build"] [txt "Skip to build"];
Unsafe.data (markdown_to_html data)
])) @
(h1 [txtf "Job %s" name] ::
[
h2 ~a:[a_id "build"] [txtf "Build %a" pp_ptime start];
a ~a:[a_href "#readme"] [txt "Back to readme"];
p [txtf "Built on platform %s" platform ];
p [txtf "Build took %a." Ptime.Span.pp delta ];
p [txtf "Execution result: %a." Builder.pp_execution_result result];