diff --git a/app/controllers/repos.coffee b/app/controllers/repos.coffee index 5299869a..13264e08 100644 --- a/app/controllers/repos.coffee +++ b/app/controllers/repos.coffee @@ -7,6 +7,13 @@ Controller = Ember.ArrayController.extend activate: (name) -> @activate(name) + showRunningJobs: -> + @activate('running') + + showMyRepositories: -> + @activate('owned') + + tabOrIsLoadedDidChange: (-> @possiblyRedirectToGettingStartedPage() ).observes('isLoaded', 'tab', 'length') @@ -57,6 +64,8 @@ Controller = Ember.ArrayController.extend viewOwned: -> @set('content', @get('userRepos')) + viewRunning: -> + userRepos: (-> if login = @get('currentUser.login') Repo.accessibleBy(@store, login) @@ -91,4 +100,8 @@ Controller = Ember.ArrayController.extend 'Could not find any repos' ).property('tab') + showRunningJobs: (-> + @get('tab') == 'running' + ).property('tab') + `export default Controller` diff --git a/app/templates/repos.hbs b/app/templates/repos.hbs index f23932e2..5250a70c 100644 --- a/app/templates/repos.hbs +++ b/app/templates/repos.hbs @@ -4,46 +4,52 @@ {{view 'repos-list-tabs'}} -
+ Duration: + + {{format-duration repo.lastBuildDuration}} + +
++ Finished: + + {{format-time repo.lastBuildFinishedAt}} + +
{{/if}} + +- Duration: - - {{format-duration repo.lastBuildDuration}} - -
-- Finished: - - {{format-time repo.lastBuildFinishedAt}} - -
- {{/if}} - -{{noReposMessage}}
+ {{/collection}} {{else}} -{{noReposMessage}}
- {{/collection}} - {{else}} - - {{/if}} -