{% extends 'timeseer.html' %}
{% from 'data-service-header.html' import data_service_breadcrumb, data_service_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_bins', sourcename=source_name, binid=current_bin.db_id)) }}
{% endblock %}
{% set title = 'Compare bins' %}
{% block breadcrumb %}
{{
data_service_breadcrumb(current_bin, [
('Bins', url_for('.list_bins', sourcename=source_name, binid=current_bin.db_id)),
title
])
}}
{% endblock %}
{% block main %}
{{ data_service_header(current_bin, title) }}
Comparing evaluation on
{{ comparison.date|ts_datetime }}
to
{{ report.date|ts_datetime }}
.
Score |
{{ comparison.date|ts_datetime }} |
{{ report.date|ts_datetime }} |
Evolution |
Aggregated score |
{{ visualize_score(comparison.score) }}
{{ visualize_score(report.score) }}
{{ compare_kpi(comparison.score, report.score) }}
KPI |
{{ comparison.date|ts_datetime }} |
{{ report.date|ts_datetime }} |
Evolution |
{% for kpi in entries|map(attribute='kpi') %}
{{ kpi.name }}
{% if kpi.short_help_text %}
{{ info_popover(kpi.short_help_text) }}
{% endif %}
|
{% 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 %}
{% for kpi in entries|map(attribute='kpi') %}
{{ kpi.name }} |
{{ comparison.date|ts_datetime }} |
{{ report.date|ts_datetime }} |
Evolution |
{% for score in report.kpi_score_scores[kpi.name]|sort(attribute='metadata.name') %}
{{ score.metadata.name|capitalize }}
{{ info_popover(score.metadata.short_help_text) }}
|
{% 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 %}
{% endfor %}
{% endblock %}