diff --git a/app/scripts/appListsHistory/script.py b/app/scripts/appListsHistory/script.py index 1cb55b1..074e6e4 100644 --- a/app/scripts/appListsHistory/script.py +++ b/app/scripts/appListsHistory/script.py @@ -46,14 +46,17 @@ def get_lists_history(): cmd = 'cd ./.work/apps; git checkout `git rev-list -1 --before="%s" master`' os.system(cmd % t.strftime("%b %d %Y")) - # Merge community and official - community = json.loads(open("./.work/apps/community.json").read()) - official = json.loads(open("./.work/apps/official.json").read()) - for key in official: - official[key]["state"] = "official" - merged = {} - merged.update(community) - merged.update(official) + if t < datetime(2019,4,4): + # Merge community and official + community = json.loads(open("./.work/apps/community.json").read()) + official = json.loads(open("./.work/apps/official.json").read()) + for key in official: + official[key]["state"] = "official" + merged = {} + merged.update(community) + merged.update(official) + else: + merged = json.loads(open("./.work/apps/apps.json").read()) # Save it json.dump(merged, open('./.work/merged_lists.json.%s' % t.strftime("%y-%m-%d"), 'w')) @@ -179,7 +182,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,8): + for level in range(0,9): summary["level-%s"%level] = len([ k for k, infos in j.items() \ if infos["state"] in ["working", "official"] \ and infos.get("level", None) == level ]) diff --git a/app/templates/appci_branch.html b/app/templates/appci_branch.html index 6589e17..e3f7de3 100644 --- a/app/templates/appci_branch.html +++ b/app/templates/appci_branch.html @@ -39,6 +39,9 @@ + @@ -139,7 +142,8 @@ window.onload = function () { { y: $(".ci-app-level[value=4]").length, label: "Level 4", color: "#CBB052" }, { y: $(".ci-app-level[value=5]").length, label: "Level 5", color: "#A6B255" }, { y: $(".ci-app-level[value=6]").length, label: "Level 6", color: "#7AB659" }, - { y: $(".ci-app-level[value=7]").length, label: "Level 7", color: "#5cb85c" } + { y: $(".ci-app-level[value=7]").length, label: "Level 7", color: "#5cb85c" }, + { y: $(".ci-app-level[value=8]").length, label: "Level 8", color: "#4695d5" } ] }] }); diff --git a/app/templates/applist_history.html b/app/templates/applist_history.html index acfee90..2912afa 100644 --- a/app/templates/applist_history.html +++ b/app/templates/applist_history.html @@ -16,7 +16,8 @@ window.onload = function () { "#CBB052", "#A6B255", "#7AB659", - "#5cb85c" + "#5cb85c", + "#4695d5" ]; var colors_per_state = { @@ -36,7 +37,7 @@ window.onload = function () { shared: true }, data: [ - {% for level in range(7,-1,-1) %} + {% for level in range(8,-1,-1) %} { color: colors_per_level[{{ level }}], type: "stackedArea",