{{! Finalize reporting for a finished workunit. }}
<script>
  $('#{{workunit.id}}-header-text').addClass('{{status}}');
  $('#{{workunit.id}}-spinner').hide();
  $('#{{workunit.id}}-timer').html('{{timing}}s');
  {{^aborted}}{{#unaccounted_time}}$('#{{workunit.id}}-unaccounted-time').html('(Unaccounted: {{.}}s)').show();{{/unaccounted_time}}{{/aborted}}
  {{#aborted}}$('#{{workunit.id}}-aborted').show();{{/aborted}}

  $(function(){
    {{! Stop client-side timer. Note that we can get the completed workunit's timing from the server now.}}
    pants.timerManager.stopTimer('{{workunit.id}}');
  });
</script>
