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')
|
repo = @modelFor('repo')
|
||||||
Ajax.get("/repos/#{repo.get('id')}/caches").then( (data) ->
|
Ajax.get("/repos/#{repo.get('id')}/caches").then( (data) ->
|
||||||
groups = {}
|
groups = {}
|
||||||
|
counter = 1
|
||||||
data["caches"].forEach (cacheData) ->
|
data["caches"].forEach (cacheData) ->
|
||||||
branch = cacheData["branch"]
|
branch = cacheData["branch"]
|
||||||
group = groups[branch]
|
group = groups[branch]
|
||||||
unless group
|
unless group
|
||||||
group = groups[branch] = Ember.Object.create(branch: branch, caches: [])
|
group = groups[branch] = Ember.Object.create(branch: branch, caches: [])
|
||||||
cache = Ember.Object.create(cacheData)
|
|
||||||
cache.set('parent', group)
|
cache = Ember.Object.create(cacheData)
|
||||||
group.get('caches').pushObject(cache)
|
cache.set('parent', group)
|
||||||
|
group.get('caches').pushObject(cache)
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
for branch, caches of groups
|
for branch, caches of groups
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
overflow: auto
|
overflow: auto
|
||||||
.build-title
|
.build-title
|
||||||
float: left
|
float: left
|
||||||
margin-top: 1.1em
|
margin: 1.1em 0 .5em
|
||||||
a:hover
|
a:hover
|
||||||
text-decoration: underline
|
text-decoration: underline
|
||||||
.button--delete
|
.button--delete
|
||||||
|
|
Loading…
Reference in New Issue
Block a user