{% set multivariate_title = frame_type %} {% extends 'multivariate-layout.html' %} {% from 'macros.html' import display_event_frame_checks, bootstrap_icon, pagination %} {% macro visualize_sorting(sort_field, sort_direction, field) %} {% if sort_field == field %} {% if sort_direction == 'asc' %} {% set other_direction = 'desc' %} {% else %} {% set other_direction = 'asc' %} {% endif %} {{ caller() }} {% if sort_direction == 'desc' %} {{ bootstrap_icon('caret-down-fill') }} {% else %} {{ bootstrap_icon('caret-up-fill') }} {% endif %} {% else %} {{ caller() }} {% if sort_direction == 'desc' %} {{ bootstrap_icon('caret-down', 'text-secondary') }} {% else %} {{ bootstrap_icon('caret-up', 'text-secondary') }} {% endif %} {% endif %} {% endmacro %} {% block menu %} {{ multivariate_menu('Event frames') }} {% endblock %} {% block multivariate_content %} {% if checks_metadata|count > 0 %} {{ display_event_frame_checks(checks_metadata) }} {% endif %} {{ pagination( paging, url_for('.show_event_frames', blockevaluationid=block_evaluation.db_id, flowname=flow.name, type=frame_type, page=paging.page-1, sort=sort_field, direction=sort_direction, sourcename=source_name), url_for('.show_event_frames', blockevaluationid=block_evaluation.db_id, flowname=flow.name, type=frame_type, page=paging.page+1, sort=sort_field, direction=sort_direction, sourcename=source_name) ) }} {% for frame in event_frames %} {% if frame.end_date is not none %} {% else %} {% endif %} {% endfor %}
{% call visualize_sorting(sort_field, sort_direction, 'start_date') %} Start date {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'end_date') %} End date {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'duration') %} Duration {% endcall %}
{{ frame.start_date|datetimeformat }}{{ frame.end_date|datetimeformat }} {{ (frame.end_date - frame.start_date)|timedeltaformat }}- -
{{ pagination( paging, url_for('.show_event_frames', blockevaluationid=block_evaluation.db_id, flowname=flow.name, type=frame_type, page=paging.page-1, sort=sort_field, direction=sort_direction, sourcename=source_name), url_for('.show_event_frames', blockevaluationid=block_evaluation.db_id, flowname=flow.name, type=frame_type, page=paging.page+1, sort=sort_field, direction=sort_direction, sourcename=source_name) ) }} {% endblock %}