diff options
-rw-r--r-- | guix-data-service/web/controller.scm | 11 | ||||
-rw-r--r-- | guix-data-service/web/view/html.scm | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm index a1f16ef..81093ef 100644 --- a/guix-data-service/web/controller.scm +++ b/guix-data-service/web/controller.scm @@ -151,7 +151,8 @@ #f)))) (let* ((search-query (assq-ref query-parameters 'search_query)) - (limit-results (assq-ref query-parameters 'limit_results)) + (limit-results (or (assq-ref query-parameters 'limit_results) + 99999)) ; TODO There shouldn't be a limit (fields (assq-ref query-parameters 'field)) (packages (if search-query @@ -563,10 +564,14 @@ (field ,identity #:multi-value #:default ("version" "synopsis")) (search_query ,identity) - (limit_results ,parse-result-limit #:default 100))) + (limit_results ,parse-result-limit + #:no-default-when (all_results) + #:default 100) + (all_results ,parse-checkbox-value))) ;; You can't specify a search query, but then also limit the ;; results by filtering for after a particular package name - '((after_name search_query))))) + '((after_name search_query) + (limit_results all_results))))) (render-revision-packages mime-types conn diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index 2e3991c..9d87548 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -527,6 +527,10 @@ ,(form-horizontal-control "Limit results" query-parameters #:help-text "The maximum number of packages by name to return.") + ,(form-horizontal-control + "All results" query-parameters + #:type "checkbox" + #:help-text "Return all results.") (div (@ (class "form-group form-group-lg")) (div (@ (class "col-sm-offset-2 col-sm-10")) (button (@ (type "submit") |