Skip to content
Snippets Groups Projects
Unverified Commit 64151eee authored by Mathieu Othacehe's avatar Mathieu Othacehe
Browse files

Add an evaluation restart button.

* src/cuirass/http.scm (url-handler): New route
"/admin/evaluation/<id>/restart".
* src/cuirass/templates.scm (evaluation-info-table): Add an evaluation restart
button.
parent 4a0cea22
No related branches found
No related tags found
No related merge requests found
......@@ -491,6 +491,19 @@ Hydra format."
#:headers `((location . ,(string->uri-reference
(string-append "/build/" id "/details")))))
#:body ""))
(('GET "admin" "evaluation" id "restart")
(let* ((eval (db-get-evaluation id))
(specification (assq-ref eval #:specification)))
(db-restart-evaluation! (string->number id))
(respond
(build-response
#:code 302
#:headers `((location
. ,(string->uri-reference
(string-append "/jobset/" specification)))))
#:body "")))
(('GET "admin")
(respond-html (html-page
"Cuirass [Admin]"
......
......@@ -495,7 +495,8 @@ system whose names start with " (code "guile-") ":" (br)
(tr
(th (@ (scope "col")) "#")
(th (@ (scope "col")) "Input changes")
(th (@ (scope "col")) Success)))
(th (@ (scope "col")) Success)
(th (@ (scope "col")) Action)))
(tbody
,@(map
(lambda (row)
......@@ -503,7 +504,22 @@ system whose names start with " (code "guile-") ":" (br)
(a (@ (href "/eval/" ,(assq-ref row #:id)))
,(assq-ref row #:id)))
(td ,(input-changes (assq-ref row #:checkouts)))
(td ,@(evaluation-badges row))))
(td ,@(evaluation-badges row))
(td
(div (@ (class "dropdown"))
(a (@ (class "oi oi-menu dropdown-toggle")
(href "#")
(data-toggle "dropdown")
(role "button")
(aria-haspopup "true")
(aria-expanded "false"))
" ")
(div (@ (class "dropdown-menu"))
(a (@ (class "dropdown-item")
(href "/admin/evaluation/"
,(assq-ref row #:id)
"/restart"))
"Restart"))))))
evaluations)))))
,(if (null? evaluations)
(pagination "" "" "" "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment