Include nars on the output page
This commit is contained in:
parent
8e5f8e4170
commit
e078b9611d
2 changed files with 52 additions and 2 deletions
|
|
@ -187,7 +187,9 @@
|
||||||
((file-name output-id rest ...)
|
((file-name output-id rest ...)
|
||||||
(select-derivations-using-output
|
(select-derivations-using-output
|
||||||
conn output-id))))
|
conn output-id))))
|
||||||
derivations)))))))
|
derivations)
|
||||||
|
(select-nars-for-output conn
|
||||||
|
filename)))))))
|
||||||
|
|
||||||
(define handle-static-assets
|
(define handle-static-assets
|
||||||
(if assets-dir-in-store?
|
(if assets-dir-in-store?
|
||||||
|
|
|
||||||
|
|
@ -435,7 +435,10 @@
|
||||||
,(string-append
|
,(string-append
|
||||||
"/" (string-join fileparts "/"))))))
|
"/" (string-join fileparts "/"))))))
|
||||||
|
|
||||||
(define (view-store-item filename derivations derivations-using-store-item-list)
|
(define (view-store-item filename
|
||||||
|
derivations
|
||||||
|
derivations-using-store-item-list
|
||||||
|
nars)
|
||||||
(layout
|
(layout
|
||||||
#:body
|
#:body
|
||||||
`(,(header)
|
`(,(header)
|
||||||
|
|
@ -446,6 +449,51 @@
|
||||||
(div
|
(div
|
||||||
(@ (class "col-sm-12"))
|
(@ (class "col-sm-12"))
|
||||||
,(display-store-item-title filename)))
|
,(display-store-item-title filename)))
|
||||||
|
(div
|
||||||
|
(@ (class "row"))
|
||||||
|
(div
|
||||||
|
(@ (class "col-sm-12"))
|
||||||
|
(h2 "Nars")
|
||||||
|
(a (@ (class "btn btn-default btn-lg pull-right")
|
||||||
|
(href ,(string-append filename "/narinfos")))
|
||||||
|
"View narinfo details")
|
||||||
|
,@(map
|
||||||
|
(match-lambda
|
||||||
|
((hash-algorithm hash size urls signatures)
|
||||||
|
`(div
|
||||||
|
(h4 (@ (style "font-family: monospace;"))
|
||||||
|
,hash)
|
||||||
|
(table
|
||||||
|
(@ (class "table")
|
||||||
|
(style "table-layout: fixed;"))
|
||||||
|
(thead
|
||||||
|
(tr
|
||||||
|
(th (@ (class "col-sm-1")) "Size")
|
||||||
|
(th (@ (class "col-sm-4")) "Urls")))
|
||||||
|
(tbody
|
||||||
|
(td ,size)
|
||||||
|
(td
|
||||||
|
(ul
|
||||||
|
,@(map
|
||||||
|
(lambda (url-details)
|
||||||
|
`(li
|
||||||
|
"Size: " ,(assoc-ref url-details "size")
|
||||||
|
" Compression: " ,(assoc-ref url-details "compression")
|
||||||
|
" "
|
||||||
|
(a (@ (href ,(assoc-ref url-details "url")))
|
||||||
|
,(assoc-ref url-details "url"))))
|
||||||
|
urls)))
|
||||||
|
(td
|
||||||
|
,@(map
|
||||||
|
(lambda (signature)
|
||||||
|
`(dl
|
||||||
|
(@ (class "dl-horizontal"))
|
||||||
|
(dt "Version")
|
||||||
|
(dd ,(assoc-ref signature "version"))
|
||||||
|
(dt "Host name")
|
||||||
|
(dd ,(assoc-ref signature "host_name"))))
|
||||||
|
signatures)))))))
|
||||||
|
nars)))
|
||||||
,@(map (lambda (derivation derivations-using-store-item)
|
,@(map (lambda (derivation derivations-using-store-item)
|
||||||
`((div
|
`((div
|
||||||
(@ (class "row"))
|
(@ (class "row"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue