fix owner page after api cleanup
This commit is contained in:
parent
7d6dd75bdf
commit
860e89dd86
|
@ -8,7 +8,8 @@ Controller = Ember.Controller.extend
|
|||
data = @get('model')
|
||||
|
||||
repos = data.repositories.filter (item, index) ->
|
||||
if item.default_branch.last_build
|
||||
if item.active
|
||||
console.log(item)
|
||||
item
|
||||
repos.sortBy('default_branch.last_build.finished_at').reverse()
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Route = TravisRoute.extend
|
|||
options = {}
|
||||
if @get('auth.signedIn')
|
||||
options.headers = { Authorization: "token #{@auth.token()}" }
|
||||
$.ajax(config.apiEndpoint + "/v3/owner/#{params.owner}", options)
|
||||
$.ajax(config.apiEndpoint + "/v3/owner/#{params.owner}?include=organization.repositories,repository.default_branch,build.commit", options)
|
||||
|
||||
beforeModel: ->
|
||||
@controllerFor('loading').set('layoutName', 'simple')
|
||||
|
|
|
@ -13,6 +13,7 @@ Route = TravisRoute.extend
|
|||
options = {}
|
||||
if @get('auth.signedIn')
|
||||
options.headers = { Authorization: "token #{@auth.token()}" }
|
||||
$.ajax(config.apiEndpoint + "/v3/owner/#{transition.params.owner.owner}?include=user.repositories,organization.repositories,build.commit,repository.active", options)
|
||||
$.ajax(config.apiEndpoint + "/v3/owner/#{transition.params.owner.owner}?include=organization.repositories,repository.default_branch,build.commit", options).then (response) ->
|
||||
response
|
||||
|
||||
`export default Route`
|
||||
|
|
|
@ -96,5 +96,5 @@
|
|||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<p>there is no build</p>
|
||||
<p class="row-item">There is no build on the default branch yet.</p>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user