Quick crude and hackish version of running jobs
This commit is contained in:
parent
69d6f9e8a1
commit
55fd558eb0
app
|
@ -7,6 +7,13 @@ Controller = Ember.ArrayController.extend
|
||||||
activate: (name) ->
|
activate: (name) ->
|
||||||
@activate(name)
|
@activate(name)
|
||||||
|
|
||||||
|
showRunningJobs: ->
|
||||||
|
@activate('running')
|
||||||
|
|
||||||
|
showMyRepositories: ->
|
||||||
|
@activate('owned')
|
||||||
|
|
||||||
|
|
||||||
tabOrIsLoadedDidChange: (->
|
tabOrIsLoadedDidChange: (->
|
||||||
@possiblyRedirectToGettingStartedPage()
|
@possiblyRedirectToGettingStartedPage()
|
||||||
).observes('isLoaded', 'tab', 'length')
|
).observes('isLoaded', 'tab', 'length')
|
||||||
|
@ -57,6 +64,8 @@ Controller = Ember.ArrayController.extend
|
||||||
viewOwned: ->
|
viewOwned: ->
|
||||||
@set('content', @get('userRepos'))
|
@set('content', @get('userRepos'))
|
||||||
|
|
||||||
|
viewRunning: ->
|
||||||
|
|
||||||
userRepos: (->
|
userRepos: (->
|
||||||
if login = @get('currentUser.login')
|
if login = @get('currentUser.login')
|
||||||
Repo.accessibleBy(@store, login)
|
Repo.accessibleBy(@store, login)
|
||||||
|
@ -91,4 +100,8 @@ Controller = Ember.ArrayController.extend
|
||||||
'Could not find any repos'
|
'Could not find any repos'
|
||||||
).property('tab')
|
).property('tab')
|
||||||
|
|
||||||
|
showRunningJobs: (->
|
||||||
|
@get('tab') == 'running'
|
||||||
|
).property('tab')
|
||||||
|
|
||||||
`export default Controller`
|
`export default Controller`
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
|
|
||||||
{{view 'repos-list-tabs'}}
|
{{view 'repos-list-tabs'}}
|
||||||
|
|
||||||
|
{{#if showRunningJobs}}
|
||||||
|
<div class="tab">
|
||||||
|
Running jobs will go here
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
{{#if isLoaded}}
|
{{#if isLoaded}}
|
||||||
{{#collection 'repos-list' content=this}}
|
{{#collection 'repos-list' content=this}}
|
||||||
|
@ -47,3 +52,4 @@
|
||||||
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>
|
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<ul class="tabs">
|
<ul class="tabs">
|
||||||
<li id="tab_owned" {{bind-attr class="view.classOwned"}}>
|
<li id="tab_owned" {{bind-attr class="view.classOwned"}}>
|
||||||
<h5>{{#link-to "main.repositories"}}My Repositories{{/link-to}}</h5>
|
<h5><a href="#" {{action "showMyRepositories"}}>My Repositories</a></h5>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{#unless config.pro}}
|
{{#unless config.pro}}
|
||||||
|
@ -9,10 +9,11 @@
|
||||||
</li>
|
</li>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
<li id="tab_search" {{bind-attr class="view.classSearch"}}>
|
<li id="tab_running" {{bind-attr class="view.classRunning"}}>
|
||||||
<h5>Search</h5>
|
<h5><a href="#" {{action "showRunningJobs"}}>Run</a></h5>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="tab_new" {{bind-attr class="view.classNew"}}>
|
<li id="tab_new" {{bind-attr class="view.classNew"}}>
|
||||||
<h5>{{#link-to "profile" trackEvent="add-repository-from-list" title="Add New Repository"}}+{{/link-to}}</h5>
|
<h5>{{#link-to "profile" trackEvent="add-repository-from-list" title="Add New Repository"}}+{{/link-to}}</h5>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -12,6 +12,12 @@ View = Ember.View.extend
|
||||||
'hidden'
|
'hidden'
|
||||||
).property('tab')
|
).property('tab')
|
||||||
|
|
||||||
|
classRunning: (->
|
||||||
|
classes = []
|
||||||
|
classes.push('active') if @get('tab') == 'running'
|
||||||
|
classes.join(' ')
|
||||||
|
).property('tab')
|
||||||
|
|
||||||
classOwned: (->
|
classOwned: (->
|
||||||
classes = []
|
classes = []
|
||||||
classes.push('active') if @get('tab') == 'owned'
|
classes.push('active') if @get('tab') == 'owned'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user