Permalink
Browse files

[pages] some work on the build status report

  • Loading branch information...
1 parent ba77f45 commit 48b18ed146595fe863189469a6dbcabac2b81781 @agnat committed Feb 24, 2012
Showing with 27 additions and 39 deletions.
  1. +9 −31 doc/build/status.ejs
  2. +4 −4 doc/pages/stylesheets/build_status.less
  3. +1 −1 utils/lib/view.js
  4. +13 −3 utils/render_report
View
@@ -2,18 +2,6 @@
stylesheet('/stylesheets/mdns.css')
stylesheet('/stylesheets/build_status.css')
-var logos =
- { macosx: { url: path('/images/apple_logo.png'), alt: 'Mac OS X' }
- , linux: { url: path('/images/ubuntu_logo.png'), alt: 'Ubuntu Linux' }
- , freebsd: { url: path('/images/freebsd_logo.png'), alt: 'FreeBSD' }
- , windows: { url: path('/images/windows_logo.png'), alt: 'Windows' }
- }
- ;
-
-function logo(os) {
- var l = logos[os];
- return "<img src='" + l.url + "' alt='" + l.alt + "' title='" + l.alt + "'></img>";
-}
status_glyphs =
{ success: '&#x2713;'
, warning: '!'
@@ -36,34 +24,24 @@ function status(stage) {
<div>
<table class='status_table'><tbody>
<tr>
- <th style='vertical-align: top'>node</th>
- <% Object.keys(versions).forEach(function(v) { %>
- <th class='node_config'><%= versions[v].name %><br>
- <span><%= versions[v].sub %></span></th>
+ <th style='vertical-align: top'></th>
+ <% Object.keys(os).forEach(function(os) { %>
+ <th><%- logos[os] %></th>
<% }) %>
</tr>
- <% var os_array = Object.keys(os);
- latestStages.forEach(function(osrow, i) {%>
+ <% latestStages.forEach(function(nodeversion, i) { console.log(versions]);%>
<tr>
- <th><%- logo(os_array[i]) %></th>
- <% for (var i = 0; i < osrow.length; ++i) { %>
- <td><%- status(osrow[i]) %></td>
+ <th>node v<%= versions[1] %></th>
+ <% for (var i = 0; i < nodeversion.length; ++i) { %>
+ <td><%- status(nodeversion[i]) %></td>
<% } %>
</tr>
<% }) %>
- <!--
- <tr>
- <th><%- logo('windows') %></th>
- <td><%- status({status: 'warning'}) %></td>
- <td><%- status({status: 'success'}) %></td>
- <td><%- status({status: 'success'}) %></td>
- <td><%- status({status: 'failed'}) %></td>
- </tr>
- -->
</tbody></table>
</div>
+
<div><%= latest.revision %></div>
<div><%= new Date(latest.timestamp) %></div>
</div>
-<!-- vim: set linebreak filetype=html spell spelllang=en_us : -->
+
@@ -190,11 +190,11 @@ table.source {
}
.zero {
- width: 200px;
- height: 200px;
+ width: 180px;
+ height: 180px;
}
.pie_chart {
- width: 200px;
- height: 200px;
+ width: 180px;
+ height: 180px;
}
View
@@ -47,7 +47,7 @@ exports.render = function render(source, options, cb) {
;
locals = obj.union(options.locals || {}, locals);
metadata.body = ejs.render(source, locals);
- metadata = obj.union(metadata, helpers(metadata, options));
+ metadata.path = exports.getPathHelper(options);
var html = ejs.render(options.layout.toString(), metadata);
cb(null, html);
}
View
@@ -14,6 +14,10 @@ var fs = require('fs')
var rootd = path.resolve(__dirname, '..')
, env =
{ layout: rootd + '/doc/layout.ejs'
+ , apple_logo: rootd + '/doc/pages/images/apple_logo.svg'
+ , ubuntu_logo: rootd + '/doc/pages/images/ubuntu_logo.svg'
+ , freebsd_logo: rootd + '/doc/pages/images/freebsd_logo.svg'
+ , windows_logo: rootd + '/doc/pages/images/windows_logo.svg'
}
function done() {
@@ -39,8 +43,8 @@ console.log('rootd', rootd);
chain( [ [ actors.loadEnv, env ]
, [ configure ]
- , [ git, ['clone', '-b', 'ci-build', 'git://github.com/agnat/node_mdns.git'
- , rootd + '/out/ci-build'] ]
+ //, [ git, ['clone', '-b', 'ci-build', 'git://github.com/agnat/node_mdns.git'
+ // , rootd + '/out/ci-build'] ]
, [ actors.glob, rootd + '/out/ci-build/builds/*.json' ]
, [ load_builds, chain.last ]
, [ render_status_page, chain.last]
@@ -88,7 +92,7 @@ function render_status_page(builds, cb) {
});
for (var stage in latest.stages) {
var s = latest.stages[stage];
- latest_stages[os[s.os].idx][versions[s.key].idx] = s;
+ latest_stages[versions[s.key].idx][os[s.os].idx] = s;
}
console.log('versions:', versions, 'os:', os);
@@ -101,6 +105,12 @@ function render_status_page(builds, cb) {
, latestStages: latest_stages
, versions: versions
, os: os
+ , logos:
+ { macosx: env.apple_logo
+ , linux: env.ubuntu_logo
+ , freebsd: env.freebsd_logo
+ , win32: env.windows_logo
+ }
}
}
, cb

0 comments on commit 48b18ed

Please sign in to comment.