Show loading text for queues and running jobs
This commit is contained in:
parent
c735444039
commit
5b9dd4819f
|
@ -1,9 +1,14 @@
|
||||||
`import Ember from 'ember'`
|
`import Ember from 'ember'`
|
||||||
|
|
||||||
Controller = Ember.ArrayController.extend
|
Controller = Ember.ArrayController.extend
|
||||||
|
isLoaded: false
|
||||||
content: (->
|
content: (->
|
||||||
@store.filter 'job', {}, (job) ->
|
result = @store.filter('job', {}, (job) ->
|
||||||
['created', 'queued'].indexOf(job.get('state')) != -1
|
['created', 'queued'].indexOf(job.get('state')) != -1
|
||||||
|
)
|
||||||
|
result.then =>
|
||||||
|
@set('isLoaded', true)
|
||||||
|
result
|
||||||
).property()
|
).property()
|
||||||
|
|
||||||
`export default Controller`
|
`export default Controller`
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
`import Ember from 'ember'`
|
`import Ember from 'ember'`
|
||||||
|
|
||||||
Controller = Ember.ArrayController.extend
|
Controller = Ember.ArrayController.extend
|
||||||
|
isLoaded: false
|
||||||
content: (->
|
content: (->
|
||||||
@store.filter 'job', { state: 'started' }, (job) ->
|
result = @store.filter('job', { state: 'started' }, (job) ->
|
||||||
['started', 'received'].indexOf(job.get('state')) != -1
|
['started', 'received'].indexOf(job.get('state')) != -1
|
||||||
|
)
|
||||||
|
result.then =>
|
||||||
|
@set('isLoaded', true)
|
||||||
|
result
|
||||||
).property()
|
).property()
|
||||||
|
|
||||||
`export default Controller`
|
`export default Controller`
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
{{#if isLoaded}}
|
||||||
{{#if length}}
|
{{#if length}}
|
||||||
{{#each job in controller}}
|
{{#each job in controller}}
|
||||||
<div {{bind-attr class=":tile :tile--sidebar job.state"}}>
|
<div {{bind-attr class=":tile :tile--sidebar job.state"}}>
|
||||||
|
@ -23,3 +23,6 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="spinner-container">There are no jobs queued</div>
|
<div class="spinner-container">There are no jobs queued</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>
|
||||||
|
{{/if}}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{{!-- <h4>Running Jobs ({{controller.length}})</h4> --}}
|
{{!-- <h4>Running Jobs ({{controller.length}})</h4> --}}
|
||||||
|
|
||||||
|
{{#if isLoaded}}
|
||||||
{{#if controller.length}}
|
{{#if controller.length}}
|
||||||
{{#each job in controller}}
|
{{#each job in controller}}
|
||||||
<div {{bind-attr class=":tile :tile--sidebar job.state"}}>
|
<div {{bind-attr class=":tile :tile--sidebar job.state"}}>
|
||||||
|
@ -28,3 +29,6 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="spinner-container">There are no jobs running</div>
|
<div class="spinner-container">There are no jobs running</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>
|
||||||
|
{{/if}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user