2015-07-11 15:15:18 +00:00
|
|
|
mixin statusBadge(build)
|
|
|
|
if build.status === 'in-progress'
|
|
|
|
span.label.label-info in progress
|
|
|
|
|
|
|
|
if build.status === 'queued'
|
|
|
|
span.label.label-default queued
|
|
|
|
|
|
|
|
if build.status === 'done'
|
|
|
|
span.label.label.sm.label-success done
|
|
|
|
|
|
|
|
if build.status === 'error'
|
|
|
|
span.label.label-danger error
|
|
|
|
|
2015-12-08 20:58:31 +00:00
|
|
|
.row
|
2015-07-11 15:15:18 +00:00
|
|
|
if this.state.build
|
2015-12-08 20:58:31 +00:00
|
|
|
.col-sm-3.hidden-xs
|
|
|
|
BuildSidebar(projectName=this.state.build.project.name)
|
2015-12-11 15:41:01 +00:00
|
|
|
|
2015-12-08 20:58:31 +00:00
|
|
|
.col-sm-9
|
2015-12-11 15:41:01 +00:00
|
|
|
h1.page-header
|
2015-07-11 15:15:18 +00:00
|
|
|
.pull-right(style={fontSize: '22px'})
|
|
|
|
mixin statusBadge(this.state.build)
|
|
|
|
span Build #
|
|
|
|
span= this.state.build.number
|
|
|
|
|
2015-12-11 15:41:01 +00:00
|
|
|
.small.text-muted
|
|
|
|
| Initiated by
|
|
|
|
- var initiator = this.state.build.initiator;
|
|
|
|
if initiator.type === 'build'
|
|
|
|
Link(to="project", params={name: initiator.project.name})
|
|
|
|
span= initiator.project.name
|
|
|
|
|
|
|
|
|
| during the
|
|
|
|
|
|
|
|
|
Link(to="build", params={id: initiator.id})
|
|
|
|
span build #
|
|
|
|
span= initiator.number
|
|
|
|
else
|
|
|
|
span= initiator.type
|
2015-07-11 15:15:18 +00:00
|
|
|
|
2015-12-11 15:41:01 +00:00
|
|
|
//- hr
|
2015-07-11 15:15:18 +00:00
|
|
|
|
|
|
|
.build-view_info
|
2015-07-22 20:02:11 +00:00
|
|
|
if this.state.build.error
|
|
|
|
if this.state.build.error.message
|
|
|
|
.text-center.alert.alert-danger
|
|
|
|
| Error:
|
|
|
|
div= this.state.build.error.message
|
|
|
|
if this.state.build.error.stderr
|
|
|
|
pre= this.state.build.error.stderr
|
2015-08-26 19:16:06 +00:00
|
|
|
|
2015-07-11 15:15:18 +00:00
|
|
|
.row
|
2015-08-26 19:16:06 +00:00
|
|
|
.col-md-12
|
2015-07-11 15:15:18 +00:00
|
|
|
p
|
|
|
|
Scm(scm=this.state.build.project.scm.type)
|
|
|
|
|
|
|
|
|
| Project
|
|
|
|
Link(to="project", params={name: this.state.build.project.name})
|
|
|
|
span= this.state.build.project.name
|
2015-08-26 19:16:06 +00:00
|
|
|
.row
|
|
|
|
.col-md-12
|
2015-07-11 15:15:18 +00:00
|
|
|
p
|
|
|
|
i.fa.fa-fw.fa-clock-o
|
|
|
|
span
|
|
|
|
if this.state.build.startDate
|
2015-08-25 22:13:31 +00:00
|
|
|
span Started
|
2015-08-26 17:06:59 +00:00
|
|
|
DateTime(value=this.state.build.startDate)
|
2015-07-11 15:15:18 +00:00
|
|
|
else
|
2015-08-25 22:13:31 +00:00
|
|
|
span Queued
|
2015-08-26 17:06:59 +00:00
|
|
|
DateTime(value=this.state.build.createDate)
|
2015-07-11 15:15:18 +00:00
|
|
|
|
2015-08-26 19:16:06 +00:00
|
|
|
if this.state.build.endDate
|
2015-11-24 18:38:57 +00:00
|
|
|
- var durationTitle = _(this.state.build.stepTimings).map(function(stepTiming) {
|
|
|
|
- return stepTiming.name + ': ' + (stepTiming.duration / 1000).toFixed(1) + ' sec';
|
|
|
|
- }).join('\n');
|
2015-08-26 19:16:06 +00:00
|
|
|
| , finished
|
2015-07-11 15:15:18 +00:00
|
|
|
|
|
2015-08-26 19:16:06 +00:00
|
|
|
DateTime(value=this.state.build.endDate)
|
|
|
|
|
|
2015-11-24 18:38:57 +00:00
|
|
|
Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true, title=durationTitle)
|
2015-08-26 19:16:06 +00:00
|
|
|
|
|
|
|
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;
|
2015-10-04 11:45:53 +00:00
|
|
|
- var changes = scm && scm.changes;
|
2015-08-26 19:16:06 +00:00
|
|
|
.row
|
|
|
|
.col-md-12
|
2015-07-11 15:15:18 +00:00
|
|
|
p
|
|
|
|
i.fa.fa-fw.fa-code-fork
|
2015-08-26 19:16:06 +00:00
|
|
|
if changes
|
|
|
|
if changes.length
|
|
|
|
| Scm changes:
|
|
|
|
else
|
2015-08-28 20:30:01 +00:00
|
|
|
| No scm changes, current revision is
|
2015-08-26 19:16:06 +00:00
|
|
|
|
|
2015-08-28 20:30:01 +00:00
|
|
|
| "
|
|
|
|
mixin rev(rev)
|
|
|
|
| " by
|
|
|
|
|
|
|
|
|
= rev.author
|
2015-08-26 19:16:06 +00:00
|
|
|
else
|
|
|
|
| -
|
2015-07-11 15:15:18 +00:00
|
|
|
|
2015-10-04 11:45:53 +00:00
|
|
|
if changes && changes.length
|
2015-08-26 19:16:06 +00:00
|
|
|
each change, index in changes
|
|
|
|
- var number = index + 1;
|
|
|
|
.row(key= 'scm-change-' + number)
|
|
|
|
.col-md-offset-4.col-md-8
|
|
|
|
p
|
|
|
|
mixin rev(change, String(number) + '. ')
|
2015-07-11 15:15:18 +00:00
|
|
|
|
|
|
|
h2
|
|
|
|
i.fa.fa-fw.fa-terminal
|
|
|
|
|
|
|
|
|
| Console output
|
|
|
|
.build-view_terminal
|
2015-12-08 20:58:31 +00:00
|
|
|
if this.state.showConsole
|
|
|
|
Terminal(build=this.state.build.id, showPreloader=true)
|
2015-12-08 20:33:12 +00:00
|
|
|
|
2015-12-08 20:58:31 +00:00
|
|
|
if this.state.build.completed
|
|
|
|
if this.state.build.error
|
|
|
|
.text-center.alert.alert-danger
|
|
|
|
| Build ended with error
|
|
|
|
Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true)
|
|
|
|
else
|
|
|
|
.text-center.alert.alert-success
|
|
|
|
| Build successfully completed
|
|
|
|
Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true)
|
2015-12-08 20:33:12 +00:00
|
|
|
else
|
2015-12-08 20:58:31 +00:00
|
|
|
.well.text-center
|
|
|
|
button.btn.btn-primary(onClick=this.toggleConsole)
|
|
|
|
i.fa.fa-fw.fa-refresh
|
|
|
|
|
|
2015-12-16 21:34:31 +00:00
|
|
|
| Show full console output
|
2015-12-08 20:58:31 +00:00
|
|
|
|