prepare for 5 builds per branch request

This commit is contained in:
Lisa P 2015-09-08 18:21:44 +02:00
parent fe67ce0882
commit a00704943a
4 changed files with 29 additions and 25 deletions

View File

@ -17,6 +17,14 @@ BranchRowComponent = Ember.Component.extend
getLast5Builds: (->
array = [{}, {}, {}, {}, {}]
if @get('build.last_build') == null
@set('isLoading', false)
array
else
array
# apiEndpoint = config.apiEndpoint
# repoId = @get('build.repository.id')
@ -29,4 +37,14 @@ BranchRowComponent = Ember.Component.extend
# @set('isLoading', false)
).property('build')
actions:
tiggerBuild: (branch) ->
console.log('trigger build')
viewAllBuilds: (branch) ->
console.log('view all builds')
# updateFilter: (value) ->
# @set('_lastFilterValue', value)
# Ember.run.throttle this, @updateFilter, [], 200, false
`export default BranchRowComponent`

View File

@ -22,14 +22,4 @@ BranchesController = Ember.Controller.extend
item if item.exists_on_github == false
).property('model')
actions:
tiggerBuild: (branch) ->
console.log('trigger build')
viewAllBuilds: (branch) ->
console.log('view all builds')
# updateFilter: (value) ->
# @set('_lastFilterValue', value)
# Ember.run.throttle this, @updateFilter, [], 200, false
`export default BranchesController`

View File

@ -163,14 +163,8 @@
</div>
<div class="one-line">
<ul class="build-tiles">
{{#unless isLoading }}
<ul class="build-tiles">
{{#each buildTile in getLast5Builds}}
{{build-tile build=buildTile}}
{{/each}}
</ul>
{{else}}
{{loading-indicator}}
{{/unless}}
{{#each buildTile in getLast5Builds}}
{{build-tile build=buildTile}}
{{/each}}
</ul>
</div>

View File

@ -1,6 +1,8 @@
<a href="#" class="dropup-trigger">
{{status-icon build=build}}
<div class="dropup--status">
{{request-icon build=build}} #{{build.number}}
</div>
</a>
{{#unless build}}
<a href="#" class="dropup-trigger">
{{status-icon build=build}}
<div class="dropup--status">
{{request-icon build=build}} #{{build.number}}
</div>
</a>
{{/unless}}