       $(".terminals .term-#{data.from} ul.shell-body").append "<li class='cursor'>#{msg}!</li>"
       $(".terminals .term-#{data.from} ul.shell-body").scrollTop($(".terminals .term-#{data.from} ul.shell-body")[0].scrollHeight)
 
-  headBar =
-    state: document.getElementsByClassName("tstate")[0]
-    count: document.getElementsByClassName("tsourceNum")[0]
-
   socket.on 'workerIn', (data) ->
     console.log "worker in",data
     if jobInfo.workers[data.from]

        visible: false
      jobInfo.flushDom data.from

    nodeCnt = (w for w,x of jobInfo.workers when x.active).length
    headBar.count.innerHTML = nodeCnt
    activeCnt = (w for w,x of jobInfo.workers when x.active).length

      headBar.state.innerHTML = 'running'
    else
      headBar.state.innerHTML = 'task finished'    
  ),500


