nci/static/js/app/components/builds/view.jade

139 lines
3.7 KiB
Plaintext
Raw Normal View History

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
if this.state.build
2015-12-08 20:58:31 +00:00
.col-sm-3.hidden-xs
2015-12-23 19:56:31 +00:00
BuildSidebar(projectName=this.state.build.project.name, currentBuild=this.state.build)
2015-12-08 20:58:31 +00:00
.col-sm-9
h1.page-header
.pull-right(style={fontSize: '22px'})
mixin statusBadge(this.state.build)
span Build #
span= this.state.build.number
.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
//- hr
.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
.row
2015-08-26 19:16:06 +00:00
.col-md-12
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
p
i.fa.fa-fw.fa-clock-o
span
if this.state.build.startDate
span Started
DateTime(value=this.state.build.startDate)
else
span Queued
DateTime(value=this.state.build.createDate)
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-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;
- var changes = scm && scm.changes;
2015-08-26 19:16:06 +00:00
.row
.col-md-12
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
| -
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) + '. ')
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: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)
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