Improvement for branch comparison ring chart

This commit is contained in:
Alexandre Aubin 2018-01-30 16:47:16 -05:00
parent f52132f13e
commit f633c608fd
2 changed files with 7 additions and 3 deletions

View file

@ -86,7 +86,10 @@ def appci_compare(ref, target):
elif ref_r.level == ref_r.level_compare:
ref_r.compare = "same"
elif ref_r.level > ref_r.level_compare:
ref_r.compare = "regression"
if ref_r.level_compare == 0:
ref_r.compare = "broken"
else:
ref_r.compare = "regression"
elif ref_r.level < ref_r.level_compare:
ref_r.compare = "improvement"
else:

View file

@ -67,8 +67,9 @@ window.onload = function () {
toolTipContent: "<b>{label}:</b> {y} (#percent%)",
dataPoints: [
{ y: $(".ci-branch-comparison[value=unknown]").length, label: "Unknown", color:"#cccccc" },
{ y: $(".ci-branch-comparison[value=regression]").length, label: "Regressions", color: "#d9534f" },
{ y: $(".ci-branch-comparison[value=same]").length, label: "Same", color: "#67e0d0" },
{ y: $(".ci-branch-comparison[value=broken]").length, label:"Broken", color: "#d9534f" },
{ y: $(".ci-branch-comparison[value=regression]").length, label: "Regressions", color: "#f0ad4e" },
{ y: $(".ci-branch-comparison[value=same]").length, label: "Same", color: "#419fef" },
{ y: $(".ci-branch-comparison[value=improvement]").length, label: "Improvements", color: "#46bd32" }
]
}]