
implement Justine\'s feedback remove regenerate key popup styles add new icons, refactor request-icon component use correct property name
33 lines
884 B
CoffeeScript
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`
|