travis-web/app/templates/repo.hbs
Piotr Sarnacki 2d0aee4e68 Fix status images popup
After recent refactorings status images popup started to fetch branches
info whenever a repo page was opened, resulting in additional HTTP
requests. Furthermore, because of a way we load branches, it could
result in builds view displaying very old builds, because in API V2 we
essentially download last build for each branch for branches request.

This commit fixes the situation in 2 ways:

1. We wait with downloading branhes till the popup is open
2. We use a V3 requests to download branches and we don't put that data
into the store
2016-01-18 13:14:28 +01:00

46 lines
1.4 KiB
Handlebars

{{#repo-wrapper repo=repo isLoading=isLoading}}
{{#if isEmpty}}
{{repos-empty}}
{{else}}
{{#if repo.isLoaded}}
<article class="repo-header">
<header>
<h1 class="repo-title">{{#link-to "owner" repo.owner}}{{repo.owner}}{{/link-to}} / {{#link-to "repo" repo}}{{repo.name}}{{/link-to}}</h1>
<div class="repo-gh">
<a href="{{urlGithub}}" title="{{repo.name}} on Github">{{repo.name}} on Github</a>
</div>
<div class="repo-badge">
<a href="#" id="status-image-popup" title="build status image" name="status-images" class="open-popup" {{action "statusImages"}}>
<img src={{statusImageUrl}} alt="Build Status Images"/>
</a>
</div>
</header>
<main class="repo-main">
<div class="repo-navigation">
{{repo-show-tools repo=repo build=build job=job tab=tab currentUser=auth.currentUser}}
{{repo-show-tabs repo=repo tab=tab build=build job=job}}
</div>
<div class="tabbody repo-body">
{{#if showCurrentBuild}}
{{outlet}}
{{else}}
{{#if repo.lastBuildId}}
{{not-active user=currentUser repo=repo}}
{{else}}
{{no-builds}}
{{/if}}
{{/if}}
</div>
</main>
</article>
{{else}}
{{loading-indicator}}
{{/if}}
{{/if}}
{{/repo-wrapper}}
{{status-images repo=repo}}