Merge branch 'landing-page' of github.com:travis-ci/travis-web into landing-page

This commit is contained in:
Lisa Passing 2015-04-07 16:07:08 +02:00
commit 99d609cc23
4 changed files with 25 additions and 10 deletions

View File

@ -108,12 +108,12 @@ Repo = Model.extend
).property('_lastBuildDuration', 'lastBuildStartedAt', 'lastBuildFinishedAt')
sortOrder: (->
# cuz sortAscending seems buggy when set to false
if lastBuildFinishedAt = @get('lastBuildFinishedAt')
- new Date(lastBuildFinishedAt).getTime()
state = @get('lastBuildState')
if state != 'passed' && state != 'failed'
0
else
- new Date('9999').getTime() - parseInt(@get('lastBuildId'))
).property('lastBuildFinishedAt', 'lastBuildId')
parseInt(@get('lastBuildId'))
).property('lastBuildId', 'lastBuildState')
stats: (->
if @get('slug')

View File

@ -9,10 +9,14 @@ Route = BasicRoute.extend
isLoadedBinding: 'repos.isLoaded'
repos: @store.filter 'repo', (repo) ->
buildId = repo.get('lastBuildId')
store.hasRecordForId('build', buildId)
sorted: Ember.computed.sort('repos', 'sortedReposKeys')
if store.hasRecordForId('build', buildId)
state = repo.get('lastBuild.state')
state == 'passed' || state == 'failed'
external: []
withExternal: Ember.computed.union('repos', 'external')
sorted: Ember.computed.sort('withExternal', 'sortedReposKeys')
content: limit('sorted', 'limit')
sortedReposKeys: ['sortOrder:asc']
sortedReposKeys: ['sortOrder:desc']
limit: 3
).create()
@ -22,6 +26,12 @@ Route = BasicRoute.extend
@set('letMoreReposThrough', true)
, 5000
setTimeout =>
unless repos.get('length')
@store.find('repo').then (reposFromRequest) ->
repos.get('external').pushObjects reposFromRequest.toArray().slice(0, 3)
, 10000
@_super.apply this, arguments
activate: ->
@ -40,7 +50,9 @@ Route = BasicRoute.extend
if @get('repos.length') < 3
return true
if event == 'build:started' && @get('letMoreReposThrough')
if event == 'build:finished' &&
['passed', 'failed'].indexOf(data.build.state) != -1 &&
@get('letMoreReposThrough')
@set('letMoreReposThrough', false)
return true

View File

@ -146,6 +146,9 @@
text-align: right
margin: 0
a
color: #828282
p
text-align: right
margin-top: 0.5em

View File

@ -169,7 +169,7 @@ class Travis::Web::App
end
def title
default_title = "Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community"
default_title = "Travis CI - Test and deploy your code in confidence"
ENV['SITE_TITLE'] || default_title
end