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

http://github.com/abeaumont/factor · Factor · 21 lines · 17 code · 2 blank · 2 comment · 0 complexity · 5d436d419331cb076fc22067caebc992 MD5 · raw file

  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. : <build-report-action> ( -- action )
  7. <action>
  8. [ validate-os/cpu ] >>init
  9. [
  10. [
  11. current-builder last-report>>
  12. "text/html" <content>
  13. ] with-mason-db
  14. ] >>display ;
  15. : report-link ( builder -- xml )
  16. [ URL" report" ] dip
  17. [ os>> "os" set-query-param ]
  18. [ cpu>> "cpu" set-query-param ] bi
  19. [XML <a href=<->>Latest build report</a> XML] ;