omit big fields not needed for list

This commit is contained in:
oleg 2015-07-22 23:18:47 +03:00
parent 925a87eb1b
commit 67dc754f1b
2 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,12 @@ module.exports = function(app) {
db.builds.find(findParams, this.slot());
},
function(err, builds) {
// omit big fields not needed for list
_(builds).each(function(build) {
delete build.stepTimings;
build.project = _(build.project).pick('name', 'scm');
});
res.send(builds);
},
next

View File

@ -1,5 +1,6 @@
.builds
if !this.state.items.length
p Build history is empty
- console.log('>>>> builds = ', JSON.stringify(this.state.items).length, this.state.items)
each build, index in this.state.items
Item(build=build, key=build.id)