mirror of
git://git.savannah.gnu.org/guix/data-service.git
synced 2023-12-14 03:23:03 +01:00
Add a page to show the public key used to sign substitutes
This commit is contained in:
parent
6f8ac2eccc
commit
485b79a6de
3 changed files with 44 additions and 0 deletions
|
@ -105,6 +105,7 @@ SOURCES = \
|
|||
guix-data-service/web/jobs/controller.scm \
|
||||
guix-data-service/web/jobs/html.scm \
|
||||
guix-data-service/web/nar/controller.scm \
|
||||
guix-data-service/web/nar/html.scm \
|
||||
guix-data-service/web/query-parameters.scm \
|
||||
guix-data-service/web/render.scm \
|
||||
guix-data-service/web/repository/controller.scm \
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#:use-module (guix base64)
|
||||
#:use-module (guix serialization)
|
||||
#:use-module (guix-data-service web render)
|
||||
#:use-module (guix-data-service web nar html)
|
||||
#:use-module (guix-data-service model derivation)
|
||||
#:export (nar-controller
|
||||
|
||||
|
@ -66,6 +67,9 @@
|
|||
((key . value)
|
||||
(format #f "~a: ~a~%" key value)))
|
||||
%nix-cache-info))))
|
||||
(('GET "substitutes")
|
||||
(render-html
|
||||
#:sxml (view-substitutes (%narinfo-signing-public-key))))
|
||||
(('GET "nar" derivation)
|
||||
(render-nar request
|
||||
mime-types
|
||||
|
|
39
guix-data-service/web/nar/html.scm
Normal file
39
guix-data-service/web/nar/html.scm
Normal file
|
@ -0,0 +1,39 @@
|
|||
;;; Guix Data Service -- Information about Guix over time
|
||||
;;; Copyright © 2019 Christopher Baines <mail@cbaines.net>
|
||||
;;;
|
||||
;;; This program is free software: you can redistribute it and/or
|
||||
;;; modify it under the terms of the GNU Affero General Public License
|
||||
;;; as published by the Free Software Foundation, either version 3 of
|
||||
;;; the License, or (at your option) any later version.
|
||||
;;;
|
||||
;;; This program is distributed in the hope that it will be useful,
|
||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;;; Affero General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU Affero General Public
|
||||
;;; License along with this program. If not, see
|
||||
;;; <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (guix-data-service web nar html)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (gcrypt pk-crypto)
|
||||
#:use-module (guix-data-service web view html)
|
||||
#:export (view-substitutes))
|
||||
|
||||
(define (view-substitutes narinfo-signing-public-key)
|
||||
(layout
|
||||
#:body
|
||||
`(,(header)
|
||||
(div
|
||||
(@ (class "container"))
|
||||
(div
|
||||
(@ (class "row"))
|
||||
(div
|
||||
(@ (class "col-sm-12"))
|
||||
(h1 "Substitutes")
|
||||
,@(if (canonical-sexp? narinfo-signing-public-key)
|
||||
`((h3 "Public key")
|
||||
(pre
|
||||
,(canonical-sexp->string narinfo-signing-public-key)))
|
||||
`((p "No signing key available.")))))))))
|
Loading…
Reference in a new issue