Fix download log link after log changes

This commit is contained in:
Piotr Sarnacki 2013-01-30 02:15:11 +01:00
parent 9df79d6944
commit ead17606b5
2 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
@Travis.Urls = @Travis.Urls =
plainTextLog: (id) -> plainTextLog: (id) ->
"#{Travis.config.api_endpoint}/artifacts/#{id}.txt?deansi=true" "#{Travis.config.api_endpoint}/jobs/#{id}/log.txt?deansi=true"
githubPullRequest: (slug, pullRequestNumber) -> githubPullRequest: (slug, pullRequestNumber) ->
"http://github.com/#{slug}/pull/#{pullRequestNumber}" "http://github.com/#{slug}/pull/#{pullRequestNumber}"

View File

@ -146,18 +146,18 @@
).property('isJobTab', 'job.isFinished', 'hasPermissions') ).property('isJobTab', 'job.isFinished', 'hasPermissions')
showDownloadLog: (-> showDownloadLog: (->
@get('logId') @get('jobIdForLog')
).property('logId') ).property('jobIdForLog')
logId: (-> jobIdForLog: (->
@get('job.log.id') || @get('job.id') ||
(@get('build.jobs.length') == 1 && @get('build.jobs.firstObject.log.id')) (@get('build.jobs.length') == 1 && @get('build.jobs.firstObject.id'))
).property('job.log.id', 'build.jobs.firstObject.log.id', 'build.jobs.length') ).property('job.id', 'build.jobs.firstObject.id', 'build.jobs.length')
plainTextLogUrl: (-> plainTextLogUrl: (->
if id = @get('logId') if id = @get('jobIdForLog')
Travis.Urls.plainTextLog(id) Travis.Urls.plainTextLog(id)
).property('logId') ).property('jobIdForLog')
canCancelBuild: (-> canCancelBuild: (->
# @get('isBuildTab') && @get('build.canCancel') && @get('hasPermission') # @get('isBuildTab') && @get('build.canCancel') && @get('hasPermission')