only show one (biggest) cache per branch

This commit is contained in:
Lisa Passing 2015-04-14 12:19:07 +02:00
parent bcfa16a500
commit a78e226de1
2 changed files with 6 additions and 4 deletions

View File

@ -12,11 +12,13 @@ Route = TravisRoute.extend
repo = @modelFor('repo')
Ajax.get("/repos/#{repo.get('id')}/caches").then( (data) ->
groups = {}
counter = 1
data["caches"].forEach (cacheData) ->
branch = cacheData["branch"]
group = groups[branch]
unless group
group = groups[branch] = Ember.Object.create(branch: branch, caches: [])
cache = Ember.Object.create(cacheData)
cache.set('parent', group)
group.get('caches').pushObject(cache)

View File

@ -38,7 +38,7 @@
overflow: auto
.build-title
float: left
margin-top: 1.1em
margin: 1.1em 0 .5em
a:hover
text-decoration: underline
.button--delete