Fix duration on running jobs list
This commit is contained in:
parent
8cd3da7f5b
commit
df6b87ddb8
|
@ -1,6 +1,15 @@
|
||||||
`import Ember from 'ember'`
|
`import Ember from 'ember'`
|
||||||
|
|
||||||
Controller = Ember.ArrayController.extend
|
Controller = Ember.ArrayController.extend
|
||||||
|
init: ->
|
||||||
|
@_super.apply this, arguments
|
||||||
|
if !Ember.testing
|
||||||
|
Visibility.every @config.intervals.updateTimes, @updateTimes.bind(this)
|
||||||
|
|
||||||
|
updateTimes: ->
|
||||||
|
if content = @get('content')
|
||||||
|
content.forEach (job) -> job.updateTimes()
|
||||||
|
|
||||||
isLoaded: false
|
isLoaded: false
|
||||||
content: (->
|
content: (->
|
||||||
result = @store.filter('job', { state: 'started' }, (job) ->
|
result = @store.filter('job', { state: 'started' }, (job) ->
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
<p class="tile-title float-right">
|
<p class="tile-title float-right">
|
||||||
<span class="icon icon--hash"></span>
|
<span class="icon icon--hash"></span>
|
||||||
{{#link-to "job" job.repo job}}{{job.number}}{{/link-to}}
|
{{#if job.repo.slug}}
|
||||||
|
{{#link-to "job" job.repo job}}{{job.number}}{{/link-to}}
|
||||||
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -10,14 +10,16 @@
|
||||||
|
|
||||||
<p class="tile-title float-right">
|
<p class="tile-title float-right">
|
||||||
<span class="icon icon--hash"></span>
|
<span class="icon icon--hash"></span>
|
||||||
{{#link-to "job" job.repo job}}{{job.number}}{{/link-to}}
|
{{#if job.repo.slug}}
|
||||||
|
{{#link-to "job" job.repo job}}{{job.number}}{{/link-to}}
|
||||||
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<span class="icon icon--clock"></span>
|
<span class="icon icon--clock"></span>
|
||||||
Duration:
|
Duration:
|
||||||
<abbr class="duration" {{bind-attr title="job.startedAt"}}>
|
<abbr class="duration" {{bind-attr title="job.startedAt"}}>
|
||||||
{{format-duration job.startedAt}}
|
{{format-duration job.duration}}
|
||||||
</abbr>
|
</abbr>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user