Skip to content

Commit

Permalink
Tweak warn for last 7/30/90 days
Browse files Browse the repository at this point in the history
  • Loading branch information
stianst committed Feb 2, 2024
1 parent 5803953 commit 72d272d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/main/java/org/keycloak/dashboard/beans/Bugs.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ public Bugs(GitHubData data, Teams teams) {
stats.add(new BugStat("Old without comments", oldWithoutComments, Config.BUG_OLD_NO_COMMENT_WARN, Config.BUG_OLD_NO_COMMENT_ERROR, "is:issue is:open label:kind/bug comments:0 updated:<=" + DateUtil.MINUS_6_MONTHS_STRING));

stats.add(new BugStat("Last 7 days",
createdLast7Days, 0, createdLast7Days > closedLast7Days ? 1 : 999, "label:kind/bug created:>=" + DateUtil.MINUS_7_DAYS_STRING,
closedLast7Days, 0, createdLast7Days > closedLast7Days ? 1 : 999, "is:closed label:kind/bug closed:>=" + DateUtil.MINUS_7_DAYS_STRING));
createdLast7Days, -1, createdLast7Days > closedLast7Days ? 1 : Integer.MAX_VALUE, "label:kind/bug created:>=" + DateUtil.MINUS_7_DAYS_STRING,
closedLast7Days, -1, createdLast7Days > closedLast7Days ? 1 : Integer.MAX_VALUE, "is:closed label:kind/bug closed:>=" + DateUtil.MINUS_7_DAYS_STRING));

stats.add(new BugStat("Last 30 days",
createdLast30Days, 0, createdLast30Days > closedLast30Days ? 1 : 999, "label:kind/bug created:>=" + DateUtil.MINUS_30_DAYS_STRING,
closedLast30Days, 0, createdLast30Days > closedLast30Days ? 1 : 999, "is:closed label:kind/bug closed:>=" + DateUtil.MINUS_30_DAYS_STRING));
createdLast30Days, -1, createdLast30Days > closedLast30Days ? 1 : Integer.MAX_VALUE, "label:kind/bug created:>=" + DateUtil.MINUS_30_DAYS_STRING,
closedLast30Days, -1, createdLast30Days > closedLast30Days ? 1 : Integer.MAX_VALUE, "is:closed label:kind/bug closed:>=" + DateUtil.MINUS_30_DAYS_STRING));

stats.add(new BugStat("Last 90 days",
createdLast90Days, 0, createdLast90Days > closedLast90Days ? 1 : 999, "label:kind/bug created:>=" + DateUtil.MINUS_90_DAYS_STRING,
closedLast90Days, 0, createdLast90Days > closedLast90Days ? 1 : 999, "is:closed label:kind/bug closed:>=" + DateUtil.MINUS_90_DAYS_STRING));
createdLast90Days, -1, createdLast90Days > closedLast90Days ? 1 : Integer.MAX_VALUE, "label:kind/bug created:>=" + DateUtil.MINUS_90_DAYS_STRING,
closedLast90Days, -1, createdLast90Days > closedLast90Days ? 1 : Integer.MAX_VALUE, "is:closed label:kind/bug closed:>=" + DateUtil.MINUS_90_DAYS_STRING));

issues.stream().filter(i -> i.getMilestone() != null)
.collect(Collectors.groupingBy(GitHubIssue::getMilestone, Collectors.toList())).entrySet().stream()
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/keycloak/dashboard/util/Css.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ public class Css {
public static String getCountClass(int count, int warnThreshold, int errorThreshold) {
if (errorThreshold <= 0 && warnThreshold <= 0) {
return "blank";
} else if (count >= errorThreshold) {
} else if (errorThreshold != -1 && count >= errorThreshold) {
return "error";
} if (count >= warnThreshold && count > 0) {
} if (warnThreshold != -1 && count >= warnThreshold && count > 0) {
return "warn";
} else {
return "success";
Expand Down

0 comments on commit 72d272d

Please sign in to comment.