{% extends 'timeseer.html' %} {% from 'flows.html' import flows_breadcrumb, flows_header with context %} {% from 'macros.html' import info_popover, menu_back, visualize_score %} {% macro compare_kpi(a, b) %} {% if a == b %} = {% elif a > b %} {{ b - a }}% {% else %} +{{ b - a }}% {% endif %} {% endmacro %} {% macro compare_score(a, b, score, kpi) %} {% if a == b %} = {% elif a > b %} {{ b - a }}% {% else %} +{{ b - a }}% {% endif %} {% endmacro %} {% block styles %} {% endblock %} {% block menu %} {{ menu_back(url_for('.list_evaluations', sourcename=source_name, blockevaluationid=block_evaluation.db_id)) }} {% endblock %} {% set title = 'Compare evaluations' %} {% block breadcrumb %} {{ flows_breadcrumb(block_evaluation, [ (block_evaluation.name, url_for('flow_univariate.display_dashboard', sourcename=source_name, blockevaluationid=block_evaluation.db_id)), title, ]) }} {% endblock %} {% block main %} {{ flows_header(block_evaluation, title) }}

Comparing evaluation on {{ comparison.date|ts_datetime }} to {{ report.date|ts_datetime }} .

{{ visualize_score(comparison.score) }} {{ visualize_score(report.score) }} {{ compare_kpi(comparison.score, report.score) }}
Score {{ comparison.date|ts_datetime }} {{ report.date|ts_datetime }} Evolution
Aggregated score
{% for kpi in entries|map(attribute='kpi') %} {% if kpi in comparison.kpi_scores %} {{ visualize_score(comparison.kpi_scores[kpi]) }} {% else %} {% endif %} {% if kpi in report.kpi_scores %} {{ visualize_score(report.kpi_scores[kpi]) }} {% else %} {% endif %} {% if kpi in comparison.kpi_scores and kpi in report.kpi_scores %} {{ compare_kpi(comparison.kpi_scores[kpi], report.kpi_scores[kpi]) }} {% else %} {% endif %} {% endfor %}
KPI {{ comparison.date|ts_datetime }} {{ report.date|ts_datetime }} Evolution
{{ kpi.name }} {{ info_popover(kpi.short_help_text) }} ---
{% for kpi in entries|map(attribute='kpi') %} {% for score in report.kpi_score_scores[kpi.name]|sort(attribute='metadata.name') %} {% set comparison_scores = comparison.kpi_score_scores[kpi.name]|selectattr('metadata.name', 'eq', score.metadata.name)|list %} {% if comparison_scores|count > 0 %} {{ visualize_score(comparison_scores|first|attr('score')) }} {% else %} {% endif %} {{ visualize_score(score.score) }} {% if comparison_scores|count > 0 %} {{ compare_score(comparison_scores|first|attr('score'), score.score, score, kpi) }} {% endif %} {% endfor %}
{{ kpi.name }} {{ comparison.date|ts_datetime }} {{ report.date|ts_datetime }} Evolution
{{ score.metadata.name|capitalize }} {{ info_popover(score.metadata.short_help_text) }} -
{% endfor %}
{% endblock %}