only show one (biggest) cache per branch
This commit is contained in:
parent
bcfa16a500
commit
a78e226de1
|
@ -12,14 +12,16 @@ 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)
|
||||
|
||||
cache = Ember.Object.create(cacheData)
|
||||
cache.set('parent', group)
|
||||
group.get('caches').pushObject(cache)
|
||||
|
||||
result = []
|
||||
for branch, caches of groups
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user