Merge pull request '/failed-builds: special case no failed builds' (#148) from fix-142 into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/148
This commit is contained in:
commit
3bb8925bd3
1 changed files with 18 additions and 11 deletions
29
lib/views.ml
29
lib/views.ml
|
@ -943,15 +943,22 @@ let failed_builds ~start ~count builds =
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
layout ~title:"Failed builds"
|
layout ~title:"Failed builds"
|
||||||
([
|
(match builds with
|
||||||
H.h1 [H.txt "Failed builds"];
|
| [] ->
|
||||||
H.ul (List.map build builds);
|
[
|
||||||
H.p [ txtf "View the next %d failed builds " count;
|
H.h1 [H.txt "No failed builds to list"];
|
||||||
H.a ~a:H.[
|
H.p [H.txt "🥳"];
|
||||||
a_href @@ Link.Failed_builds.make
|
]
|
||||||
~count ~start:(start + count) () ]
|
| _ :: _ ->
|
||||||
[ H.txt "here"];
|
[
|
||||||
H.txt ".";
|
H.h1 [H.txt "Failed builds"];
|
||||||
]
|
H.ul (List.map build builds);
|
||||||
])
|
H.p [ txtf "View the next %d failed builds " count;
|
||||||
|
H.a ~a:H.[
|
||||||
|
a_href @@ Link.Failed_builds.make
|
||||||
|
~count ~start:(start + count) () ]
|
||||||
|
[ H.txt "here"];
|
||||||
|
H.txt ".";
|
||||||
|
]
|
||||||
|
])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue