diff options
author | Christopher Baines <mail@cbaines.net> | 2019-03-24 17:36:10 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-03-24 17:36:10 +0000 |
commit | 0c6c413804eb0b7da5548b44e20f3b4ab6197132 (patch) | |
tree | b69c3caa811f6a558a78659d9f4c5a443f3c55eb | |
parent | 5dbdfe1133ecaf0fef1613d927eb9a586440a416 (diff) | |
download | data-service-0c6c413804eb0b7da5548b44e20f3b4ab6197132.tar data-service-0c6c413804eb0b7da5548b44e20f3b4ab6197132.tar.gz |
Handle missing derivations when rendering the comparison
-rw-r--r-- | guix-data-service/web/view/html.scm | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index 4afd193..6d91a92 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -756,16 +756,20 @@ ,system)) (td (samp (@ (style "white-space: nowrap;")) ,target)) - (td (a (@ (style "display: block;") - (href ,base-derivation-file-name)) - (span (@ (class "text-danger glyphicon glyphicon-minus pull-left") - (style "font-size: 1.5em; padding-right: 0.4em;"))) - ,(display-store-item-short base-derivation-file-name)) - (a (@ (style "display: block;") - (href ,target-derivation-file-name)) - (span (@ (class "text-success glyphicon glyphicon-plus pull-left") - (style "font-size: 1.5em; padding-right: 0.4em;"))) - ,(display-store-item-short target-derivation-file-name))))))) + (td ,@(if base-derivation-file-name + `((a (@ (style "display: block;") + (href ,base-derivation-file-name)) + (span (@ (class "text-danger glyphicon glyphicon-minus pull-left") + (style "font-size: 1.5em; padding-right: 0.4em;"))) + ,(display-store-item-short base-derivation-file-name))) + '()) + ,@(if target-derivation-file-name + `((a (@ (style "display: block; clear: left;") + (href ,target-derivation-file-name)) + (span (@ (class "text-success glyphicon glyphicon-plus pull-left") + (style "font-size: 1.5em; padding-right: 0.4em;"))) + ,(and=> target-derivation-file-name display-store-item-short))) + '())))))) system-and-versions))) `((tr (td (@ (rowspan , (length system-and-versions))) |