travis-web/app/components/jobs-item.coffee
Lisa P fe36e018ce start flexboxify job list
implement Justine\'s feedback

remove regenerate key popup styles

add new icons, refactor request-icon component

use correct property name
2015-12-02 16:11:25 +01:00

33 lines
884 B
CoffeeScript

`import Ember from 'ember'`
`import { colorForState } from 'travis/utils/helpers'`
`import { languageConfigKeys } from 'travis/utils/keys-map';`
JobsItemComponent = Ember.Component.extend
tagName: 'li'
classNameBindings: ['job.state']
classNames: ['jobs-item']
languages: (->
output = []
if config = @get('job.config')
for key, languageName of languageConfigKeys
if version = config[key]
output.push(languageName + ': ' + version)
gemfile = @get('job.config.gemfile')
if gemfile && @get('job.config.env')
output.push "Gemfile: #{gemfile}"
output.join(' ')
).property('job.config')
environment: (->
if env = @get('job.config.env')
env
else if gemfile = @get('job.config.gemfile')
"Gemfile: #{gemfile}"
).property('job.config.env', 'job.config.gemfile')
`export default JobsItemComponent`