aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorDanjela Lura <danielaluraa@gmail.com>2020-04-24 08:31:24 +0200
committerChristopher Baines <mail@cbaines.net>2020-04-24 20:00:56 +0100
commit0ec26734935afc0dfaf96c26762be0e678c853de (patch)
tree7d300e8c93c9c9e10174b513386452c6cde85cef /guix-data-service
parent5af213a165e3b603b27a773d52676cec633c32cc (diff)
downloaddata-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.scm10
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"))