diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm index afd5410f842d924fc9c299c53e302dec109d8eae..73f715112e077f4b013ecbcfc610dbdaafa94045 100644 --- a/src/cuirass/http.scm +++ b/src/cuirass/http.scm @@ -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]" diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm index c9294e3fe3a9521222dc30c305fae2bed03ebf9c..a57653b28fe0d53bf7513905ddb2ebcb5e140afe 100644 --- a/src/cuirass/templates.scm +++ b/src/cuirass/templates.scm @@ -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 "" "" "" "")