Show download log link in the cog menu
This commit is contained in:
parent
13d752a77b
commit
a8b5460eed
|
@ -68,6 +68,7 @@ Travis.Store = DS.Store.extend
|
||||||
{ id: id, clientId: clientId }
|
{ id: id, clientId: clientId }
|
||||||
|
|
||||||
receive: (event, data) ->
|
receive: (event, data) ->
|
||||||
|
console.log event
|
||||||
return if event == 'worker:added' || event == 'worker:removed'
|
return if event == 'worker:added' || event == 'worker:removed'
|
||||||
|
|
||||||
[name, type] = event.split(':')
|
[name, type] = event.split(':')
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<a href='#' class="to-top" {{action toTop target="view"}}>To top</a>
|
<a href='#' class="to-top" {{action toTop target="view"}}>To top</a>
|
||||||
<a class="download-log" {{bindAttr href="view.plainTextLogUrl"}}>Download log</a>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div id="log" class="loading">
|
<div id="log" class="loading">
|
||||||
<span>Loading</span>
|
<span>Loading</span>
|
||||||
|
|
|
@ -29,6 +29,11 @@
|
||||||
<a href="#" name="regenerate-key" class="open-popup" {{action regenerateKeyPopup target="view"}}>Regenerate Key</a>
|
<a href="#" name="regenerate-key" class="open-popup" {{action regenerateKeyPopup target="view"}}>Regenerate Key</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#if view.showDownloadLog}}
|
||||||
|
<li>
|
||||||
|
<a class="download-log" {{bindAttr href="view.plainTextLogUrl"}}>Download log</a>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,20 @@
|
||||||
@get('isJobTab') && @get('job.isFinished') && @get('hasPermission')
|
@get('isJobTab') && @get('job.isFinished') && @get('hasPermission')
|
||||||
).property('isJobTab', 'job.isFinished', 'hasPermissions')
|
).property('isJobTab', 'job.isFinished', 'hasPermissions')
|
||||||
|
|
||||||
|
showDownloadLog: (->
|
||||||
|
@get('logId')
|
||||||
|
).property('logId')
|
||||||
|
|
||||||
|
logId: (->
|
||||||
|
@get('job.log.id') ||
|
||||||
|
(@get('build.jobs.length') == 1 && @get('build.jobs.firstObject.log.id'))
|
||||||
|
).property('job.log.id', 'build.jobs.firstObject.log.id', 'build.jobs.length')
|
||||||
|
|
||||||
|
plainTextLogUrl: (->
|
||||||
|
if id = @get('logId')
|
||||||
|
Travis.Urls.plainTextLog(id)
|
||||||
|
).property('logId')
|
||||||
|
|
||||||
canCancelBuild: (->
|
canCancelBuild: (->
|
||||||
# @get('isBuildTab') && @get('build.canCancel') && @get('hasPermission')
|
# @get('isBuildTab') && @get('build.canCancel') && @get('hasPermission')
|
||||||
false
|
false
|
||||||
|
|
|
@ -111,12 +111,12 @@ pre#log
|
||||||
float: left
|
float: left
|
||||||
margin-top: 0
|
margin-top: 0
|
||||||
color: #999
|
color: #999
|
||||||
.to-top, .download-log
|
.to-top
|
||||||
float: right
|
float: right
|
||||||
margin-right: 2px
|
margin-right: 2px
|
||||||
color: #999
|
|
||||||
.to-top
|
|
||||||
background: inline-image('ui/to-top.png') no-repeat right 6px
|
|
||||||
padding-right: 16px
|
padding-right: 16px
|
||||||
.download-log
|
color: #999
|
||||||
margin-right: 10px
|
background: inline-image('ui/to-top.png') no-repeat right 6px
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user