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

94 lines
2.1 KiB
Plaintext

mixin statusText(build)
if build.status === 'in-progress'
span in progress
if build.status === 'queued'
span queued
if build.status === 'done'
span done
if build.status === 'error'
span error
- var build = this.props.build;
.build(class="")
.build_content
.build_status
.status(class="status__#{build.status}")
div.build_header
if build.project
span
Scm(scm=build.project.scm.type)
|
Link(to="project", params={name: build.project.name})
span= build.project.name
|
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 )
div
if build.endDate
span.build_info
i.fa.fa-fw.fa-clock-o
| finished
DateTime(value=build.endDate)
|
Duration(value=(build.endDate - build.startDate), withSuffix=true)
else
if build.startDate
span.build_info
i.fa.fa-fw.fa-clock-o
| started
DateTime(value=build.startDate)
else
span.build_info
i.fa.fa-fw.fa-clock-o
| queued
DateTime(value=build.createDate)
|
if build.scm
span.build_info
i.fa.fa-fw.fa-comment-o
|
span= utils.prune(build.scm.rev.comment, 40)
|
.build_controls
if build.completed
.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)
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