diff --git a/app/app.py b/app/app.py index 89701fe..ab6ecc2 100644 --- a/app/app.py +++ b/app/app.py @@ -81,6 +81,16 @@ def appci_compare(ref, target): ref_r.level_compare = next((r.level for r in target_results if r.app == ref_r.app), -1) + if ref_r.level == -1 or ref_r.level_compare == -1: + ref_r.compare = "unknown" + elif ref_r.level == ref_r.level_compare: + ref_r.compare = "same" + elif ref_r.level > ref_r.level_compare: + ref_r.compare = "regression" + elif ref_r.level < ref_r.level_compare: + ref_r.compare = "improvement" + else: + ref_r.compare = "unknown" return render_template("appci_compare.html", ref=ref, target=target, diff --git a/app/templates/appci_compare.html b/app/templates/appci_compare.html index ea4093b..bd494e9 100644 --- a/app/templates/appci_compare.html +++ b/app/templates/appci_compare.html @@ -2,6 +2,7 @@ {% block content %}

{{ ref.display_name }} vs. {{ target.display_name }}

+
@@ -17,7 +18,7 @@ {% for result in results %} - + {% if result.app.list.name == "official" %} @@ -52,4 +53,30 @@
+ + + + + {% endblock %}