travis-web/app/views/job.coffee
Piotr Sarnacki 29c95a4180 Poll for build on job tab
Build has also job's data, so it will get more info with not much
overhead.
2015-05-07 13:49:22 +02:00

33 lines
892 B
CoffeeScript

`import Ember from 'ember'`
`import { colorForState } from 'travis/utils/helpers'`
`import { githubCommit, gravatarImage } from 'travis/utils/urls'`
`import Polling from 'travis/mixins/polling'`
View = Ember.View.extend Polling,
pollModels: 'controller.job.build'
repoBinding: 'controller.repo'
jobBinding: 'controller.job'
commitBinding: 'job.commit'
annotationsBinding: 'job.annotations'
currentItemBinding: 'job'
color: (->
colorForState(@get('job.state'))
).property('job.state')
urlGithubCommit: (->
githubCommit(@get('repo.slug'), @get('commit.sha'))
).property('repo.slug', 'commit.sha')
urlCommitterGravatarImage: (->
gravatarImage(@get('commit.committerEmail'), 40)
).property('commit.committerEmail')
urlAuthorGravatarImage: (->
gravatarImage(@get('commit.authorEmail'), 40)
).property('commit.authorEmail')
`export default View`