<%! from crab import CrabEvent, CrabStatus %> % for event in events: % if event["type"] == 1: % elif event["type"] == 2: % elif event["type"] == 3: % else: % endif % if event["status"] is None: ${CrabEvent.get_name(event['type']) | h} % else: <% if CrabStatus.is_trivial(event['status']): cell_class = 'status_trivial' elif CrabStatus.is_ok(event['status']): cell_class = 'status_ok' elif CrabStatus.is_warning(event['status']): cell_class = 'status_warn' elif CrabStatus.is_error(event['status']): cell_class = 'status_fail' else: cell_class = 'status_warn' if event['type'] == CrabEvent.FINISH: cell_link = '/job/' + str(id) + '/output/' + str(event['eventid']) else: cell_link = None cell_text = CrabStatus.get_name(event['status']) %> % if cell_link is None: ${cell_text | h} % else: ${cell_text | h} % endif % endif ${event["datetime"] | h} % if event["command"] is not None: ${event["command"] | h} % else:   % endif % if event.get('duration') is None:   % else: ${event['duration'] | h} % endif % endfor