Add humanize-state helper

We don't want to display 'received' state as it's not meaningful for the users.
We're displaying 'booting' instead.
This commit is contained in:
Piotr Sarnacki 2015-01-30 11:29:43 +01:00
parent fefd18593e
commit ca659944cd
3 changed files with 7 additions and 2 deletions

View File

@ -176,3 +176,8 @@ Ember.Handlebars.registerBoundHelper 'formatLog', (log, options) ->
item = parentView.get(options.item)
Travis.Helpers.formatLog(log, repo, item) || ''
Ember.Handlebars.registerBoundHelper 'humanize-state', (state) ->
if state == 'received'
'booting'
else
state

View File

@ -6,7 +6,7 @@
</div>
<div class="right">
<div class="build-status">
{{#link-to "build" repo build}}#{{build.number}} {{build.state}}{{/link-to}}
{{#link-to "build" repo build}}#{{build.number}} {{humanize-state build.state}}{{/link-to}}
</div>
<div class="runtime">

View File

@ -7,7 +7,7 @@
</div>
<div class="right">
<div class="build-status">
{{#link-to "job" repo job}}#{{job.number}} {{job.state}}{{/link-to}}
{{#link-to "job" repo job}}#{{job.number}} {{humanize-state job.state}}{{/link-to}}
</div>
<div class="runtime">