           else
             Travis.flash(error: 'An error occured when canceling the build')
 
+
+    removeLog: ->
+      @popupCloseAll()
+      if @get('canRemoveLog')
+        job = @get('_job') || @get('build.jobs.firstObject')
+        job.removeLog().then ->
+          Travis.flash(success: 'Log has been successfully removed.')
+        , (xhr) ->
+          if xhr.status == 409
+            Travis.flash(error: 'Log can\'t be removed')
+          else if xhr.status == 401
+            Travis.flash(error: 'You don\'t have sufficient access to remove the log')
+          else
+            Travis.flash(error: 'An error occured when removing the log')
 
     cancelJob: ->
       if @get('canCancelJob')

    @get('displayRequeueJob') && @get('hasPermission')
  ).property('displayRequeueJob', 'hasPermission')

  canCancelBuild: (->
    @get('displayCancelBuild') && @get('hasPermission')
  ).property('displayCancelBuild', 'hasPermission')

`import Ember from 'ember'`
`import { plainTextLog as plainTextLogUrl } from 'travis/utils/urls'`
`import Job from 'travis/models/job'`
`import config from 'travis/config/environment'`
`import BasicView from 'travis/views/basic'`
