mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-11 23:45:08 +00:00
118 lines
3.0 KiB
Plaintext
118 lines
3.0 KiB
Plaintext
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
|
|
|
|
div.row
|
|
if this.state.build
|
|
.col-md-8
|
|
h1
|
|
.pull-right(style={fontSize: '22px'})
|
|
mixin statusBadge(this.state.build)
|
|
span Build #
|
|
span= this.state.build.number
|
|
|
|
.text-muted(style={marginTop: '-10px'})
|
|
| 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
|
|
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
|
|
|
|
.row
|
|
.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
|
|
.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)
|
|
|
|
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, title=durationTitle)
|
|
|
|
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;
|
|
.row
|
|
.col-md-12
|
|
p
|
|
i.fa.fa-fw.fa-code-fork
|
|
if changes
|
|
if changes.length
|
|
| Scm changes:
|
|
else
|
|
| No scm changes, current revision is
|
|
|
|
|
| "
|
|
mixin rev(rev)
|
|
| " by
|
|
|
|
|
= rev.author
|
|
else
|
|
| -
|
|
|
|
if changes && changes.length
|
|
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
|
|
Terminal(build=this.state.build.id)
|