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')
|
data = @get('model')
|
||||||
|
|
||||||
repos = data.repositories.filter (item, index) ->
|
repos = data.repositories.filter (item, index) ->
|
||||||
if item.default_branch.last_build
|
if item.active
|
||||||
|
console.log(item)
|
||||||
item
|
item
|
||||||
repos.sortBy('default_branch.last_build.finished_at').reverse()
|
repos.sortBy('default_branch.last_build.finished_at').reverse()
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Route = TravisRoute.extend
|
||||||
options = {}
|
options = {}
|
||||||
if @get('auth.signedIn')
|
if @get('auth.signedIn')
|
||||||
options.headers = { Authorization: "token #{@auth.token()}" }
|
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: ->
|
beforeModel: ->
|
||||||
@controllerFor('loading').set('layoutName', 'simple')
|
@controllerFor('loading').set('layoutName', 'simple')
|
||||||
|
|
|
@ -13,6 +13,7 @@ Route = TravisRoute.extend
|
||||||
options = {}
|
options = {}
|
||||||
if @get('auth.signedIn')
|
if @get('auth.signedIn')
|
||||||
options.headers = { Authorization: "token #{@auth.token()}" }
|
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`
|
`export default Route`
|
||||||
|
|
|
@ -96,5 +96,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p>there is no build</p>
|
<p class="row-item">There is no build on the default branch yet.</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user