diff --git a/app/controllers/running-jobs.coffee b/app/controllers/running-jobs.coffee index d7d21cb6..10b09e45 100644 --- a/app/controllers/running-jobs.coffee +++ b/app/controllers/running-jobs.coffee @@ -1,6 +1,15 @@ `import Ember from 'ember'` 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 content: (-> result = @store.filter('job', { state: 'started' }, (job) -> diff --git a/app/templates/queue.hbs b/app/templates/queue.hbs index 2dee38d5..76fdcf0f 100644 --- a/app/templates/queue.hbs +++ b/app/templates/queue.hbs @@ -10,7 +10,9 @@
- {{#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}}
diff --git a/app/templates/running-jobs.hbs b/app/templates/running-jobs.hbs index 0ec37c96..d039ae2d 100644 --- a/app/templates/running-jobs.hbs +++ b/app/templates/running-jobs.hbs @@ -10,14 +10,16 @@
- {{#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}}
- Duration: + Duration: - {{format-duration job.startedAt}} + {{format-duration job.duration}}