Add download log link at the bottom of the log

This commit is contained in:
Piotr Sarnacki 2013-01-15 13:14:48 +01:00
parent e40fa3b26d
commit 98e6503e73
4 changed files with 13 additions and 5 deletions

View File

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

View File

@ -17,6 +17,7 @@
{{/if}}
<a href='#' class="to-top" {{action toTop target="view"}}>To top</a>
<a class="download-log" {{bindAttr href="view.plainTextLogUrl"}}>Download log</a>
{{else}}
<div id="log" class="loading">
<span>Loading</span>

View File

@ -42,6 +42,11 @@
templateName: 'jobs/log'
logBinding: 'job.log'
plainTextLogUrl: (->
if id = @get('job.log.id')
Travis.Urls.plainTextLog(id)
).property('job.log')
didInsertElement: ->
@_super.apply this, arguments
@tryScrollingToHashLineNumber()

View File

@ -111,12 +111,12 @@ pre#log
float: left
margin-top: 0
color: #999
.to-top
.to-top, .download-log
float: right
margin-right: 2px
padding-right: 16px
color: #999
.to-top
background: inline-image('ui/to-top.png') no-repeat right 6px
padding-right: 16px
.download-log
margin-right: 10px