accumulate console output + show more build info

This commit is contained in:
oleg 2015-05-08 23:21:59 +03:00
parent 2a2512fe3e
commit b5bfc8ce29
2 changed files with 12 additions and 6 deletions

View File

@ -1,5 +1,7 @@
li.list-group-item
li.list-group-item(title= item.status === 'in-progress' ? 'Current step is: ' + item.currentStep : 'Build is done')
span.badge= item.status
a.pull-right(href="javascript:void(0);", onClick=onBuildSelect(item.id), style={marginRight: '5px'}) show console output
span Build #
span #
span= item.id
span
span= item.project.name

View File

@ -14,17 +14,21 @@ define([
},
onReadConsoleOutput: function(buildId) {
this.output = ''
var self = this;
var resourceName = 'build' + buildId,
self = this;
self.output = '';
var resourceName = 'build' + buildId;
connect.resource(resourceName).unsubscribeAll();
connect.resource(resourceName).subscribe(function(data) {
self.output += data;
if (!/\n$/.test(self.output)) self.output += '\n';
self.trigger({
name: 'Console for build #' + buildId,
data: data
data: self.output
});
});
}