diff --git a/app/app.py b/app/app.py index 45dd892..d3d5570 100644 --- a/app/app.py +++ b/app/app.py @@ -136,7 +136,7 @@ def badge(app): badge = "level%s.svg" % level if not level is None else "unknown.svg" - if not app.ci_enabled: + if app.state != "working": badge = "unknown.svg" svg = open("./app/static/badges/%s" % badge).read() diff --git a/app/scripts/appListsHistory/script.py b/app/scripts/appListsHistory/script.py index 76c639a..8f31997 100644 --- a/app/scripts/appListsHistory/script.py +++ b/app/scripts/appListsHistory/script.py @@ -92,7 +92,7 @@ def make_count_summary(): for state in states: summary[state] = len([k for k, infos in j.items() if infos["state"] == state]) - for level in range(0, 9): + for level in range(0, 10): summary["level-%s" % level] = len([k for k, infos in j.items() if infos["state"] in ["working", "official"] and infos.get("level", None) == level]) @@ -138,7 +138,7 @@ def update_catalog_stats(app, history): except: return - app_in_db.long_term_good_quality = len([d for d in history[-24:] if d["level"] > 5]) > 12 + app_in_db.long_term_good_quality = len([d for d in history[-24:] if d["level"] > 5]) > 0.90 * 24 app_in_db.long_term_broken = history[-1]["level"] == 0 and len([d for d in history[-24:] if d["level"] == 0]) > 12 db.session.add(app_in_db) diff --git a/app/templates/appci_branch.html b/app/templates/appci_branch.html index 04e7846..0b9e94b 100644 --- a/app/templates/appci_branch.html +++ b/app/templates/appci_branch.html @@ -24,7 +24,7 @@
{% for result in app_results %} -