       @div class: 'actions', =>
         @div class: 'pull-left',outlet:"closebutton", =>
           @button 'Close', click: 'destroy', class: 'inline-block-tight btn'
-        
+
         @div class: 'pull-right',outlet:"refreshbutton", =>
+          @button 'Cancel', click: 'cancel', class: 'inline-block-tight btn'
           @button 'Refresh', click: 'refreshTaskState', class: 'inline-block-tight btn'
-        @div class: 'pull-right',outlet:"cancelbutton", =>
-          @button 'Cancel', click: 'cancel', class: 'inline-block-tight btn'
 
   initialize: ->
 

        console.log "task #{@task.id} deleted."
      .catch ->
        console.error "failed to delete task #{@task.id}"
    

      #   @find('.task-state').text job.state
      #   @showState(job)

    @socket.on 'stdout', (out) => @console.append(out.content)

    @socket.on 'stderr', (out) => @console.append(out.content, 'text-error')

  destroy: ->
    @remove()
