From 3aae19648104f42036960b6a64758dbe56109a0c Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 30 Jan 2020 02:19:52 +0100 Subject: [PATCH] Added 12 months views. Improved buttons. --- .../agirstatool/core/pages/ProjectPage.java | 6 ++++++ .../agirstatool/core/pages/agirstatool.css | 2 +- .../agirstatool/core/pages/project.xhtml | 19 ++++++++++++++++--- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/org/april/agirstatool/core/pages/ProjectPage.java b/src/org/april/agirstatool/core/pages/ProjectPage.java index ec72329..f86d019 100644 --- a/src/org/april/agirstatool/core/pages/ProjectPage.java +++ b/src/org/april/agirstatool/core/pages/ProjectPage.java @@ -18,6 +18,8 @@ */ package org.april.agirstatool.core.pages; +import java.time.LocalDate; + import org.april.agirstatool.core.AgirStatoolException; import org.april.agirstatool.core.Project; import org.slf4j.Logger; @@ -60,12 +62,16 @@ public class ProjectPage data.setAttribute("agirLink", "href", "https://agir.april.org/projects/" + project.getIdentifier() + "/issues"); data.setContent("versionsup", BuildInformation.instance().version()); + data.setContent("createClosePreviousYearButton", LocalDate.now().getYear() - 1); data.setContent("createdClosed3MonthsChart", CreatedClosedCountChartView.buildLastMonths("Created/closed 3 months Count", project, 3)); data.setContent("created-Closed3MonthsChart", CreatedClosedDiffChartView.buildLastMonths("Created-closed 3 months Count", project, 3)); data.setContent("age3MonthsChart", IssueAgeChartView.buildLastMonths("Issue Age 3 months Chart", project, 3)); data.setContent("createdClosed6MonthsChart", CreatedClosedCountChartView.buildLastMonths("Created/closed 6 months Count", project, 6)); data.setContent("created-Closed6MonthsChart", CreatedClosedDiffChartView.buildLastMonths("Created-closed 6 months Count", project, 6)); data.setContent("age6MonthsChart", IssueAgeChartView.buildLastMonths("Issue Age 6 months", project, 6)); + data.setContent("createdClosed12MonthsChart", CreatedClosedCountChartView.buildLastMonths("Created/closed 12 months Count", project, 12)); + data.setContent("created-Closed12MonthsChart", CreatedClosedDiffChartView.buildLastMonths("Created-closed 12 months Count", project, 12)); + data.setContent("age12MonthsChart", IssueAgeChartView.buildLastMonths("Issue Age 12 months", project, 12)); data.setContent("createdClosedPreviousYearChart", CreatedClosedCountChartView.buildPreviousYear("Created/closed last year Count", project)); data.setContent("created-ClosedPreviousYearChart", CreatedClosedDiffChartView.buildPreviousYear("Created-closed last year Count", project)); data.setContent("agePreviousYearChart", IssueAgeChartView.buildPreviousYear("Issue Age Previous Year Chart", project)); diff --git a/src/org/april/agirstatool/core/pages/agirstatool.css b/src/org/april/agirstatool/core/pages/agirstatool.css index ef2a252..7a05bf5 100644 --- a/src/org/april/agirstatool/core/pages/agirstatool.css +++ b/src/org/april/agirstatool/core/pages/agirstatool.css @@ -240,7 +240,7 @@ h3 span text-decoration: none; display: inline-block; font-size: 16px; - width: 110px; + width: 90px; } .button:hover diff --git a/src/org/april/agirstatool/core/pages/project.xhtml b/src/org/april/agirstatool/core/pages/project.xhtml index c145f16..ad002d2 100644 --- a/src/org/april/agirstatool/core/pages/project.xhtml +++ b/src/org/april/agirstatool/core/pages/project.xhtml @@ -16,11 +16,12 @@
3 months - 6 months + 6 months + 12 months Full Previous Year - Down + ⇊ ⇊ Root Admins @@ -31,11 +32,16 @@
CREATED-CLOSED 3 MONTHS CHART
AGE 3 MONTHS CHART
-
+ +
+
CREATED/CLOSED 12 MONTHS CHART
+
CREATED-CLOSED 12 MONTHS CHART
+
AGE 12 MONTHS CHART
+