guix-commits
[Top][All Lists]
Advanced

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

06/10: Fix some links on the compare page


From: Christopher Baines
Subject: 06/10: Fix some links on the compare page
Date: Sat, 21 Nov 2020 16:11:44 -0500 (EST)

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

commit 814a5d7cba64698b3499b92854e8aa66f627c80a
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sat Nov 21 20:10:46 2020 +0000

    Fix some links on the compare page
---
 guix-data-service/web/compare/html.scm | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/guix-data-service/web/compare/html.scm 
b/guix-data-service/web/compare/html.scm
index e5bbcfc..825d0a7 100644
--- a/guix-data-service/web/compare/html.scm
+++ b/guix-data-service/web/compare/html.scm
@@ -54,9 +54,7 @@
 
   (define query-params
     (unless invalid-query?
-      (string-append "?base_commit=" base-commit
-                     "&target_commit=" target-commit
-                     "&locale=" locale)))
+      (query-parameters->string query-parameters)))
 
   (layout
    #:body
@@ -172,17 +170,28 @@
               (@ (class "btn-group btn-group-lg")
                  (role "group"))
               (a (@ (class "btn btn-default")
-                    (href ,(string-append "/compare/packages" query-params)))
+                    (href ,(string-append
+                            "/"
+                            (cond
+                             ((eq? mode 'revision) "compare")
+                             ((eq? mode 'datetime) "compare-by-datetime"))
+                            "/packages?"
+                            query-params)))
                  "Compare packages")
               (a (@ (class "btn btn-default")
-                    (href ,(string-append "/compare/package-derivations"
-                                          query-params)))
+                    (href ,(string-append
+                            "/"
+                            (cond
+                             ((eq? mode 'revision) "compare")
+                             ((eq? mode 'datetime) "compare-by-datetime"))
+                            "/package-derivations?"
+                            query-params)))
                  "Compare package derivations")))
             (div
              (@ (class "col-sm-6"))
              (a (@ (class "btn btn-default btn-lg pull-right")
                    (href ,(string-append
-                           "/compare.json" query-params)))
+                           "/compare.json?" query-params)))
                 "View JSON")))
            (div
             (@ (class "row"))



reply via email to

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