Use jobs reltionship on build instead of filtering.
We don't need to allow auto updates for now. Such approach may need to be changed if pusher can deliver new jobs, but this should work for now.
This commit is contained in:
parent
0be0c82191
commit
21b076d15f
|
@ -27,14 +27,12 @@ require 'travis/model'
|
|||
).property('data.job_ids.length')
|
||||
|
||||
requiredJobs: (->
|
||||
id = @get('id')
|
||||
Travis.Job.filter (data) -> (parseInt(data.get('build_id')) == id) && !data.get('allow_failure')
|
||||
).property()
|
||||
@get('jobs').filter (data) -> !data.get('allow_failure')
|
||||
).property('jobs.@each.allow_failure')
|
||||
|
||||
allowedFailureJobs: (->
|
||||
id = @get('id')
|
||||
Travis.Job.filter (data) -> (parseInt(data.get('build_id')) == id) && data.get('allow_failure')
|
||||
).property()
|
||||
@get('jobs').filter (data) -> data.get('allow_failure')
|
||||
).property('jobs.@each.allow_failure')
|
||||
|
||||
configKeys: (->
|
||||
return [] unless config = @get('config')
|
||||
|
|
|
@ -21,14 +21,12 @@
|
|||
<tbody>
|
||||
{{#each job in view.jobs}}
|
||||
{{#view Travis.JobsItemView contextBinding="job"}}
|
||||
<tr {{bindAttr class="view.color"}}>
|
||||
<td class="number"><a {{bindAttr href="view.urlJob"}} {{action route}}>{{number}}</a></td>
|
||||
<td class="duration" {{bindAttr title="started_at"}}>{{formatDuration duration}}</td>
|
||||
<td class="finished_at timeago" {{bindAttr title="finishedAt"}}>{{formatTime finishedAt}}</td>
|
||||
{{#each value in configValues}}
|
||||
<td>{{value}}</td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
<td class="number"><a {{bindAttr href="view.urlJob"}} {{action route}}>{{number}}</a></td>
|
||||
<td class="duration" {{bindAttr title="started_at"}}>{{formatDuration duration}}</td>
|
||||
<td class="finished_at timeago" {{bindAttr title="finishedAt"}}>{{formatTime finishedAt}}</td>
|
||||
{{#each value in configValues}}
|
||||
<td>{{value}}</td>
|
||||
{{/each}}
|
||||
{{/view}}
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
$.facebox(div: '#allow_failure_help')
|
||||
|
||||
JobsItemView: Travis.View.extend
|
||||
tagName: 'tr'
|
||||
classNameBindings: ['color']
|
||||
repositoryBinding: 'context.repository'
|
||||
jobBinding: 'context'
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user