PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/extra/webapps/mason/report/report.factor

http://github.com/abeaumont/factor
Unknown | 21 lines | 19 code | 2 blank | 0 comment | 0 complexity | 5d436d419331cb076fc22067caebc992 MD5 | raw file
 1! Copyright (C) 2010 Slava Pestov.
 2! See http://factorcode.org/license.txt for BSD license.
 3USING: accessors furnace.actions http.server.responses kernel
 4urls xml.syntax webapps.mason.backend webapps.mason.utils ;
 5IN: webapps.mason.report
 6
 7: <build-report-action> ( -- action )
 8    <action>
 9        [ validate-os/cpu ] >>init
10        [
11            [
12                current-builder last-report>>
13                "text/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] ;