<%inherit file="base.html"/>
<%
import itertools
c = itertools.cycle(['odd','even'])
%>
<h2>${app['name']} (${app['id']})</h2>
<table id="failed">

% for f in failed:
  <%
    color_class = c.next()
  %>
 <tr class="${f['id']} data ${color_class}" data-fid="${f['id']}">
     <td>${f['id']}</td>
     <td>${f['response']['status']}</td>
     <td>${f.get('time')}</td>
     <td>${f['response'].get('error_type')}</td>
     <td>${f['response'].get('error_value')}</td>
     <td><pre>${f['response'].get('traceback')}</pre></td>
 </tr>
 <tr class="${f['id']} actions ${color_class}" data-fid="${f['id']}">
   <td colspan="6">
     <small>
       [ <a class="action requeue" data-action="reqeue" href="/failed/requeue?id=${app['id']}&amp;fid=${f['id']}">requeue</a> ]
       [ <a class="action remove" data-action="remove" href="/failed/remove?id=${app['id']}&amp;fid=${f['id']}">remove</a> ]
    </small>
   </td>
 </tr>
 <tr class="${f['id']} log ${color_class}" data-fid="${f['id']}"><td colspan="6"></td></tr>
% endfor
</table>
