diff options
-rw-r--r-- | guix-data-service/web/revision/controller.scm | 17 | ||||
-rw-r--r-- | guix-data-service/web/revision/html.scm | 10 |
2 files changed, 26 insertions, 1 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm index ec93c04..be6a4d0 100644 --- a/guix-data-service/web/revision/controller.scm +++ b/guix-data-service/web/revision/controller.scm @@ -423,7 +423,22 @@ mime-types) ((application/json) (render-json - '())) ; TODO + `((commit . ,commit-hash) + (system . ,(assq-ref query-parameters 'system)) + (system_tests + . ,(list->vector + (map + (match-lambda + ((name description file line column-number + derivation-file-name builds) + `((name . ,name) + (description . ,description) + (location . ((file . ,file) + (line . ,line) + (column-number . ,column-number))) + (derivation . ,derivation-file-name) + (builds . ,(list->vector builds))))) + system-tests)))))) (else (render-html #:sxml (view-revision-system-tests diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm index 5917d50..32cd3ec 100644 --- a/guix-data-service/web/revision/html.scm +++ b/guix-data-service/web/revision/html.scm @@ -868,6 +868,16 @@ (button (@ (type "submit") (class "btn btn-lg btn-primary")) "Update results"))))) + (a (@ (class "btn btn-lg btn-default pull-right") + (href ,(let ((query-parameter-string + (query-parameters->string query-parameters))) + (string-append + path-base ".json" + (if (string-null? query-parameter-string) + "" + (string-append "?" query-parameter-string))))) + (role "button")) + "View JSON") (table (@ (class "table")) (thead |