diff options
author | Danjela Lura <danielaluraa@gmail.com> | 2020-04-24 08:31:24 +0200 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-04-24 20:00:56 +0100 |
commit | 0ec26734935afc0dfaf96c26762be0e678c853de (patch) | |
tree | 7d300e8c93c9c9e10174b513386452c6cde85cef /guix-data-service | |
parent | 5af213a165e3b603b27a773d52676cec633c32cc (diff) | |
download | data-service-0ec26734935afc0dfaf96c26762be0e678c853de.tar data-service-0ec26734935afc0dfaf96c26762be0e678c853de.tar.gz |
Add support for query parameters to the View JSON button of Jobs
Signed-off-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/web/jobs/html.scm | 10 |
1 files changed, 8 insertions, 2 deletions
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")) |