fix language string with Priotr's help
This commit is contained in:
parent
a9f7b383a4
commit
ce39df2b5c
|
@ -5,7 +5,6 @@
|
|||
`import Model from 'travis/models/model'`
|
||||
`import Log from 'travis/models/log'`
|
||||
`import DurationCalculations from 'travis/utils/duration-calculations'`
|
||||
`import languageConfigKeys from 'travis/utils/keys-map';`
|
||||
|
||||
Job = Model.extend DurationCalculations,
|
||||
logId: DS.attr()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<div class="tile-main medium-4 columns">
|
||||
<p class="build-env"><span class="icon icon--env"></span>{{config.global_env}} {{config.env}}</p>
|
||||
<p class="build-lang"><span class="icon icon--lang"></span>{{config.language}}</p>
|
||||
<p class="build-lang"><span class="icon icon--lang"></span>{{view.languages}}</p>
|
||||
</div>
|
||||
|
||||
<div class="tile-additional medium-8 columns end">
|
||||
|
|
|
@ -12,18 +12,18 @@ languageConfigKeys = {
|
|||
mono: 'Mono'
|
||||
dart: 'Dart'
|
||||
elixir: 'Elixir'
|
||||
ghc: 'GHC'
|
||||
jdk: 'JDK'
|
||||
rvm: 'Ruby'
|
||||
otp_release: 'OTP Release'
|
||||
}
|
||||
|
||||
configKeys = {
|
||||
env: 'ENV'
|
||||
rvm: 'Ruby'
|
||||
gemfile: 'Gemfile'
|
||||
jdk: 'JDK'
|
||||
otp_release: 'OTP Release'
|
||||
xcode_sdk: 'Xcode SDK'
|
||||
xcode_scheme:'Xcode Scheme'
|
||||
compiler: 'Compiler'
|
||||
ghc: 'GHC'
|
||||
os: 'OS'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
`import BasicView from 'travis/views/basic'`
|
||||
`import { colorForState } from 'travis/utils/helpers'`
|
||||
`import { languageConfigKeys } from 'travis/utils/keys-map';`
|
||||
|
||||
View = BasicView.extend
|
||||
tagName: 'div'
|
||||
|
@ -11,4 +12,14 @@ View = BasicView.extend
|
|||
colorForState(@get('job.state'))
|
||||
).property('job.state')
|
||||
|
||||
languages: (->
|
||||
output = []
|
||||
config = @get('job.config')
|
||||
for key, languageName of languageConfigKeys
|
||||
if version = config[key]
|
||||
output.push(languageName + ' ' + version)
|
||||
|
||||
output.join(' ')
|
||||
).property()
|
||||
|
||||
`export default View`
|
||||
|
|
Loading…
Reference in New Issue
Block a user