${history.name}
${h.date.distance_of_time_in_words( history.update_time, h.date.datetime.utcnow() )} ago
<%
total_ok = sum( 1 for d in history.active_datasets if d.state == 'ok' )
total_running = sum( 1 for d in history.active_datasets if d.state == 'running' )
total_queued = sum( 1 for d in history.active_datasets if d.state == 'queued' )
total_error = sum( 1 for d in history.active_datasets if d.state in ( 'error', 'fail' ) )
parts = []
if total_ok:
parts.append( "" + str(total_ok) + " finished" )
if total_queued:
parts.append( "" + str(total_queued) + " queued" )
if total_running:
parts.append( "" + str(total_running) + " running" )
if total_error:
parts.append( "" + str(total_error) + " failed" )
%>
${", ".join( parts )}