show scm changes on build page

This commit is contained in:
oleg 2015-08-26 22:16:06 +03:00
parent 1eb22678e7
commit 2d99641b7d
4 changed files with 41 additions and 30 deletions

View File

@ -29,7 +29,7 @@ Ui fixes
* speed up console output * speed up console output
* projects autocomplete * projects autocomplete
* ~~add time ago to build list~~ * ~~add time ago to build list~~
* show scm changes on build page * ~~show scm changes on build page~~
* react says many many times to console: * react says many many times to console:
Warning: setState(...): Can only update a mounted or mounting component. Warning: setState(...): Can only update a mounted or mounting component.
This usually means you called setState() on an unmounted component. This usually means you called setState() on an unmounted component.

View File

@ -52,7 +52,6 @@ mixin statusText(build)
i.fa.fa-fw.fa-clock-o i.fa.fa-fw.fa-clock-o
| finished | finished
DateTime(value=build.endDate) DateTime(value=build.endDate)
| ,
| |
Duration(value=(build.endDate - build.startDate), withSuffix=true) Duration(value=(build.endDate - build.startDate), withSuffix=true)
else else

View File

@ -47,15 +47,17 @@ div.row
div= this.state.build.error.message div= this.state.build.error.message
if this.state.build.error.stderr if this.state.build.error.stderr
pre= this.state.build.error.stderr pre= this.state.build.error.stderr
.row .row
.col-md-6 .col-md-12
p p
Scm(scm=this.state.build.project.scm.type) Scm(scm=this.state.build.project.scm.type)
| |
| Project | Project
Link(to="project", params={name: this.state.build.project.name}) Link(to="project", params={name: this.state.build.project.name})
span= this.state.build.project.name span= this.state.build.project.name
.row
.col-md-12
p p
i.fa.fa-fw.fa-clock-o i.fa.fa-fw.fa-clock-o
span span
@ -66,36 +68,45 @@ div.row
span Queued span Queued
DateTime(value=this.state.build.createDate) DateTime(value=this.state.build.createDate)
if this.state.build.status !== 'in-progress'
p
i.fa.fa-fw.fa-circle
|
| Finished
if this.state.build.endDate if this.state.build.endDate
| , finished
|
DateTime(value=this.state.build.endDate) DateTime(value=this.state.build.endDate)
else
| -
- var rev = this.state.build.scm && this.state.build.scm.rev || {};
.col-md-6
p
i.fa.fa-fw.fa-user
| |
| Commit author Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true)
|
span= rev.author || '-' mixin rev(rev, prefix)
- prefix = prefix || '';
span(title= 'Revision: ' + rev.id + ' by ' + rev.author)= prefix + rev.comment
- var scm = this.state.build.scm;
- var rev = scm && scm.rev;
- var changes = scm.changes;
.row
.col-md-12
p p
i.fa.fa-fw.fa-code-fork i.fa.fa-fw.fa-code-fork
if changes
if changes.length
| Scm changes:
else
| No scm changes, current revision:
| |
| Revision else
| | -
span= rev.id || '-'
if changes.length
each change, index in changes
- var number = index + 1;
.row(key= 'scm-change-' + number)
.col-md-offset-4.col-md-8
p p
i.fa.fa-fw.fa-comment-o mixin rev(change, String(number) + '. ')
| else
| Comment .row
| .col-md-offset-4.col-md-8
span= rev.comment || '-' p
mixin rev(rev)
h2 h2
i.fa.fa-fw.fa-terminal i.fa.fa-fw.fa-terminal

View File

@ -15,6 +15,7 @@ define([
) { ) {
template = template.locals({ template = template.locals({
DateTime: CommonComponents.DateTime, DateTime: CommonComponents.DateTime,
Duration: CommonComponents.Duration,
Scm: CommonComponents.Scm, Scm: CommonComponents.Scm,
Terminal: TerminalComponent, Terminal: TerminalComponent,
Link: Router.Link Link: Router.Link