{% macro default_run_table(runs, DefaultConditions, search_boxes=false) %} {% set now_time = datetime_now() %} {% for run in runs %} {% set conditions_by_name = run.get_conditions_by_name() %} {% set is_valid_run_end = (conditions_by_name[DefaultConditions.IS_VALID_RUN_END].value) if (DefaultConditions.IS_VALID_RUN_END in conditions_by_name) else False%} {% set is_active_run = True if (run.end_time and not is_valid_run_end and loop.index == 1) and (now_time - run.end_time).total_seconds()<180 else False %} {% set is_crashed_run = (not is_active_run) and (not is_valid_run_end) %} {% set crashed_run_class = 'crashed_run' if is_crashed_run else '' %} {% set active_run_class = 'active_run' if is_active_run else '' %} {% endfor %}
Number
Start time
Length
Events
Run config
Run type
Comment
{{ run.start_time }} {% if run.end_time and run.start_time %} {{ run.end_time - run.start_time }} {% endif %} {% if DefaultConditions.EVENT_COUNT in conditions_by_name %} {{ conditions_by_name[DefaultConditions.EVENT_COUNT].value }} {% else %} -1 {% endif %} {% if DefaultConditions.RUN_CONFIG in conditions_by_name %} {{ conditions_by_name[DefaultConditions.RUN_CONFIG].value|remove_dot_conf }} {% endif %} {% if DefaultConditions.RUN_TYPE in conditions_by_name %} {{ conditions_by_name[DefaultConditions.RUN_TYPE].value|remove_dot_conf }} {% endif %} {% if DefaultConditions.USER_COMMENT in conditions_by_name %} {{ conditions_by_name[DefaultConditions.USER_COMMENT].value }} {% endif %}
{% endmacro %}