travis-web/app/views/job.coffee
2016-01-04 12:19:14 +01:00

24 lines
596 B
CoffeeScript

`import Ember from 'ember'`
`import { colorForState } from 'travis/utils/helpers'`
`import { githubCommit } 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'
currentItemBinding: 'job'
color: (->
colorForState(@get('job.state'))
).property('job.state')
urlGithubCommit: (->
githubCommit(@get('repo.slug'), @get('commit.sha'))
).property('repo.slug', 'commit.sha')
`export default View`