]> gitweb.factorcode.org Git - factor.git/blob - extra/webapps/mason/report/report.factor
http.server.responses: adding <html-content>, use it.
[factor.git] / extra / webapps / mason / report / report.factor
1 ! Copyright (C) 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors furnace.actions http.server.responses kernel
4 urls xml.syntax webapps.mason.backend webapps.mason.utils ;
5 IN: webapps.mason.report
6
7 : <build-report-action> ( -- action )
8     <action>
9         [ validate-os/cpu ] >>init
10         [
11             [
12                 current-builder last-report>>
13                 <html-content>
14             ] with-mason-db
15         ] >>display ;
16
17 : report-link ( builder -- xml )
18     [ URL" report" ] dip
19     [ os>> "os" set-query-param ]
20     [ cpu>> "cpu" set-query-param ] bi
21     [XML <a href=<->>Latest build report</a> XML] ;