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

69 lines
1.4 KiB
Plaintext
Raw Normal View History

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
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
.build(class="build__#{build.status}")
2015-05-09 22:04:36 +00:00
.build_controls.pull-right
a(href="javascript:void(0);", onClick=this.onBuildSelect(build.id))
2015-05-17 13:48:16 +00:00
i.fa.fa-2x.fa-repeat(title="Rebuild", onClick=this.onRebuildProject(build.project.name))
2015-05-10 16:53:33 +00:00
2015-05-09 20:19:25 +00:00
.build_header
2015-05-17 13:48:16 +00:00
if build.status !== 'queued'
Link(to="build", params={id: build.id})
span= build.project.name
else
span= build.project.name
2015-05-17 10:26:28 +00:00
if build.number
span
span #
span= build.number
2015-05-20 20:20:51 +00:00
2015-06-14 23:27:58 +00:00
if build.waitReason
span (
span= build.waitReason
span , waiting)
2015-05-20 20:20:51 +00:00
if build.status === 'in-progress' && build.currentStep
span (
span= build.currentStep
span )
2015-05-09 21:36:17 +00:00
div
if build.scm
span.build_info
i.fa.fa-fw.fa-code-fork
span= build.scm.rev.id
span.build_info
i.fa.fa-fw.fa-comment-o
|
span= build.scm.rev.comment
if build.endDate
span.build_info
i.fa.fa-fw.fa-clock-o
2015-07-11 10:46:28 +00:00
| built at
2015-05-10 16:53:33 +00:00
DateTime(date=new Date(build.endDate))
2015-05-09 21:36:17 +00:00
else
if build.startDate
span.build_info
i.fa.fa-fw.fa-clock-o
| started at
2015-05-10 08:59:12 +00:00
DateTime(date=new Date(build.startDate))
2015-05-09 21:36:17 +00:00
else
span.build_info
i.fa.fa-fw.fa-clock-o
| queued at
2015-05-10 16:53:33 +00:00
DateTime(date=new Date(build.createDate))