aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-24 09:12:39 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-24 09:12:39 +0100
commit6fb38927120ae2637d590cf60b5769446c340a94 (patch)
tree2a48ad95f1cecf6a44bed50a933f2300f2dd3f66 /guix-data-service
parenta0263a0eae3940eb83aea78845d4714d84db7426 (diff)
downloaddata-service-6fb38927120ae2637d590cf60b5769446c340a94.tar
data-service-6fb38927120ae2637d590cf60b5769446c340a94.tar.gz
Make it clearer that some things relate to package derivations
Rather than derivations in general.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/model/derivation.scm42
-rw-r--r--guix-data-service/web/revision/controller.scm130
-rw-r--r--guix-data-service/web/revision/html.scm52
3 files changed, 114 insertions, 110 deletions
diff --git a/guix-data-service/model/derivation.scm b/guix-data-service/model/derivation.scm
index c18e9a1..e2bd3e6 100644
--- a/guix-data-service/model/derivation.scm
+++ b/guix-data-service/model/derivation.scm
@@ -47,8 +47,8 @@
select-derivation-source-file-data-by-file-name-hash
select-derivation-by-output-filename
select-derivations-using-output
- select-derivations-in-revision
- search-derivations-in-revision
+ select-package-derivations-in-revision
+ search-package-derivations-in-revision
select-derivation-outputs-in-revision
fix-derivation-output-details-hash-encoding
select-derivations-by-revision-name-and-version
@@ -186,15 +186,15 @@ ORDER BY derivations.system DESC,
query
(list revision-commit-hash name version))))
-(define* (select-derivations-in-revision conn
- commit-hash
- #:key
- systems
- targets
- minimum-builds
- maximum-builds
- limit-results
- after-name)
+(define* (select-package-derivations-in-revision conn
+ commit-hash
+ #:key
+ systems
+ targets
+ minimum-builds
+ maximum-builds
+ limit-results
+ after-name)
(define criteria
(string-join
`(,@(filter-map
@@ -307,16 +307,16 @@ ORDER BY derivations.file_name
(list after-name)
'())))))
-(define* (search-derivations-in-revision conn
- commit-hash
- search-query
- #:key
- systems
- targets
- minimum-builds
- maximum-builds
- limit-results
- after-name)
+(define* (search-package-derivations-in-revision conn
+ commit-hash
+ search-query
+ #:key
+ systems
+ targets
+ minimum-builds
+ maximum-builds
+ limit-results
+ after-name)
(define criteria
(string-join
`(,@(filter-map
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm
index d925f14..ddaf70a 100644
--- a/guix-data-service/web/revision/controller.scm
+++ b/guix-data-service/web/revision/controller.scm
@@ -53,7 +53,7 @@
render-revision-lint-warnings
render-revision-package-version
render-revision-packages
- render-revision-derivations
+ render-revision-package-derivations
render-unknown-revision
render-view-revision))
@@ -163,7 +163,7 @@
(render-unknown-revision mime-types
conn
commit-hash)))
- (('GET "revision" commit-hash "derivations")
+ (('GET "revision" commit-hash "package-derivations")
(if (guix-commit-exists? conn commit-hash)
(let ((parsed-query-parameters
(guard-against-mutually-exclusive-query-parameters
@@ -181,15 +181,15 @@
(all_results ,parse-checkbox-value)))
'((limit_results all_results)))))
- (render-revision-derivations mime-types
- conn
- commit-hash
- parsed-query-parameters
- #:path-base path))
+ (render-revision-package-derivations mime-types
+ conn
+ commit-hash
+ parsed-query-parameters
+ #:path-base path))
(render-unknown-revision mime-types
conn
commit-hash)))
- (('GET "revision" commit-hash "derivation-outputs")
+ (('GET "revision" commit-hash "package-derivation-outputs")
(if (guix-commit-exists? conn commit-hash)
(let ((parsed-query-parameters
(guard-against-mutually-exclusive-query-parameters
@@ -686,16 +686,17 @@
version-history-link)
#:extra-headers http-headers-for-unchanging-content)))))
-(define* (render-revision-derivations mime-types
- conn
- commit-hash
- query-parameters
- #:key
- (path-base "/revision/")
- (header-text
- `("Revision " (samp ,commit-hash)))
- (header-link
- (string-append "/revision/" commit-hash)))
+(define* (render-revision-package-derivations mime-types
+ conn
+ commit-hash
+ query-parameters
+ #:key
+ (path-base "/revision/")
+ (header-text
+ `("Revision " (samp ,commit-hash)))
+ (header-link
+ (string-append "/revision/"
+ commit-hash)))
(if (any-invalid-query-parameters? query-parameters)
(case (most-appropriate-mime-type
'(application/json text/html)
@@ -705,17 +706,17 @@
`((error . "invalid query"))))
(else
(render-html
- #:sxml (view-revision-derivations commit-hash
- query-parameters
- (valid-systems conn)
- (valid-targets->options
- (valid-targets conn))
- '()
- '()
- #f
- #:path-base path-base
- #:header-text header-text
- #:header-link header-link))))
+ #:sxml (view-revision-package-derivations commit-hash
+ query-parameters
+ (valid-systems conn)
+ (valid-targets->options
+ (valid-targets conn))
+ '()
+ '()
+ #f
+ #:path-base path-base
+ #:header-text header-text
+ #:header-link header-link))))
(let* ((limit-results
(assq-ref query-parameters 'limit_results))
(all-results
@@ -724,7 +725,7 @@
(assq-ref query-parameters 'search_query))
(derivations
(if search-query
- (search-derivations-in-revision
+ (search-package-derivations-in-revision
conn
commit-hash
search-query
@@ -734,7 +735,7 @@
#:minimum-builds (assq-ref query-parameters 'minimum_builds)
#:limit-results limit-results
#:after-name (assq-ref query-parameters 'after_name))
- (select-derivations-in-revision
+ (select-package-derivations-in-revision
conn
commit-hash
#:systems (assq-ref query-parameters 'system)
@@ -763,17 +764,18 @@
`()))
(else
(render-html
- #:sxml (view-revision-derivations commit-hash
- query-parameters
- (valid-systems conn)
- (valid-targets->options
- (valid-targets conn))
- derivations
- build-server-urls
- show-next-page?
- #:path-base path-base
- #:header-text header-text
- #:header-link header-link)))))))
+ #:sxml (view-revision-package-derivations
+ commit-hash
+ query-parameters
+ (valid-systems conn)
+ (valid-targets->options
+ (valid-targets conn))
+ derivations
+ build-server-urls
+ show-next-page?
+ #:path-base path-base
+ #:header-text header-text
+ #:header-link header-link)))))))
(define* (render-revision-derivation-outputs mime-types
conn
@@ -794,16 +796,17 @@
`((error . "invalid query"))))
(else
(render-html
- #:sxml (view-revision-derivation-outputs commit-hash
- query-parameters
- '()
- '()
- '()
- '()
- #f
- #:path-base path-base
- #:header-text header-text
- #:header-link header-link))))
+ #:sxml (view-revision-package-derivation-outputs
+ commit-hash
+ query-parameters
+ '()
+ '()
+ '()
+ '()
+ #f
+ #:path-base path-base
+ #:header-text header-text
+ #:header-link header-link))))
(let* ((limit-results
(assq-ref query-parameters 'limit_results))
(all-results
@@ -838,17 +841,18 @@
`()))
(else
(render-html
- #:sxml (view-revision-derivation-outputs commit-hash
- query-parameters
- derivation-outputs
- build-server-urls
- (valid-systems conn)
- (valid-targets->options
- (valid-targets conn))
- show-next-page?
- #:path-base path-base
- #:header-text header-text
- #:header-link header-link)))))))
+ #:sxml (view-revision-package-derivation-outputs
+ commit-hash
+ query-parameters
+ derivation-outputs
+ build-server-urls
+ (valid-systems conn)
+ (valid-targets->options
+ (valid-targets conn))
+ show-next-page?
+ #:path-base path-base
+ #:header-text header-text
+ #:header-link header-link)))))))
(define* (render-revision-builds mime-types
conn
diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm
index 9cc8d30..71a99d5 100644
--- a/guix-data-service/web/revision/html.scm
+++ b/guix-data-service/web/revision/html.scm
@@ -33,8 +33,8 @@
view-revision-package-and-version
view-revision
view-revision-packages
- view-revision-derivations
- view-revision-derivation-outputs
+ view-revision-package-derivations
+ view-revision-package-derivation-outputs
view-revision-system-tests
view-revision-channel-instances
view-revision-builds
@@ -462,10 +462,10 @@
lint-warning-counts))
(div
(@ (class "col-md-6"))
- (h3 "Derivations")
+ (h3 "Package derivations")
(a (@ (class "pull-right")
- (href ,(string-append path-base "/derivations")))
- "View derivations")
+ (href ,(string-append path-base "/package-derivations")))
+ "View package derivations")
(table
(@ (class "table")
(style "white-space: nowrap;"))
@@ -473,7 +473,7 @@
(tr
(th "System")
(th "Target")
- (th "Derivations")))
+ (th "Count")))
(tbody
,@(map (match-lambda
((system target count)
@@ -1042,16 +1042,16 @@ figure {
'("green" "red" "#d2d3d4"))))))))
output-consistency))))))
-(define* (view-revision-derivations commit-hash
- query-parameters
- valid-systems
- valid-targets
- derivations
- build-server-urls
- show-next-page?
- #:key (path-base "/revision/")
- header-text
- header-link)
+(define* (view-revision-package-derivations commit-hash
+ query-parameters
+ valid-systems
+ valid-targets
+ derivations
+ build-server-urls
+ show-next-page?
+ #:key (path-base "/revision/")
+ header-text
+ header-link)
(layout
#:body
`(,(header)
@@ -1170,16 +1170,16 @@ figure {
"Next page")))
'())))))))
-(define* (view-revision-derivation-outputs commit-hash
- query-parameters
- derivation-outputs
- build-server-urls
- valid-systems
- valid-targets
- show-next-page?
- #:key (path-base "/revision/")
- header-text
- header-link)
+(define* (view-revision-package-derivation-outputs commit-hash
+ query-parameters
+ derivation-outputs
+ build-server-urls
+ valid-systems
+ valid-targets
+ show-next-page?
+ #:key (path-base "/revision/")
+ header-text
+ header-link)
(layout
#:body
`(,(header)