[pro-merge] Add controllers and controller extensions from travis-pro
This commit is contained in:
parent
284734ee65
commit
8e2f8fc7f3
|
@ -42,6 +42,32 @@ Travis.FirstSyncController = Em.Controller.extend
|
||||||
|
|
||||||
Travis.IndexErrorController = Em.Controller.extend()
|
Travis.IndexErrorController = Em.Controller.extend()
|
||||||
|
|
||||||
|
Travis.QueuesController = Em.ArrayController.extend
|
||||||
|
content: (->
|
||||||
|
Travis.Job.queued()
|
||||||
|
).property()
|
||||||
|
|
||||||
|
Travis.RunningJobsController = Em.ArrayController.extend
|
||||||
|
content: (->
|
||||||
|
Travis.Job.running()
|
||||||
|
).property()
|
||||||
|
|
||||||
|
Travis.SidebarController = Em.ArrayController.extend
|
||||||
|
init: ->
|
||||||
|
@_super.apply this, arguments
|
||||||
|
@tickables = []
|
||||||
|
|
||||||
|
tips: [
|
||||||
|
"Did you know that you can parallelize tests on Travis CI? <a href=\"http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM?utm_source=tips\">Learn more</a>"
|
||||||
|
"Did you know that you can split a build into several smaller pieces? <a href=\"http://docs.travis-ci.com/user/speeding-up-the-build/#Parallelizing-your-builds-across-virtual-machines?utm_source=tips\">Learn more</a>"
|
||||||
|
"Did you know that you can skip a build? <a href=\"http://docs.travis-ci.com/user/how-to-skip-a-build/?utm_source=tips\">Learn more</a>"
|
||||||
|
]
|
||||||
|
|
||||||
|
tip: (->
|
||||||
|
if tips = @get('tips')
|
||||||
|
tips[Math.floor(Math.random()*tips.length)]
|
||||||
|
).property().volatile()
|
||||||
|
|
||||||
require 'controllers/accounts'
|
require 'controllers/accounts'
|
||||||
require 'controllers/auth'
|
require 'controllers/auth'
|
||||||
require 'controllers/account'
|
require 'controllers/account'
|
||||||
|
|
|
@ -18,3 +18,8 @@ Travis.ProfileController = Travis.Controller.extend
|
||||||
connectTab: (tab) ->
|
connectTab: (tab) ->
|
||||||
viewClass = Travis["#{$.camelize(tab)}View"]
|
viewClass = Travis["#{$.camelize(tab)}View"]
|
||||||
@set('tab', tab)
|
@set('tab', tab)
|
||||||
|
|
||||||
|
billingUrl: (->
|
||||||
|
id = if @get('account.type') == 'user' then 'user' else @get('account.login')
|
||||||
|
"#{Travis.config.billing_endpoint}/subscriptions/#{id}"
|
||||||
|
).property('account.login', 'account.type')
|
||||||
|
|
|
@ -19,3 +19,13 @@ Travis.RequestController = Ember.ObjectController.extend
|
||||||
else
|
else
|
||||||
'Rejected'
|
'Rejected'
|
||||||
).property('isAccepted')
|
).property('isAccepted')
|
||||||
|
|
||||||
|
message: (->
|
||||||
|
message = @get('model.message')
|
||||||
|
if Travis.features.pro && message == "private repository"
|
||||||
|
''
|
||||||
|
else
|
||||||
|
message
|
||||||
|
).property('model.message')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user