show build duration details at title

This commit is contained in:
oleg 2015-11-24 21:38:57 +03:00
parent 755577003e
commit 55e5b257e6
3 changed files with 7 additions and 3 deletions

View File

@ -36,7 +36,7 @@ Ui fixes
~~Warning: setState(...): Can only update a mounted or mounting component.~~
~~This usually means you called setState() on an unmounted component.~~
~~This is a no-op.~~
* show duration details (steps duration) on build page
* ~~show duration details (steps duration) on build page~~
* speed up build points animation at ff (maybe borrow something from animate.css?)
* current successfully streak icons at project page
* ~~don't appear build from other project on project page~~

View File

@ -67,11 +67,14 @@ div.row
DateTime(value=this.state.build.createDate)
if this.state.build.endDate
- var durationTitle = _(this.state.build.stepTimings).map(function(stepTiming) {
- return stepTiming.name + ': ' + (stepTiming.duration / 1000).toFixed(1) + ' sec';
- }).join('\n');
| , finished
|
DateTime(value=this.state.build.endDate)
|
Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true)
Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true, title=durationTitle)
mixin rev(rev, prefix)
- prefix = prefix || '';

View File

@ -3,4 +3,5 @@
- var min = sec >= 60 ? Math.round(sec / 60) : 0;
- var suffix = this.props.withSuffix ? 'in ' : '';
- var ending = min === 1 ? '' : 's';
span(title= sec + ' second' + ending)= suffix + (min ? min + ' minunte' : sec + ' second') + ending
- var title = this.props.title || sec + ' second' + ending;
span(title= title)= suffix + (min ? min + ' minunte' : sec + ' second') + ending