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

80 lines
1.7 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-07-21 20:00:09 +00:00
.build_content
div.build_header
if build.number
if build.status !== 'queued'
Link(to="build", params={id: build.id})
span Build #
span= build.number
else
span Build #
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.project
span.build_info
Scm(scm=build.project.scm.type)
|
Link(to="project", params={name: build.project.name})
span= build.project.name
if build.endDate
span.build_info
i.fa.fa-fw.fa-clock-o
|
Duration(duration=(build.endDate - build.startDate))
|
if build.scm
span.build_info
i.fa.fa-fw.fa-comment-o
|
span= build.scm.rev.comment
|
if !build.endDate
if build.startDate
span.build_info
i.fa.fa-fw.fa-clock-o
| started at
DateTime(date=new Date(build.startDate))
else
span.build_info
i.fa.fa-fw.fa-clock-o
| queued at
DateTime(date=new Date(build.createDate))
2015-06-14 23:27:58 +00:00
2015-05-09 21:36:17 +00:00
2015-07-21 20:00:09 +00:00
.build_controls
if build.completed
a.btn.btn-sm.btn-default(href="javascript:void(0);", onClick=this.onRebuildProject(build.project.name))
i.fa.fa-fw.fa-repeat(title="Rebuild")
2015-05-09 21:36:17 +00:00
|
2015-07-21 20:00:09 +00:00
| Build again
2015-05-09 21:36:17 +00:00
else
2015-07-21 20:00:09 +00:00
//-.progress
//-.progress-bar.progress-bar-success(style={width: '60%'})