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

95 lines
2.2 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
.builds_item(class="builds_item__#{build.status}")
.builds_inner
.row
.builds_header
//- .builds_status
//- .status(class="status__#{build.status}")
if build.project
span
Scm(scm=build.project.scm.type)
|
Link(to="project", params={name: build.project.name})
span= build.project.name
2015-07-26 13:05:54 +00:00
|
if build.number
span(style={fontSize: '15px', color: '#a6a6a6'}) build
|
if build.status !== 'queued'
Link(to="build", params={id: build.id})
span #
span= build.number
else
span #
span= build.number
if build.waitReason
span (
span= build.waitReason
span , waiting)
if build.status === 'in-progress' && build.currentStep
span (
span= build.currentStep
span )
.builds_controls
if build.completed
.builds_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
2015-05-10 16:53:33 +00:00
if build.status === 'in-progress'
.builds_progress
if build.project.avgBuildDuration
Progress(build=build)
2015-05-17 13:48:16 +00:00
if build.status === 'queued'
.builds_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-05-20 20:20:51 +00:00
.builds_content
2015-07-21 20:00:09 +00:00
if build.endDate
span.builds_info
2015-07-21 20:00:09 +00:00
i.fa.fa-fw.fa-clock-o
| finished
DateTime(value=build.endDate)
2015-07-21 20:00:09 +00:00
|
Duration(value=(build.endDate - build.startDate), withSuffix=true)
else
2015-07-21 20:00:09 +00:00
if build.startDate
span.builds_info
2015-07-21 20:00:09 +00:00
i.fa.fa-fw.fa-clock-o
| started
DateTime(value=build.startDate)
2015-07-21 20:00:09 +00:00
else
span.builds_info
2015-07-21 20:00:09 +00:00
i.fa.fa-fw.fa-clock-o
| queued
DateTime(value=build.createDate)
|
if build.scm
span.builds_info
i.fa.fa-fw.fa-comment-o
|
span= utils.prune(build.scm.rev.comment, 40)