From 9d011d1bb8aa870228a9a618d65a2cea3ff5e8e4 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 21 Oct 2023 17:14:42 +0100 Subject: Support filtering by branch --- guix-qa-frontpage/server.scm | 36 ++++++++++++++++++++++++++++++------ guix-qa-frontpage/view/patches.scm | 19 ++++++++++++++++++- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm index 4e88a3b..5c7023e 100644 --- a/guix-qa-frontpage/server.scm +++ b/guix-qa-frontpage/server.scm @@ -232,9 +232,27 @@ symbol-key #f)))) query-params)) + (latest-series-branches + (map + (match-lambda + ((_ . series) + (patchwork-series->branch series))) + latest-series)) + (branch-options + (sort (delete-duplicates + latest-series-branches) + stringissue-status-span status) @@ -73,10 +76,11 @@ will appear first.") '((@ (open "")))) (summary "Filter issues") (form + (@ (style "text-align: left;")) + (label "By status") ,@(map (lambda (status) `(div - (@ (style "text-align: left;")) (input (@ (type "checkbox") (id ,status) (name ,status) @@ -91,6 +95,19 @@ will appear first.") "-" " ")))) %overall-statuses) + (label (@ (for "branch-filter")) + "By branch") + (select (@ (name "branch") + (id "branch-filter") + (multiple "true")) + ,@(map + (lambda (branch) + `(option (@ (value ,branch) + ,@(if (member branch filtered-branches) + '((selected "")) + '())) + ,branch)) + branch-options)) (button (@ (type "submit")) "Update"))) (table (tbody -- cgit v1.2.3