Revert "Make sorting more in line with what we will do on a server"
This makes the timeline ordering odd when restarting: The repo will be
sorted to be bottom of the timeline while in :created state, and then
pops back up to the top when :started.
One weird thing is that it only seems to behave this way on com
(staging) and enterprise, but not on org (staging).
This reverts commit ce8237b4e7
.
This commit is contained in:
parent
bb034704d2
commit
b348ee0e40
|
@ -108,17 +108,12 @@ require 'travis/model'
|
||||||
).property('_lastBuildDuration', 'lastBuildStartedAt', 'lastBuildFinishedAt')
|
).property('_lastBuildDuration', 'lastBuildStartedAt', 'lastBuildFinishedAt')
|
||||||
|
|
||||||
sortOrder: (->
|
sortOrder: (->
|
||||||
# this is prepared for ascending sort
|
# cuz sortAscending seems buggy when set to false
|
||||||
if Ember.isNone(@get('lastBuildFinishedAt')) && @get('lastBuildStartedAt')
|
if lastBuildFinishedAt = @get('lastBuildFinishedAt')
|
||||||
# if a build is running, it should be at the beginning
|
- new Date(lastBuildFinishedAt).getTime()
|
||||||
0
|
|
||||||
else if lastBuildStartedAt = @get('lastBuildStartedAt')
|
|
||||||
# if it's not running, but was already run, put newest builds first
|
|
||||||
new Date('9999').getTime() - Date.parse(lastBuildStartedAt)
|
|
||||||
else
|
else
|
||||||
# if it's not started nor it was ran before, sort with newest id first
|
- new Date('9999').getTime() - parseInt(@get('lastBuildId'))
|
||||||
new Date('9999').getTime() - @get('id')
|
).property('lastBuildFinishedAt', 'lastBuildId')
|
||||||
).property('lastBuildFinishedAt', 'id', 'lastBuildStartedAt')
|
|
||||||
|
|
||||||
stats: (->
|
stats: (->
|
||||||
if @get('slug')
|
if @get('slug')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user