<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -64,7 +64,10 @@ IN: mason.child
 
 MACRO: recover-cond ( alist -- )
     dup { [ length 1 = ] [ first callable? ] } 1&amp;&amp;
-    [ first ] [ [ first first2 ] [ rest ] bi '[ _ _ [ _ recover-cond ] recover-else ] ] if ;
+    [ first ] [
+        [ first first2 ] [ rest ] bi
+        '[ _ _ [ _ recover-cond ] recover-else ]
+    ] if ;
 
 : build-child ( -- status )
     copy-image</diff>
      <filename>extra/mason/child/child.factor</filename>
    </modified>
    <modified>
      <diff>@@ -5,9 +5,12 @@ math.functions make io io.files io.pathnames io.directories
 io.directories.hierarchy io.launcher io.encodings.utf8 prettyprint
 combinators.short-circuit parser combinators calendar
 calendar.format arrays mason.config locals debugger fry
-continuations strings ;
+continuations strings io.sockets ;
 IN: mason.common
 
+: short-host-name ( -- string )
+    host-name &quot;.&quot; split1 drop ;
+
 SYMBOL: current-git-id
 
 : short-running-process ( command -- )</diff>
      <filename>extra/mason/common/common.factor</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ IN: mason.notify
         [
             &quot;ssh&quot; , status-host get , &quot;-l&quot; , status-username get ,
             &quot;./mason-notify&quot; ,
-            host-name ,
+            short-host-name ,
             target-cpu get ,
             target-os get ,
         ] { } make prepend</diff>
      <filename>extra/mason/notify/notify.factor</filename>
    </modified>
    <modified>
      <diff>@@ -4,13 +4,13 @@ USING: benchmark combinators.smart debugger fry io assocs
 io.encodings.utf8 io.files io.sockets io.streams.string kernel
 locals mason.common mason.config mason.platform math namespaces
 prettyprint sequences xml.syntax xml.writer combinators.short-circuit
-literals ;
+literals splitting ;
 IN: mason.report
 
 : common-report ( -- xml )
     target-os get
     target-cpu get
-    host-name
+    short-host-name
     build-dir
     current-git-id get
     [XML</diff>
      <filename>extra/mason/report/report.factor</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,19 @@
     &lt;p&gt;This package was built from GIT ID &lt;t:xml t:name=&quot;git-id&quot; /&gt;.&lt;/p&gt;
 
     &lt;p&gt;Once you download Factor, you can &lt;a href=&quot;http://concatenative.org/wiki/view/Factor/Getting started&quot;&gt;get started&lt;/a&gt; with the language.&lt;/p&gt;
+
+    &lt;h1&gt;Build machine information&lt;/h1&gt;
+
+    &lt;table border=&quot;1&quot;&gt;
+      &lt;tr&gt;&lt;td&gt;Host name:&lt;/td&gt;&lt;td&gt;&lt;t:xml t:name=&quot;host-name&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
+      &lt;tr&gt;&lt;td&gt;Current status:&lt;/td&gt;&lt;td&gt;&lt;t:xml t:name=&quot;status&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
+      &lt;tr&gt;&lt;td&gt;Last build:&lt;/td&gt;&lt;td&gt;&lt;t:xml t:name=&quot;last-build&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
+      &lt;tr&gt;&lt;td&gt;Last clean build:&lt;/td&gt;&lt;td&gt;&lt;t:xml t:name=&quot;last-clean-build&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
+      &lt;tr&gt;&lt;td&gt;Binaries:&lt;/td&gt;&lt;td&gt;&lt;t:xml t:name=&quot;binaries&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
+      &lt;tr&gt;&lt;td&gt;Clean images:&lt;/td&gt;&lt;td&gt;&lt;t:xml t:name=&quot;clean-images&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
+    &lt;/table&gt;
+
+    &lt;p&gt;&lt;t:xml t:name=&quot;last-report&quot; /&gt;&lt;/p&gt;
   &lt;/body&gt;
 &lt;/html&gt;
 </diff>
      <filename>extra/webapps/mason/download.xml</filename>
    </modified>
    <modified>
      <diff>@@ -4,11 +4,66 @@ USING: accessors arrays combinators db db.tuples furnace.actions
 http.server.responses http.server.dispatchers kernel mason.platform
 mason.notify.server mason.report math.order sequences sorting
 splitting xml.syntax xml.writer io.pathnames io.encodings.utf8
-io.files present validators html.forms furnace.db assocs urls ;
+io.files present validators html.forms furnace.db urls ;
+FROM: assocs =&gt; at keys values ;
 IN: webapps.mason
 
 TUPLE: mason-app &lt; dispatcher ;
 
+: link ( url label -- xml )
+    [XML &lt;a href=&lt;-&gt;&gt;&lt;-&gt;&lt;/a&gt; XML] ;
+
+: download-link ( builder label -- xml )
+    [
+        [ URL&quot; download&quot; ] dip
+        [ os&gt;&gt; &quot;os&quot; set-query-param ]
+        [ cpu&gt;&gt; &quot;cpu&quot; set-query-param ] bi
+    ] dip link ;
+
+: download-grid-cell ( cpu os -- xml )
+    builder new swap &gt;&gt;os swap &gt;&gt;cpu select-tuple dup
+    [
+        dup last-release&gt;&gt; dup
+        [ &quot;.&quot; split1 drop 16 tail* 6 head* download-link ] [ 2drop f ] if
+    ] when
+    [XML &lt;td&gt;&lt;-&gt;&lt;/td&gt; XML] ;
+
+CONSTANT: oses
+{
+    { &quot;winnt&quot; &quot;Windows&quot; }
+    { &quot;macosx&quot; &quot;Mac OS X&quot; }
+    { &quot;linux&quot; &quot;Linux&quot; }
+    { &quot;freebsd&quot; &quot;FreeBSD&quot; }
+    { &quot;netbsd&quot; &quot;NetBSD&quot; }
+    { &quot;openbsd&quot; &quot;OpenBSD&quot; }
+}
+
+CONSTANT: cpus
+{
+    { &quot;x86.32&quot; &quot;x86&quot; }
+    { &quot;x86.64&quot; &quot;x86-64&quot; }
+    { &quot;ppc&quot; &quot;PowerPC&quot; }
+}
+
+: download-grid ( -- xml )
+    oses
+    [ values [ [XML &lt;th&gt;&lt;-&gt;&lt;/th&gt; XML] ] map ]
+    [
+        keys
+        cpus [
+            [ nip second ] [ first ] 2bi [
+                swap download-grid-cell
+            ] curry map [XML &lt;tr&gt;&lt;th&gt;&lt;-&gt;&lt;/th&gt;&lt;-&gt;&lt;/tr&gt; XML]
+        ] with map
+    ] bi [XML &lt;table&gt;&lt;tr&gt;&lt;th/&gt;&lt;-&gt;&lt;/tr&gt;&lt;-&gt;&lt;/table&gt; XML]  ;
+
+: &lt;download-grid-action&gt; ( -- action )
+    &lt;action&gt;
+    [
+        download-grid
+        xml&gt;string &quot;text/html&quot; &lt;content&gt;
+    ] &gt;&gt;display ;
+
 : validate-os/cpu ( -- )
     {
         { &quot;os&quot; [ v-one-line ] }
@@ -23,11 +78,6 @@ TUPLE: mason-app &lt; dispatcher ;
     [ validate-os/cpu ] &gt;&gt;init
     [ current-builder last-report&gt;&gt; &quot;text/html&quot; &lt;content&gt; ] &gt;&gt;display ;
 
-: log-file ( -- path ) home &quot;mason.log&quot; append-path ;
-
-: recent-events ( -- xml )
-    log-file utf8 10 file-tail [XML &lt;pre&gt;&lt;-&gt;&lt;/pre&gt; XML] ;
-
 : git-link ( id -- link )
     [ &quot;http://github.com/slavapestov/factor/commit/&quot; prepend ] keep
     [XML &lt;a href=&lt;-&gt;&gt;&lt;-&gt;&lt;/a&gt; XML] ;
@@ -36,19 +86,22 @@ TUPLE: mason-app &lt; dispatcher ;
     swap current-git-id&gt;&gt; git-link
     [XML &lt;-&gt; for &lt;-&gt; XML] ;
 
+: status-string ( builder -- string )
+    dup status&gt;&gt; {
+        { +dirty+ [ drop &quot;Dirty&quot; ] }
+        { +clean+ [ drop &quot;Clean&quot; ] }
+        { +error+ [ drop &quot;Error&quot; ] }
+        { +starting+ [ &quot;Starting build&quot; building ] }
+        { +make-vm+ [ &quot;Compiling VM&quot; building ] }
+        { +boot+ [ &quot;Bootstrapping&quot; building ] }
+        { +test+ [ &quot;Testing&quot; building ] }
+        [ 2drop &quot;Unknown&quot; ]
+    } case ;
+
 : current-status ( builder -- xml )
-    [
-        dup status&gt;&gt; {
-            { +dirty+ [ drop &quot;Dirty&quot; ] }
-            { +clean+ [ drop &quot;Clean&quot; ] }
-            { +error+ [ drop &quot;Error&quot; ] }
-            { +starting+ [ &quot;Starting build&quot; building ] }
-            { +make-vm+ [ &quot;Compiling VM&quot; building ] }
-            { +boot+ [ &quot;Bootstrapping&quot; building ] }
-            { +test+ [ &quot;Testing&quot; building ] }
-            [ 2drop &quot;Unknown&quot; ]
-        } case
-    ] [ current-timestamp&gt;&gt; present &quot; (as of &quot; &quot;)&quot; surround ] bi 2array ;
+    [ status-string ]
+    [ current-timestamp&gt;&gt; present &quot; (as of &quot; &quot;)&quot; surround ] bi
+    2array ;
 
 : build-status ( git-id timestamp -- xml )
     over [ [ git-link ] [ present ] bi* &quot; (built on &quot; &quot;)&quot; surround 2array ] [ 2drop f ] if ;
@@ -56,23 +109,17 @@ TUPLE: mason-app &lt; dispatcher ;
 : binaries-url ( builder -- url )
     [ os&gt;&gt; ] [ cpu&gt;&gt; ] bi (platform) &quot;http://downloads.factorcode.org/&quot; prepend ;
 
-: url-link ( url -- xml )
-    dup [XML &lt;a href=&lt;-&gt;&gt;&lt;-&gt;&lt;/a&gt; XML] ;
-
 : latest-binary-link ( builder -- xml )
-    [ URL&quot; download&quot; ] dip
-    [ os&gt;&gt; &quot;os&quot; set-query-param ]
-    [ cpu&gt;&gt; &quot;cpu&quot; set-query-param ] bi
-    [XML &lt;a href=&lt;-&gt;&gt;Latest download&lt;/a&gt; XML] ;
+    [ binaries-url ] [ last-release&gt;&gt; ] bi [ &quot;/&quot; glue ] keep link ;
 
 : binaries-link ( builder -- link )
-    binaries-url url-link ;
+    binaries-url dup link ;
 
 : clean-image-url ( builder -- url )
     [ os&gt;&gt; ] [ cpu&gt;&gt; ] bi (platform) &quot;http://factorcode.org/images/clean/&quot; prepend ;
 
 : clean-image-link ( builder -- link )
-    clean-image-url url-link ;
+    clean-image-url dup link ;
 
 : report-link ( builder -- xml )
     [ URL&quot; report&quot; ] dip
@@ -80,56 +127,6 @@ TUPLE: mason-app &lt; dispatcher ;
     [ cpu&gt;&gt; &quot;cpu&quot; set-query-param ] bi
     [XML &lt;a href=&lt;-&gt;&gt;Latest build report&lt;/a&gt; XML] ;
 
-: machine-table ( builder -- xml )
-    {
-        [ os&gt;&gt; ]
-        [ cpu&gt;&gt; ]
-        [ host-name&gt;&gt; &quot;.&quot; split1 drop ]
-        [ current-status ]
-        [ [ last-git-id&gt;&gt; ] [ last-timestamp&gt;&gt; ] bi build-status ]
-        [ [ clean-git-id&gt;&gt; ] [ clean-timestamp&gt;&gt; ] bi build-status ]
-        [ binaries-link ]
-        [ clean-image-link ]
-        [ report-link ]
-        [ latest-binary-link ]
-    } cleave
-    [XML
-    &lt;h2&gt;&lt;-&gt; / &lt;-&gt;&lt;/h2&gt;
-    &lt;table border=&quot;1&quot;&gt;
-    &lt;tr&gt;&lt;td&gt;Host name:&lt;/td&gt;&lt;td&gt;&lt;-&gt;&lt;/td&gt;&lt;/tr&gt;
-    &lt;tr&gt;&lt;td&gt;Current status:&lt;/td&gt;&lt;td&gt;&lt;-&gt;&lt;/td&gt;&lt;/tr&gt;
-    &lt;tr&gt;&lt;td&gt;Last build:&lt;/td&gt;&lt;td&gt;&lt;-&gt;&lt;/td&gt;&lt;/tr&gt;
-    &lt;tr&gt;&lt;td&gt;Last clean build:&lt;/td&gt;&lt;td&gt;&lt;-&gt;&lt;/td&gt;&lt;/tr&gt;
-    &lt;tr&gt;&lt;td&gt;Binaries:&lt;/td&gt;&lt;td&gt;&lt;-&gt;&lt;/td&gt;&lt;/tr&gt;
-    &lt;tr&gt;&lt;td&gt;Clean images:&lt;/td&gt;&lt;td&gt;&lt;-&gt;&lt;/td&gt;&lt;/tr&gt;
-    &lt;/table&gt;
-
-    &lt;-&gt; | &lt;-&gt;
-    XML] ;
-
-: machine-report ( -- xml )
-    builder new select-tuples
-    [ [ [ os&gt;&gt; ] [ cpu&gt;&gt; ] bi 2array ] compare ] sort
-    [ machine-table ] map ;
-
-: build-farm-summary ( -- xml )
-    recent-events
-    machine-report
-    [XML
-    &lt;html&gt;
-    &lt;head&gt;&lt;title&gt;Factor build farm&lt;/title&gt;&lt;/head&gt;
-    &lt;body&gt;&lt;h1&gt;Recent events&lt;/h1&gt;&lt;-&gt; &lt;h1&gt;Machine status&lt;/h1&gt;&lt;-&gt;&lt;/body&gt;
-    &lt;/html&gt;
-    XML] ;
-
-: &lt;summary-action&gt; ( -- action )
-    &lt;action&gt;
-    [ build-farm-summary xml&gt;string &quot;text/html&quot; &lt;content&gt; ] &gt;&gt;display ;
-
-TUPLE: builder-link href title ;
-
-C: &lt;builder-link&gt; builder-link
-
 : requirements ( builder -- xml )
     [
         os&gt;&gt; {
@@ -141,7 +138,7 @@ C: &lt;builder-link&gt; builder-link
             { &quot;openbsd&quot; &quot;OpenBSD 4.2&quot; }
         } at
     ] [
-        dup cpu&gt;&gt; &quot;x86-32&quot; = [
+        dup cpu&gt;&gt; &quot;x86.32&quot; = [
             os&gt;&gt; {
                 { [ dup { &quot;winnt&quot; &quot;linux&quot; } member? ] [ drop &quot;Intel Pentium 4, Core Duo, or other x86 chip with SSE2 support. Note that 32-bit Athlon XP processors do not support SSE2.&quot; ] }
                 { [ dup { &quot;freebsd&quot; &quot;netbsd&quot; &quot;openbsd&quot; } member? ] [ drop &quot;Intel Pentium Pro or better&quot; ] }
@@ -151,23 +148,36 @@ C: &lt;builder-link&gt; builder-link
     ] bi
     2array sift [ [XML &lt;li&gt;&lt;-&gt;&lt;/li&gt; XML] ] map [XML &lt;ul&gt;&lt;-&gt;&lt;/ul&gt; XML] ;
 
+: last-build-status ( builder -- xml )
+    [ last-git-id&gt;&gt; ] [ last-timestamp&gt;&gt; ] bi build-status ;
+
+: clean-build-status ( builder -- xml )
+    [ clean-git-id&gt;&gt; ] [ clean-timestamp&gt;&gt; ] bi build-status ;
+
 : &lt;download-binary-action&gt; ( -- action )
     &lt;page-action&gt;
     [
         validate-os/cpu
         &quot;os&quot; value &quot;cpu&quot; value (platform) &quot;platform&quot; set-value
-        current-builder
-        [ latest-binary-link &quot;package&quot; set-value ]
-        [ release-git-id&gt;&gt; git-link &quot;git-id&quot; set-value ]
-        [ requirements &quot;requirements&quot; set-value ]
-        tri
+        current-builder {
+            [ latest-binary-link &quot;package&quot; set-value ]
+            [ release-git-id&gt;&gt; git-link &quot;git-id&quot; set-value ]
+            [ requirements &quot;requirements&quot; set-value ]
+            [ host-name&gt;&gt; &quot;host-name&quot; set-value ]
+            [ current-status &quot;status&quot; set-value ]
+            [ last-build-status &quot;last-build&quot; set-value ]
+            [ clean-build-status &quot;last-clean-build&quot; set-value ]
+            [ binaries-link &quot;binaries&quot; set-value ]
+            [ clean-image-link &quot;clean-images&quot; set-value ]
+            [ report-link &quot;last-report&quot; set-value ]
+        } cleave
     ] &gt;&gt;init
     { mason-app &quot;download&quot; } &gt;&gt;template ;
 
 : &lt;mason-app&gt; ( -- dispatcher )
     mason-app new-dispatcher
-    &lt;summary-action&gt; &quot;&quot; add-responder
     &lt;build-report-action&gt; &quot;report&quot; add-responder
     &lt;download-binary-action&gt; &quot;download&quot; add-responder
+    &lt;download-grid-action&gt; &quot;grid&quot; add-responder
     mason-db &lt;db-persistence&gt; ;
 </diff>
      <filename>extra/webapps/mason/mason.factor</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>23ae3f4ab63edd3738479f823906847f3bd4dce8</id>
    </parent>
    <parent>
      <id>c779fccd4d9e86ec0a970a2feeecfd36ba8d2fd1</id>
    </parent>
  </parents>
  <author>
    <name>Joe Groff</name>
    <email>arcata@gmail.com</email>
  </author>
  <url>http://github.com/slavapestov/factor/commit/7178af55a75e5a73d2858bf752d4cfa52e94b236</url>
  <id>7178af55a75e5a73d2858bf752d4cfa52e94b236</id>
  <committed-date>2009-05-21T18:55:57-07:00</committed-date>
  <authored-date>2009-05-21T18:55:57-07:00</authored-date>
  <message>Merge branch 'master' of git://factorcode.org/git/factor</message>
  <tree>772a6d08e0c3903065991222a50375a73530f648</tree>
  <committer>
    <name>Joe Groff</name>
    <email>arcata@gmail.com</email>
  </committer>
</commit>
