mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-10 19:39:17 +00:00
return object as a streak
This commit is contained in:
parent
0c119b0d67
commit
6a44a5f955
@ -171,7 +171,7 @@ BuildsCollection.prototype.getDoneStreak = function(params, callback) {
|
||||
|
||||
// tricky but effective streak counting inside filter goes below
|
||||
var doneBuildsStreakCallback = _(this.slot()).once(),
|
||||
doneBuildsStreak = 0;
|
||||
doneBuildsStreak = {buildsCount: 0};
|
||||
|
||||
self.db.builds.find({
|
||||
start: start,
|
||||
@ -182,7 +182,7 @@ BuildsCollection.prototype.getDoneStreak = function(params, callback) {
|
||||
return true;
|
||||
}
|
||||
if (build.status === 'done') {
|
||||
doneBuildsStreak++;
|
||||
doneBuildsStreak.buildsCount++;
|
||||
}
|
||||
},
|
||||
limit: 1
|
||||
|
@ -32,7 +32,7 @@ div
|
||||
|
||||
p Current successfully streak:
|
||||
if lastDoneBuild
|
||||
span= this.state.project.doneBuildsStreak
|
||||
span= this.state.project.doneBuildsStreak.buildsCount
|
||||
else
|
||||
| -
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user