aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/view
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-12-30 12:32:20 +0000
committerChristopher Baines <mail@cbaines.net>2019-12-30 12:32:20 +0000
commit2cb5309851b3868dcdb0e88145d676b474c575aa (patch)
tree274c9ac598f8a561d630ee4ebc1b5d05fa4ecb8b /guix-data-service/web/view
parent7881eec3152b19de1850c3ef54236f75ae5ed015 (diff)
downloaddata-service-2cb5309851b3868dcdb0e88145d676b474c575aa.tar
data-service-2cb5309851b3868dcdb0e88145d676b474c575aa.tar.gz
Display details for the derivation source files
If the nar file is available.
Diffstat (limited to 'guix-data-service/web/view')
-rw-r--r--guix-data-service/web/view/html.scm24
1 files changed, 22 insertions, 2 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm
index c0df5cb..cf718a8 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -499,7 +499,14 @@
derivations
derivations-using-store-item-list)))))
-(define (view-derivation-source-file filename)
+(define (view-derivation-source-file filename details)
+ (define labels
+ '((compression . "Compression")
+ (hash_algorithm . "Hash algorithm")
+ (hash . "Hash")
+ (uncompressed_size . "Uncompressed size")
+ (compressed_size . "Compressed size")))
+
(layout
#:body
`(,(header)
@@ -510,7 +517,20 @@
(div
(@ (class "col-sm-12"))
,(display-store-item-title filename)
- "Derivation source file."))))))
+ (h4 "Derivation source file")
+ ,@(if details
+ `((dl
+ (@ (class "dl-horizontal"))
+ ,@(append-map
+ (match-lambda
+ ((key . value)
+ `((dt ,(assq-ref labels key))
+ (dd ,(if (eq? key 'hash)
+ `(span (@ (style "font-family: monospace"))
+ ,value)
+ value)))))
+ details)))
+ '())))))))
(define (view-derivation derivation derivation-inputs derivation-outputs
builds)