Add support for query parameters to the View JSON button of Jobs
Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
parent
5af213a165
commit
0ec2673493
1 changed files with 8 additions and 2 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (guix-data-service web html-utils)
|
#:use-module (guix-data-service web html-utils)
|
||||||
#:use-module (guix-data-service web view html)
|
#:use-module (guix-data-service web view html)
|
||||||
|
#:use-module (guix-data-service web query-parameters)
|
||||||
#:export (view-jobs
|
#:export (view-jobs
|
||||||
view-job-events
|
view-job-events
|
||||||
view-job-queue
|
view-job-queue
|
||||||
|
|
@ -112,8 +113,13 @@
|
||||||
(@ (class "btn-group pull-right")
|
(@ (class "btn-group pull-right")
|
||||||
(role "group"))
|
(role "group"))
|
||||||
(a (@ (class "btn btn-lg btn-default")
|
(a (@ (class "btn btn-lg btn-default")
|
||||||
(href ,(string-append
|
(href ,(let ((query-params
|
||||||
"/jobs.json"))
|
(query-parameters->string query-parameters)))
|
||||||
|
(string-append
|
||||||
|
"/jobs.json"
|
||||||
|
(if (string-null? query-params)
|
||||||
|
""
|
||||||
|
(string-append "?" query-params)))))
|
||||||
(role "button"))
|
(role "button"))
|
||||||
"View JSON"))
|
"View JSON"))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue