[pro-merge] Add token to log urls when in pro mode
This commit is contained in:
parent
73f06eba0f
commit
23dd688d09
|
@ -103,8 +103,12 @@ Travis.reopen
|
||||||
).property()
|
).property()
|
||||||
|
|
||||||
plainTextLogUrl: (->
|
plainTextLogUrl: (->
|
||||||
Travis.Urls.plainTextLog(id) if id = @get('log.job.id')
|
if id = @get('log.job.id')
|
||||||
).property('job.log.id')
|
url = Travis.Urls.plainTextLog(id)
|
||||||
|
if Travis.config.pro
|
||||||
|
url += "&access_token=#{@get('job.log.token')}"
|
||||||
|
url
|
||||||
|
).property('job.log.id', 'job.log.token')
|
||||||
|
|
||||||
toggleTailing: ->
|
toggleTailing: ->
|
||||||
Travis.tailing.toggle()
|
Travis.tailing.toggle()
|
||||||
|
|
|
@ -257,10 +257,20 @@ Travis.reopen
|
||||||
(@get('build.jobs.length') == 1 && @get('build.jobs.firstObject.id'))
|
(@get('build.jobs.length') == 1 && @get('build.jobs.firstObject.id'))
|
||||||
).property('job.id', 'build.jobs.firstObject.id', 'build.jobs.length')
|
).property('job.id', 'build.jobs.firstObject.id', 'build.jobs.length')
|
||||||
|
|
||||||
|
job: (->
|
||||||
|
if id = @get('jobIdForLog')
|
||||||
|
Travis.Job.find(id)
|
||||||
|
).property('jobIdForLog')
|
||||||
|
|
||||||
|
|
||||||
plainTextLogUrl: (->
|
plainTextLogUrl: (->
|
||||||
if id = @get('jobIdForLog')
|
if id = @get('jobIdForLog')
|
||||||
Travis.Urls.plainTextLog(id)
|
url = Travis.Urls.plainTextLog(id)
|
||||||
).property('jobIdForLog')
|
if Travis.config.pro
|
||||||
|
token = @get('job.log.token') || @get('build.jobs.firstObject.log.token')
|
||||||
|
url += "&access_token=#{token}"
|
||||||
|
url
|
||||||
|
).property('jobIdForLog', 'job.log.token', 'build.jobs.firstObject.log.token')
|
||||||
|
|
||||||
canRemoveLog: (->
|
canRemoveLog: (->
|
||||||
@get('displayRemoveLog') && @get('hasPermission')
|
@get('displayRemoveLog') && @get('hasPermission')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user