diff options
author | Christopher Baines <mail@cbaines.net> | 2021-04-23 11:20:36 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-04-23 11:20:36 +0100 |
commit | 6387f1bc67579485aeb11d5dfa8476ad906bef8c (patch) | |
tree | 20d2ae44b6bcc0f7a9788fe524ee37f2cdcb6b67 /guix-data-service/web/revision | |
parent | b430c632b75e5e90e36a855599e3f91302720d54 (diff) | |
download | data-service-6387f1bc67579485aeb11d5dfa8476ad906bef8c.tar data-service-6387f1bc67579485aeb11d5dfa8476ad906bef8c.tar.gz |
Fetch the list of system values from the database
This removes the need to hardcode some values in the code.
Diffstat (limited to 'guix-data-service/web/revision')
-rw-r--r-- | guix-data-service/web/revision/controller.scm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm index 9ab702d..8f767f8 100644 --- a/guix-data-service/web/revision/controller.scm +++ b/guix-data-service/web/revision/controller.scm @@ -35,6 +35,7 @@ #:use-module (guix-data-service model build) #:use-module (guix-data-service model build-server) #:use-module (guix-data-service model build-status) + #:use-module (guix-data-service model system) #:use-module (guix-data-service model channel-news) #:use-module (guix-data-service model channel-instance) #:use-module (guix-data-service model package) @@ -548,7 +549,7 @@ (git-repositories-containing-commit conn commit-hash)))) (systems - (with-thread-postgresql-connection valid-systems))) + (with-thread-postgresql-connection list-systems))) (render-html #:sxml (view-revision-system-tests commit-hash @@ -1013,7 +1014,7 @@ `((error . "invalid query")))) (else (letpar& ((systems - (with-thread-postgresql-connection valid-systems)) + (with-thread-postgresql-connection list-systems)) (targets (with-thread-postgresql-connection valid-targets))) (render-html @@ -1104,7 +1105,7 @@ derivations)))))) (else (letpar& ((systems - (with-thread-postgresql-connection valid-systems)) + (with-thread-postgresql-connection list-systems)) (targets (with-thread-postgresql-connection valid-targets))) (render-html @@ -1140,7 +1141,7 @@ `((error . "invalid query")))) (else (letpar& ((systems - (with-thread-postgresql-connection valid-systems)) + (with-thread-postgresql-connection list-systems)) (targets (with-thread-postgresql-connection valid-targets))) (render-html @@ -1194,7 +1195,7 @@ `((derivations . ,(list->vector derivations))))) (else (letpar& ((systems - (with-thread-postgresql-connection valid-systems)) + (with-thread-postgresql-connection list-systems)) (targets (with-thread-postgresql-connection valid-targets))) (render-html @@ -1233,7 +1234,7 @@ `((error . "invalid query")))) (else (letpar& ((systems - (with-thread-postgresql-connection valid-systems)) + (with-thread-postgresql-connection list-systems)) (targets (with-thread-postgresql-connection valid-targets))) (render-html @@ -1330,7 +1331,7 @@ derivation-outputs)))))) (else (letpar& ((systems - (with-thread-postgresql-connection valid-systems)) + (with-thread-postgresql-connection list-systems)) (targets (with-thread-postgresql-connection valid-targets))) (render-html @@ -1357,7 +1358,7 @@ (string-append "/revision/" commit-hash))) (if (any-invalid-query-parameters? query-parameters) (letpar& ((systems - (with-thread-postgresql-connection valid-systems)) + (with-thread-postgresql-connection list-systems)) (targets (with-thread-postgresql-connection valid-targets))) (render-html @@ -1373,7 +1374,7 @@ (let ((system (assq-ref query-parameters 'system)) (target (assq-ref query-parameters 'target))) (letpar& ((systems - (with-thread-postgresql-connection valid-systems)) + (with-thread-postgresql-connection list-systems)) (targets (with-thread-postgresql-connection valid-targets)) (build-server-options |