From 0ec26734935afc0dfaf96c26762be0e678c853de Mon Sep 17 00:00:00 2001 From: Danjela Lura Date: Fri, 24 Apr 2020 08:31:24 +0200 Subject: Add support for query parameters to the View JSON button of Jobs Signed-off-by: Christopher Baines --- guix-data-service/web/jobs/html.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'guix-data-service') diff --git a/guix-data-service/web/jobs/html.scm b/guix-data-service/web/jobs/html.scm index 4495391..82734d6 100644 --- a/guix-data-service/web/jobs/html.scm +++ b/guix-data-service/web/jobs/html.scm @@ -20,6 +20,7 @@ #:use-module (ice-9 match) #:use-module (guix-data-service web html-utils) #:use-module (guix-data-service web view html) + #:use-module (guix-data-service web query-parameters) #:export (view-jobs view-job-events view-job-queue @@ -112,8 +113,13 @@ (@ (class "btn-group pull-right") (role "group")) (a (@ (class "btn btn-lg btn-default") - (href ,(string-append - "/jobs.json")) + (href ,(let ((query-params + (query-parameters->string query-parameters))) + (string-append + "/jobs.json" + (if (string-null? query-params) + "" + (string-append "?" query-params))))) (role "button")) "View JSON")) -- cgit v1.2.3