diff --git a/assets/scripts/app/store.coffee b/assets/scripts/app/store.coffee index 1c501f41..b7510573 100644 --- a/assets/scripts/app/store.coffee +++ b/assets/scripts/app/store.coffee @@ -68,6 +68,7 @@ Travis.Store = DS.Store.extend { id: id, clientId: clientId } receive: (event, data) -> + console.log event return if event == 'worker:added' || event == 'worker:removed' [name, type] = event.split(':') diff --git a/assets/scripts/app/templates/jobs/log.hbs b/assets/scripts/app/templates/jobs/log.hbs index 8d7eb442..c601a99a 100644 --- a/assets/scripts/app/templates/jobs/log.hbs +++ b/assets/scripts/app/templates/jobs/log.hbs @@ -17,7 +17,6 @@ {{/if}} To top - Download log {{else}}
Loading diff --git a/assets/scripts/app/templates/repos/show/tools.hbs b/assets/scripts/app/templates/repos/show/tools.hbs index e4057b14..cd1278ba 100644 --- a/assets/scripts/app/templates/repos/show/tools.hbs +++ b/assets/scripts/app/templates/repos/show/tools.hbs @@ -29,6 +29,11 @@ Regenerate Key {{/if}} + {{#if view.showDownloadLog}} +
  • + Download log +
  • + {{/if}}
    diff --git a/assets/scripts/app/views/repo/show.coffee b/assets/scripts/app/views/repo/show.coffee index 980a8c50..d1307db7 100644 --- a/assets/scripts/app/views/repo/show.coffee +++ b/assets/scripts/app/views/repo/show.coffee @@ -140,6 +140,20 @@ @get('isJobTab') && @get('job.isFinished') && @get('hasPermission') ).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: (-> # @get('isBuildTab') && @get('build.canCancel') && @get('hasPermission') false diff --git a/assets/styles/main/log.sass b/assets/styles/main/log.sass index 6c92767f..0710e42c 100644 --- a/assets/styles/main/log.sass +++ b/assets/styles/main/log.sass @@ -111,12 +111,12 @@ pre#log float: left margin-top: 0 color: #999 - .to-top, .download-log + .to-top float: right margin-right: 2px - color: #999 - .to-top - background: inline-image('ui/to-top.png') no-repeat right 6px padding-right: 16px - .download-log - margin-right: 10px + color: #999 + background: inline-image('ui/to-top.png') no-repeat right 6px + + +