2015-05-09 20:19:25 +00:00
|
|
|
mixin statusText(build)
|
|
|
|
if build.status === 'in-progress'
|
2015-05-09 21:36:17 +00:00
|
|
|
span in progress
|
2015-05-09 20:19:25 +00:00
|
|
|
|
|
|
|
if build.status === 'queued'
|
2015-05-09 21:36:17 +00:00
|
|
|
span queued
|
2015-05-09 20:19:25 +00:00
|
|
|
|
|
|
|
if build.status === 'done'
|
2015-05-09 21:36:17 +00:00
|
|
|
span done
|
|
|
|
|
2015-05-19 20:48:20 +00:00
|
|
|
if build.status === 'error'
|
|
|
|
span error
|
|
|
|
|
2015-05-09 21:36:17 +00:00
|
|
|
- var build = this.props.build;
|
2015-05-09 20:19:25 +00:00
|
|
|
|
2015-07-26 13:05:54 +00:00
|
|
|
.build(class="")
|
2015-07-21 20:00:09 +00:00
|
|
|
.build_content
|
2015-07-26 13:05:54 +00:00
|
|
|
.build_status
|
|
|
|
.status(class="status__#{build.status}")
|
2015-07-21 20:00:09 +00:00
|
|
|
div.build_header
|
2015-07-26 13:05:54 +00:00
|
|
|
if build.project
|
|
|
|
span
|
|
|
|
Scm(scm=build.project.scm.type)
|
|
|
|
|
|
|
|
|
Link(to="project", params={name: build.project.name})
|
|
|
|
span= build.project.name
|
|
|
|
|
|
2015-07-21 20:00:09 +00:00
|
|
|
if build.number
|
2015-07-26 13:05:54 +00:00
|
|
|
span(style={fontSize: '15px', color: '#a6a6a6'}) build
|
|
|
|
|
|
2015-07-21 20:00:09 +00:00
|
|
|
if build.status !== 'queued'
|
|
|
|
Link(to="build", params={id: build.id})
|
2015-07-26 13:05:54 +00:00
|
|
|
span #
|
2015-07-21 20:00:09 +00:00
|
|
|
span= build.number
|
|
|
|
else
|
2015-07-26 13:05:54 +00:00
|
|
|
span #
|
2015-07-21 20:00:09 +00:00
|
|
|
span= build.number
|
2015-05-10 16:53:33 +00:00
|
|
|
|
2015-07-21 20:00:09 +00:00
|
|
|
if build.waitReason
|
|
|
|
span (
|
|
|
|
span= build.waitReason
|
|
|
|
span , waiting)
|
2015-05-17 13:48:16 +00:00
|
|
|
|
2015-07-21 20:00:09 +00:00
|
|
|
if build.status === 'in-progress' && build.currentStep
|
|
|
|
span (
|
|
|
|
span= build.currentStep
|
|
|
|
span )
|
2015-05-20 20:20:51 +00:00
|
|
|
|
2015-07-21 20:00:09 +00:00
|
|
|
div
|
|
|
|
if build.endDate
|
|
|
|
span.build_info
|
|
|
|
i.fa.fa-fw.fa-clock-o
|
2015-08-25 22:13:31 +00:00
|
|
|
| finished
|
2015-08-26 17:06:59 +00:00
|
|
|
DateTime(value=build.endDate)
|
2015-07-21 20:00:09 +00:00
|
|
|
|
|
2015-08-26 17:06:59 +00:00
|
|
|
Duration(value=(build.endDate - build.startDate), withSuffix=true)
|
2015-08-25 22:13:31 +00:00
|
|
|
else
|
2015-07-21 20:00:09 +00:00
|
|
|
if build.startDate
|
|
|
|
span.build_info
|
|
|
|
i.fa.fa-fw.fa-clock-o
|
2015-08-25 22:13:31 +00:00
|
|
|
| started
|
2015-08-26 17:06:59 +00:00
|
|
|
DateTime(value=build.startDate)
|
2015-07-21 20:00:09 +00:00
|
|
|
else
|
|
|
|
span.build_info
|
|
|
|
i.fa.fa-fw.fa-clock-o
|
2015-08-25 22:13:31 +00:00
|
|
|
| queued
|
2015-08-26 17:06:59 +00:00
|
|
|
DateTime(value=build.createDate)
|
2015-08-25 22:13:31 +00:00
|
|
|
|
|
|
|
|
if build.scm
|
|
|
|
span.build_info
|
|
|
|
i.fa.fa-fw.fa-comment-o
|
|
|
|
|
|
2015-10-15 22:52:23 +00:00
|
|
|
span= utils.prune(build.scm.rev.comment, 40)
|
2015-08-25 22:13:31 +00:00
|
|
|
|
|
2015-05-09 21:36:17 +00:00
|
|
|
|
2015-07-21 20:00:09 +00:00
|
|
|
.build_controls
|
|
|
|
if build.completed
|
2015-07-26 13:05:54 +00:00
|
|
|
.build_controls_buttons
|
|
|
|
a.btn.btn-sm.btn-default(href="javascript:void(0);", onClick=this.onRebuildProject(build.project.name))
|
|
|
|
i.fa.fa-fw.fa-repeat(title="Rebuild")
|
|
|
|
|
|
|
|
|
| Build again
|
|
|
|
if build.status === 'in-progress'
|
|
|
|
.build_controls_progress
|
|
|
|
if build.project.avgBuildDuration
|
|
|
|
Progress(build=build)
|
2015-11-24 22:41:20 +00:00
|
|
|
if build.status === 'queued'
|
|
|
|
.build_controls_buttons
|
|
|
|
a.btn.btn-sm.btn-default(href="javascript:void(0);", onClick=this.onCancelBuild(build.id))
|
|
|
|
i.fa.fa-fw.fa-times(title="Cancel build")
|
|
|
|
|
|
|
|
|
| Cancel build
|
2015-07-21 20:00:09 +00:00
|
|
|
|