Remove BuildsItemView
This commit is contained in:
parent
76f4ac758c
commit
3c057ea401
|
@ -9,6 +9,10 @@ Travis.BuildsItemController = Em.ObjectController.extend(Travis.GithubUrlPropert
|
||||||
needs: ['builds']
|
needs: ['builds']
|
||||||
isPullRequestsListBinding: 'controllers.builds.isPullRequestsList'
|
isPullRequestsListBinding: 'controllers.builds.isPullRequestsList'
|
||||||
buildBinding: 'content'
|
buildBinding: 'content'
|
||||||
|
|
||||||
|
color: (->
|
||||||
|
Travis.Helpers.colorForState(@get('build.state'))
|
||||||
|
).property('build.state')
|
||||||
)
|
)
|
||||||
|
|
||||||
Travis.QueueController = Em.ArrayController.extend
|
Travis.QueueController = Em.ArrayController.extend
|
||||||
|
|
|
@ -22,40 +22,40 @@
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each build in controller itemController="buildsItem"}}
|
{{#each build in controller itemController="buildsItem"}}
|
||||||
{{#view Travis.BuildsItemView contextBinding="build"}}
|
<tr {{bind-attr class="build.color"}}>
|
||||||
<td class="number">
|
<td class="number">
|
||||||
<span class="status"></span>
|
<span class="status"></span>
|
||||||
{{#if id}}
|
{{#if build.id}}
|
||||||
{{#link-to "build" repo this}}
|
{{#link-to "build" build.repo build}}
|
||||||
{{number}}
|
{{build.number}}
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td class="message">
|
<td class="message">
|
||||||
{{{formatMessage commit.message short="true" repoBinding=build.repo}}}
|
{{{formatMessage build.commit.message short="true" repoBinding=build.repo}}}
|
||||||
</td>
|
</td>
|
||||||
<td class="commit">
|
<td class="commit">
|
||||||
<a {{bind-attr href="urlGithubCommit"}}>
|
<a {{bind-attr href="build.urlGithubCommit"}}>
|
||||||
{{formatCommit commit}}
|
{{formatCommit build.commit}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="committer">
|
<td class="committer">
|
||||||
{{commit.committerName}}
|
{{build.commit.committerName}}
|
||||||
</td>
|
</td>
|
||||||
{{#if isPullRequestsList}}
|
{{#if isPullRequestsList}}
|
||||||
<td>
|
<td>
|
||||||
<a {{bind-attr href="urlGithubPullRequest"}}>
|
<a {{bind-attr href="build.urlGithubPullRequest"}}>
|
||||||
#{{pullRequestNumber}}
|
#{{build.pullRequestNumber}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<td class="duration" {{bind-attr title="duration"}}>
|
<td class="duration" {{bind-attr title="build.duration"}}>
|
||||||
{{formatDuration duration}}
|
{{formatDuration build.duration}}
|
||||||
</td>
|
</td>
|
||||||
<td class="finished_at timeago" {{bind-attr title="formattedFinishedAt"}}>
|
<td class="finished_at timeago" {{bind-attr title="build.formattedFinishedAt"}}>
|
||||||
{{formatTime finishedAt}}
|
{{formatTime build.finishedAt}}
|
||||||
</td>
|
</td>
|
||||||
{{/view}}
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -20,19 +20,6 @@ Travis.reopen
|
||||||
click: ->
|
click: ->
|
||||||
@get('controller').showMore()
|
@get('controller').showMore()
|
||||||
|
|
||||||
BuildsItemView: Travis.View.extend
|
|
||||||
tagName: 'tr'
|
|
||||||
classNameBindings: ['color']
|
|
||||||
repoBinding: 'controller.repo'
|
|
||||||
buildBinding: 'context'
|
|
||||||
commitBinding: 'build.commit'
|
|
||||||
|
|
||||||
isPullRequestsList: ( -> @get('parentView.isPullRequestsList') ).property('parentView.isPullRequestsList')
|
|
||||||
|
|
||||||
color: (->
|
|
||||||
Travis.Helpers.colorForState(@get('build.state'))
|
|
||||||
).property('build.state')
|
|
||||||
|
|
||||||
BuildView: Travis.View.extend
|
BuildView: Travis.View.extend
|
||||||
templateName: 'builds/show'
|
templateName: 'builds/show'
|
||||||
classNameBindings: ['color', 'loading']
|
classNameBindings: ['color', 'loading']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user