     else
       @build_num
 
-
+  pusherChannelName: () =>
+    "private-#{@project_name()}/#{@build_num}"
+
+  update: (json) =>
+    @status(json.status)
+
+  updateNode: (json) =>
+    switch json.type
+      when "add" then @nodes[json.index].addLog(json)
+      when "update" then @nodes[json.index].updateLog(json)
 
 
 class Project extends HasUrl

      "<span class='#{o.type}'>#{@htmlEscape(o.message)}</span>"
    x.join ""



class Node extends Base

    $.getJSON "/api/v1/project/#{project_name}/#{build_num}", (data) =>
      start_time = Date.now()
      @build(new Build data)
      @build_channel = @pusher.subscribe(@build().pusherChannelName())
      @build_channel.bind('pusher:subscription_error', (status) -> notifyError status)

      window.time_taken_build = Date.now() - start_time


    display "build", {project: project_name, build_num: build_num}


