guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Add support for query parameters to the View JSON


From: Christopher Baines
Subject: branch master updated: Add support for query parameters to the View JSON button of Jobs
Date: Fri, 24 Apr 2020 15:01:44 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new 0ec2673  Add support for query parameters to the View JSON button of 
Jobs
0ec2673 is described below

commit 0ec26734935afc0dfaf96c26762be0e678c853de
Author: Danjela Lura <address@hidden>
AuthorDate: Fri Apr 24 08:31:24 2020 +0200

    Add support for query parameters to the View JSON button of Jobs
    
    Signed-off-by: Christopher Baines <address@hidden>
---
 guix-data-service/web/jobs/html.scm | 10 ++++++++--
 1 file 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"))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]