Don't instantiate builds for repos list to not load them
This commit is contained in:
parent
40260c17d5
commit
5fc58e34dc
|
@ -178,6 +178,12 @@ Travis.Router = Ember.Router.extend
|
||||||
router.get('repositoryController').set 'build', build
|
router.get('repositoryController').set 'build', build
|
||||||
router.get('repositoryController').activate 'build'
|
router.get('repositoryController').activate 'build'
|
||||||
|
|
||||||
|
serialize: (router, build) ->
|
||||||
|
if build.get
|
||||||
|
{ id: build.get('id') }
|
||||||
|
else
|
||||||
|
{ id: build }
|
||||||
|
|
||||||
deserialize: (router, params) ->
|
deserialize: (router, params) ->
|
||||||
# Something is wrong here. If I don't use deferred, id is not
|
# Something is wrong here. If I don't use deferred, id is not
|
||||||
# initialized and url ends up being /jobs/null
|
# initialized and url ends up being /jobs/null
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
<a {{action showRepository this href=true}} class="slug">{{slug}}</a>
|
<a {{action showRepository this href=true}} class="slug">{{slug}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{#if lastBuild.id}}
|
{{#if lastBuildId}}
|
||||||
<a {{action showBuild this lastBuild href=true}} class="last_build">{{lastBuildNumber}}</a>
|
<a {{action showBuild this lastBuildId href=true}} class="last_build">{{lastBuildNumber}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<p class="summary">
|
<p class="summary">
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user