       else
         'neutral'
       $('<span>').addClass("task-lights-box box-#{status}").appendTo(boxes)
-    @$element.find('.task-lights-boxes').empty().append(boxes)
+    boxes
+
+  update: (attrs) ->
+    $.extend(this, attrs)
+    @$element.find('.task-lights-boxes').empty().append(@genBoxes())
     this
 
   fail: ->
     @$element.addClass('task-failed')
+
+class JobServerRestartTaskView extends LightsTaskView
+  constructor: (container, host) ->
+    super container, host
+    @$element.addClass("task-job-server")
+    @statuses = []
+
+  genBoxes: ->
+    boxes = document.createDocumentFragment();
+    for status in @statuses
+      box = $('<span>').addClass("task-lights-box box-#{status[0]}")
+      box.attr('title',status[1])
+      box.appendTo(boxes)
+    for i in [0...(@numLights-@statuses.length)]
+      $('<span>').addClass("task-lights-box box-neutral").appendTo(boxes)
+    boxes
+
+  addStatus: (status, note) ->
+    @statuses.push([status, note])
+
+
 
 
 restartWidget = new ContainersRestartWidget()

        return false
    toInsert.appendTo(@$container) unless inserted

  update: (attrs) ->
    $.extend(this, attrs)
    boxes = document.createDocumentFragment();
    for i in [1..(+@numLights)]
      status = if i <= @numDone

    @capistranoTask = "jobs:restart"

  createTask: (host) ->
    new JobServerRestartTaskView(@$container, host)

  parse: (parser) ->
    parser.eachMessage (log) =>
      if match = log.output.match(/sv-multi sending graceful_quit to (\d+) services/)
        @getTask(log.host).update
          numLights: match[1]
      else if match = log.output.match(/ok: run: ([\-\w\d]+): \(pid \d+\)/)
        task = @getTask(log.host)
        task.addStatus("up", match[1])
        task.update {}
      else if match = log.output.match(/Timeout: ([\-\w\d]+) still running after (\d+) seconds|timeout: run: ([\-\w\d]+): \(pid \d+\) (\d+)s/)
        task = @getTask(log.host)
        task.addStatus("partial", "timeout (#{match[2]||match[4]}s): #{match[1]||match[3]}")
        task.update {}
    null


class LightsTaskView
  TEMPLATE = $.trim """
    <div class="task-lights">
      <span class="task-lights-text">
