From 6f95f7e96500cddae6ea97ee7470530bd0a247ca Mon Sep 17 00:00:00 2001 From: rand00 Date: Wed, 26 Jan 2022 21:11:57 +0100 Subject: [PATCH] Views: Switch viz order + fixed iframe size --- lib/views.ml | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/lib/views.ml b/lib/views.ml index b17a148..64ccf00 100644 --- a/lib/views.ml +++ b/lib/views.ml @@ -441,7 +441,16 @@ module Job = struct ("Earlier build with different output ", previous) ]) ] - let viz_style = " + let viz_style_deps = " + width: 46em; + height: 45.4em; + max-width: 100%; + max-height: 47vw; + min-width: 38em; + min-height: 39em; + " + + let viz_style_treemap = " width: 46em; height: 48.4em; max-width: 100%; @@ -453,15 +462,23 @@ module Job = struct let make_viz_section ~name ~artifacts ~uuid = [ (* [ h3 [txt "Analysis"] ]; *) + [ p [ + let src = Fmt.str "/job/%s/build/%a/vizdependencies" name Uuidm.pp uuid in + iframe ~a:[ + a_src src; + a_title "Opam dependencies"; + a_style viz_style_deps + ] [] + ]]; if not @@ contains_debug_bin artifacts then [] else [ p [ let src = Fmt.str "/job/%s/build/%a/viztreemap" name Uuidm.pp uuid in - iframe ~a:[ a_src src; a_title "Binary dissection"; a_style viz_style ] [] - ] - ]; - [ p [ - let src = Fmt.str "/job/%s/build/%a/vizdependencies" name Uuidm.pp uuid in - iframe ~a:[ a_src src; a_title "Opam dependencies"; a_style viz_style ] [] ]]; + iframe ~a:[ + a_src src; + a_title "Binary dissection"; + a_style viz_style_treemap + ] [] + ]]; ] |> List.flatten let make