check for config, hide env if empty

This commit is contained in:
Lisa Passing 2015-03-13 13:06:20 +01:00
parent ce39df2b5c
commit bd74ddd7a2
5 changed files with 23 additions and 17 deletions

View File

@ -38,7 +38,7 @@
@import "app/right";
@import "app/settings";
// @import "app/stats";
// @import "app/status";
@import "app/status";
@import "app/tabs";
@import "app/tipsy";

View File

@ -54,6 +54,10 @@
.repo-main
.button--showmore
margin-top: 2em
.build-title
margin-top: 2.5rem
color: $grey1
font-size: $font-size-sm
.repo-main-commit
position: relative
@ -140,7 +144,3 @@
.icon--codeclimate
width: 1.2em
.build-title
margin-top: 2.5rem
color: $grey1
font-size: $font-size-sm

View File

@ -167,8 +167,8 @@
.tile-main
.icon
margin-right: .3em
p
padding: .1em 0
// p:not(.tile-single-line)
// padding: .1em 0
@media #{$medium-up}
white-space: nowrap
overflow: hidden
@ -178,7 +178,8 @@
@media #{$xlarge-up}
@include grid-column(5)
.tile-additional
p
padding: 1em 0
@media #{$xlarge-up}
@include grid-column(7)
p.tile-single-line
padding: .9em 0

View File

@ -19,12 +19,16 @@
</div>
<div class="tile-main medium-4 columns">
{{#if config.env}}
<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>{{view.languages}}</p>
{{else}}
<p class="build-lang tile-single-line"><span class="icon icon--lang"></span>{{view.languages}}</p>
{{/if}}
</div>
<div class="tile-additional medium-8 columns end">
<p class="columns small-6 medium-2 large-3 build-status">
<p class="columns small-6 medium-2 large-3 tile-single-line build-status">
<span class="icon icon--hash"></span>
{{#if job.id}}
{{#if job.repo.slug}}
@ -32,15 +36,15 @@
{{/if}}
{{/if}}
</p>
<p class="columns small-6 medium-4 large-3" {{bind-attr title="startedAt"}}>
<p class="columns small-6 medium-4 large-3 tile-single-line" {{bind-attr title="startedAt"}}>
<span class="icon icon--clock"></span>
{{format-duration duration}}
</p>
<p class="columns small-6 medium-5 large-5" {{bind-attr title="formattedFinishedAt"}}>
<p class="columns small-6 medium-5 large-5 tile-single-line" {{bind-attr title="formattedFinishedAt"}}>
<span class="icon icon--cal"></span>
{{format-time finishedAt}}
</p>
<p class="columns small-6 medium-1 large-1"><span {{bind-attr class=":icon :icon--linux config.os"}}></span>{{config.os}}</p>
<p class="columns small-6 medium-1 large-1 tile-single-line"><span {{bind-attr class=":icon :icon--linux config.os"}}></span>{{config.os}}</p>
</div>
</div>

View File

@ -14,10 +14,11 @@ View = BasicView.extend
languages: (->
output = []
config = @get('job.config')
for key, languageName of languageConfigKeys
if version = config[key]
output.push(languageName + ' ' + version)
if config = @get('job.config')
for key, languageName of languageConfigKeys
if version = config[key]
output.push(languageName + ': ' + version)
output.join(' ')
).property()