From 48ba9b7bfe54bc6b921e8f3032064cd13b06246c Mon Sep 17 00:00:00 2001 From: rand00 Date: Mon, 24 Jan 2022 14:38:39 +0100 Subject: [PATCH] Views: Also rendering dependencies for non-binary packages --- lib/views.ml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/views.ml b/lib/views.ml index f6b681d..b94fdbd 100644 --- a/lib/views.ml +++ b/lib/views.ml @@ -356,17 +356,20 @@ let job_build latest next previous = let delta = Ptime.diff finish start in - let analysis_section = if not @@ contains_debug_bin artifacts then [] else [ - h3 [txt "Analysis"]; - p [ - let src = Fmt.str "/job/%s/build/%a/viztreemap" name Uuidm.pp uuid in - let style = "width: 50em; height: 54.0em" in (*treemap tries to be square*) - iframe ~a:[ a_src src; a_title "Binary dissection"; a_style style ] [] ]; - p [ + let analysis_section = [ + [ h3 [txt "Analysis"] ]; + if not @@ contains_debug_bin artifacts then [] else [ + p [ + let src = Fmt.str "/job/%s/build/%a/viztreemap" name Uuidm.pp uuid in + let style = "width: 50em; height: 54.0em" in (*treemap tries to be square*) + iframe ~a:[ a_src src; a_title "Binary dissection"; a_style style ] [] + ] + ]; + [ p [ let src = Fmt.str "/job/%s/build/%a/vizdependencies" name Uuidm.pp uuid in let style = "width: 50em; height: 54.0em" in - iframe ~a:[ a_src src; a_title "Opam dependencies"; a_style style ] [] ]; - ] + iframe ~a:[ a_src src; a_title "Opam dependencies"; a_style style ] [] ]]; + ] |> List.flatten in let body = h1 [txtf "Job %s" name] ::