[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: http: Fix error on /eval/id/dashboard.
From: |
Mathieu Othacehe |
Subject: |
branch master updated: http: Fix error on /eval/id/dashboard. |
Date: |
Mon, 12 Apr 2021 03:45:36 -0400 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository guix-cuirass.
The following commit(s) were added to refs/heads/master by this push:
new 4d6ec11 http: Fix error on /eval/id/dashboard.
4d6ec11 is described below
commit 4d6ec11021fc5026ee86f5ccd2dbfac337bdaa13
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Mon Apr 12 09:44:32 2021 +0200
http: Fix error on /eval/id/dashboard.
* src/cuirass/http.scm (url-handler): Handle unknown evaluation id on
"/eval/id/dashboard" route.
---
src/cuirass/http.scm | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 11876c1..d74ffa5 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -825,20 +825,23 @@ into a specification record and return it."
(let* ((params (request-parameters request))
(system (assq-ref params 'system))
(default-system "x86_64-linux")
- (spec-name (db-get-evaluation-specification id))
- (spec (db-get-specification spec-name))
- (systems (specification-systems spec)))
- (respond-html
- (html-page
- "Dashboard"
- (evaluation-dashboard id systems
- #:current-system
- (or system default-system))
- `(((#:name . ,spec-name)
- (#:link . ,(string-append "/jobset/" spec-name)))
- ((#:name . ,(string-append "Evaluation " (number->string id)))
- (#:link . ,(string-append "/eval/" (number->string id)))))
- #:margin? #f))))
+ (spec-name (db-get-evaluation-specification id)))
+ (if spec-name
+ (let ((spec (db-get-specification spec-name))
+ (systems (specification-systems spec)))
+ (respond-html
+ (html-page
+ "Dashboard"
+ (evaluation-dashboard id systems
+ #:current-system
+ (or system default-system))
+ `(((#:name . ,spec-name)
+ (#:link . ,(string-append "/jobset/" spec-name)))
+ ((#:name . ,(string-append "Evaluation "
+ (number->string id)))
+ (#:link . ,(string-append "/eval/" (number->string id)))))
+ #:margin? #f)))
+ (respond-html-eval-not-found id))))
(('GET "search")
(let* ((params (request-parameters request))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: http: Fix error on /eval/id/dashboard.,
Mathieu Othacehe <=