Fix running jobs
This commit is contained in:
parent
42ed7cf4de
commit
cadc8c0e72
|
@ -39,7 +39,9 @@ Travis.RunningJobsController = Em.ArrayProxy.extend
|
||||||
init: ->
|
init: ->
|
||||||
@_super.apply this, arguments
|
@_super.apply this, arguments
|
||||||
|
|
||||||
@addedJobs @get('content') if @get('content')
|
jobs = Travis.Job.running()
|
||||||
|
@set 'content', jobs
|
||||||
|
@addedJobs jobs
|
||||||
|
|
||||||
contentArrayWillChange: (array, index, removedCount, addedCount) ->
|
contentArrayWillChange: (array, index, removedCount, addedCount) ->
|
||||||
@_super.apply this, arguments
|
@_super.apply this, arguments
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
<ul class="jobs">
|
<ul class="jobs">
|
||||||
{{#each job in sortedJobs}}
|
{{#each job in sortedJobs}}
|
||||||
<li class="job">
|
<li class="job">
|
||||||
<a {{action showJob job.repoData job target="Travis.app.router" href=true}}>
|
{{#linkTo "job" job.repoData job}}
|
||||||
#{{job.number}}
|
#{{job.number}}
|
||||||
</a>
|
{{/linkTo}}
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
templateName: 'queues/list'
|
templateName: 'queues/list'
|
||||||
init: ->
|
init: ->
|
||||||
@_super.apply this, arguments
|
@_super.apply this, arguments
|
||||||
|
|
||||||
@set 'controller', @get('controller').container.lookup('controller:queues')
|
@set 'controller', @get('controller').container.lookup('controller:queues')
|
||||||
|
|
||||||
showAll: (event) ->
|
showAll: (event) ->
|
||||||
|
@ -49,14 +48,13 @@
|
||||||
RunningJobsView: Em.View.extend
|
RunningJobsView: Em.View.extend
|
||||||
templateName: 'jobs/running'
|
templateName: 'jobs/running'
|
||||||
elementId: 'running-jobs'
|
elementId: 'running-jobs'
|
||||||
controller: Travis.RunningJobsController.create()
|
init: ->
|
||||||
|
@_super.apply this, arguments
|
||||||
|
@set 'controller', @get('controller').container.lookup('controller:runningJobs')
|
||||||
|
|
||||||
groupsBinding: 'controller.sortedGroups'
|
groupsBinding: 'controller.sortedGroups'
|
||||||
jobsBinding: 'controller'
|
jobsBinding: 'controller'
|
||||||
|
|
||||||
didInsertElement: ->
|
|
||||||
@get('controller').set 'content', Travis.Job.running()
|
|
||||||
|
|
||||||
GroupView: Em.View.extend
|
GroupView: Em.View.extend
|
||||||
templateName: 'jobs/running/group'
|
templateName: 'jobs/running/group'
|
||||||
tagName: 'li'
|
tagName: 'li'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user