Add result tooltip, spacing
A tooltip will be displayed when hovering the cursor over the build status check mark.
This commit is contained in:
parent
355835df5e
commit
e8aa906c00
1 changed files with 15 additions and 7 deletions
22
lib/views.ml
22
lib/views.ml
|
@ -1,14 +1,21 @@
|
||||||
open Tyxml.Html
|
open Tyxml.Html
|
||||||
|
|
||||||
let txtf fmt = Fmt.kstrf txt fmt
|
let txtf fmt = Fmt.kstrf txt fmt
|
||||||
|
let a_titlef fmt = Fmt.kstrf a_title fmt
|
||||||
|
|
||||||
let check_icon check =
|
let check_icon result =
|
||||||
if check
|
match result with
|
||||||
then
|
| Builder.Exited 0 ->
|
||||||
span ~a:[a_style "color: green;"]
|
span ~a:[
|
||||||
|
a_style "color: green;";
|
||||||
|
a_titlef "%a" Builder.pp_execution_result result;
|
||||||
|
]
|
||||||
[txt "☑"]
|
[txt "☑"]
|
||||||
else
|
| _ ->
|
||||||
span ~a:[a_style "color: red;"]
|
span ~a:[
|
||||||
|
a_style "color: red;";
|
||||||
|
a_titlef "%a" Builder.pp_execution_result result;
|
||||||
|
]
|
||||||
[txt "☒"]
|
[txt "☒"]
|
||||||
|
|
||||||
let layout ~title:title_ body_ =
|
let layout ~title:title_ body_ =
|
||||||
|
@ -44,8 +51,9 @@ let job name runs =
|
||||||
a ~a:[a_href Fpath.(to_string (v "run" / Uuidm.to_string run.Model.uuid) ^ "/")]
|
a ~a:[a_href Fpath.(to_string (v "run" / Uuidm.to_string run.Model.uuid) ^ "/")]
|
||||||
[
|
[
|
||||||
txtf "%a" (Ptime.pp_human ()) run.Model.start;
|
txtf "%a" (Ptime.pp_human ()) run.Model.start;
|
||||||
check_icon (match run.result with Builder.Exited 0 -> true | _ -> false);
|
|
||||||
];
|
];
|
||||||
|
txt " ";
|
||||||
|
check_icon run.result;
|
||||||
])
|
])
|
||||||
runs);
|
runs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue