Added Year-2 and Year-3 button and graphs.
This commit is contained in:
parent
5d71a64ead
commit
380b368538
5 changed files with 50 additions and 10 deletions
|
@ -168,21 +168,23 @@ public class CreatedClosedCountChartView
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds the previous year.
|
||||
* Builds the previous 2 year.
|
||||
*
|
||||
* @param title
|
||||
* the title
|
||||
* @param project
|
||||
* the project
|
||||
* @param yearCount
|
||||
* the year count
|
||||
* @return the string
|
||||
* @throws AgirStatoolException
|
||||
* the agir statool exception
|
||||
*/
|
||||
public static String buildPreviousYear(final String title, final Project project) throws AgirStatoolException
|
||||
public static String buildPreviousYear(final String title, final Project project, final int yearCount) throws AgirStatoolException
|
||||
{
|
||||
String result;
|
||||
|
||||
result = buildYear(title, project, LocalDate.now().getYear() - 1);
|
||||
result = buildYear(title, project, LocalDate.now().getYear() - Math.abs(yearCount));
|
||||
|
||||
//
|
||||
return result;
|
||||
|
|
|
@ -159,15 +159,17 @@ public class CreatedClosedDiffChartView
|
|||
* the title
|
||||
* @param project
|
||||
* the project
|
||||
* @param yearCount
|
||||
* the year count
|
||||
* @return the string
|
||||
* @throws AgirStatoolException
|
||||
* the agir statool exception
|
||||
*/
|
||||
public static String buildPreviousYear(final String title, final Project project) throws AgirStatoolException
|
||||
public static String buildPreviousYear(final String title, final Project project, final int yearCount) throws AgirStatoolException
|
||||
{
|
||||
String result;
|
||||
|
||||
result = buildYear(title, project, LocalDate.now().getYear() - 1);
|
||||
result = buildYear(title, project, LocalDate.now().getYear() - Math.abs(yearCount));
|
||||
|
||||
//
|
||||
return result;
|
||||
|
|
|
@ -154,15 +154,17 @@ public class IssueAgeChartView
|
|||
* the title
|
||||
* @param project
|
||||
* the project
|
||||
* @param yearCount
|
||||
* the year count
|
||||
* @return the string
|
||||
* @throws AgirStatoolException
|
||||
* the agir statool exception
|
||||
*/
|
||||
public static String buildPreviousYear(final String title, final Project project) throws AgirStatoolException
|
||||
public static String buildPreviousYear(final String title, final Project project, final int yearCount) throws AgirStatoolException
|
||||
{
|
||||
String result;
|
||||
|
||||
result = buildYear(title, project, LocalDate.now().getYear() - 1);
|
||||
result = buildYear(title, project, LocalDate.now().getYear() - Math.abs(yearCount));
|
||||
|
||||
//
|
||||
return result;
|
||||
|
|
|
@ -76,6 +76,8 @@ public class ProjectPage
|
|||
|
||||
data.setContent("lastUpdateDate", LocalDateTime.now().format(DateTimeFormatter.ofPattern("dd/MM/yyyy HH':'mm", Locale.FRANCE)));
|
||||
|
||||
data.setContent("createClosePrevious3YearButton", LocalDate.now().getYear() - 3);
|
||||
data.setContent("createClosePrevious2YearButton", LocalDate.now().getYear() - 2);
|
||||
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));
|
||||
|
@ -86,9 +88,15 @@ public class ProjectPage
|
|||
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));
|
||||
data.setContent("createdClosedPrevious3YearChart", CreatedClosedCountChartView.buildPreviousYear("Created/closed year-3 Count", project, -3));
|
||||
data.setContent("created-ClosedPrevious3YearChart", CreatedClosedDiffChartView.buildPreviousYear("Created-closed year-3 Count", project, -3));
|
||||
data.setContent("agePrevious3YearChart", IssueAgeChartView.buildPreviousYear("Issue Age Year-3 Chart", project, -3));
|
||||
data.setContent("createdClosedPrevious2YearChart", CreatedClosedCountChartView.buildPreviousYear("Created/closed year-2 Count", project, -2));
|
||||
data.setContent("created-ClosedPrevious2YearChart", CreatedClosedDiffChartView.buildPreviousYear("Created-closed year-2 Count", project, -2));
|
||||
data.setContent("agePrevious2YearChart", IssueAgeChartView.buildPreviousYear("Issue Age Year-2 Chart", project, -2));
|
||||
data.setContent("createdClosedPreviousYearChart", CreatedClosedCountChartView.buildPreviousYear("Created/closed last year Count", project, -1));
|
||||
data.setContent("created-ClosedPreviousYearChart", CreatedClosedDiffChartView.buildPreviousYear("Created-closed last year Count", project, -1));
|
||||
data.setContent("agePreviousYearChart", IssueAgeChartView.buildPreviousYear("Issue Age Previous Year Chart", project, -1));
|
||||
data.setContent("createdClosedFullChart", CreatedClosedCountChartView.buildFull("Created/closed Count", project));
|
||||
data.setContent("created-ClosedFullChart", CreatedClosedDiffChartView.buildFull("Created-closed Count", project));
|
||||
data.setContent("ageFullChart", IssueAgeChartView.buildFull("Issue Age Full Chart", project));
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
<a id="createClose6MonthsButton" href="#" class="button" onclick="javascript:createClosedSelect('6months');">6 months</a>
|
||||
<a id="createClose12MonthsButton" href="#" class="button selected" onclick="javascript:createClosedSelect('12months');">12 months</a>
|
||||
<a id="createCloseFullButton" href="#" class="button" onclick="javascript:createClosedSelect('full');">Full</a>
|
||||
<a id="createClosePrevious3YearButton" href="#" class="button" onclick="javascript:createClosedSelect('previous3Year');">Year - 3</a>
|
||||
<a id="createClosePrevious2YearButton" href="#" class="button" onclick="javascript:createClosedSelect('previous2Year');">Year - 2</a>
|
||||
<a id="createClosePreviousYearButton" href="#" class="button" onclick="javascript:createClosedSelect('previousYear');">Previous Year</a>
|
||||
<span style="margin-left: 50px;"> </span>
|
||||
<a href="#rawgroupedswitch" class="button" title="Go down to the table below.">⇊ ⇊</a>
|
||||
|
@ -42,6 +44,16 @@
|
|||
<div id="created-Closed12MonthsChart" style="display: inline-block; width: 33%; height: 400px;">CREATED-CLOSED 12 MONTHS CHART</div>
|
||||
<div id="age12MonthsChart" style="display: inline-block; width: 33%; height: 400px;">AGE 12 MONTHS CHART</div>
|
||||
</div>
|
||||
<div id="previous3YearBox" style="display: none;">
|
||||
<div id="createdClosedPrevious3YearChart" style="display: inline-block; width: 33%; height: 400px;">CREATED/CLOSED PREVIOUS 3 YEARS CHART</div>
|
||||
<div id="created-ClosedPrevious3YearChart" style="display: inline-block; width: 33%; height: 400px;">CREATED-CLOSED PREVIOUS 3 YEARS CHART</div>
|
||||
<div id="agePrevious3YearChart" style="display: inline-block; width: 33%; height: 400px;">AGE PREVIOUS 3 YEARS CHART</div>
|
||||
</div>
|
||||
<div id="previous2YearBox" style="display: none;">
|
||||
<div id="createdClosedPrevious2YearChart" style="display: inline-block; width: 33%; height: 400px;">CREATED/CLOSED PREVIOUS 2 YEARS CHART</div>
|
||||
<div id="created-ClosedPrevious2YearChart" style="display: inline-block; width: 33%; height: 400px;">CREATED-CLOSED PREVIOUS 2 YEARS CHART</div>
|
||||
<div id="agePrevious2YearChart" style="display: inline-block; width: 33%; height: 400px;">AGE PREVIOUS 2 YEARS CHART</div>
|
||||
</div>
|
||||
<div id="previousYearBox" style="display: none;">
|
||||
<div id="createdClosedPreviousYearChart" style="display: inline-block; width: 33%; height: 400px;">CREATED/CLOSED PREVIOUS YEAR CHART</div>
|
||||
<div id="created-ClosedPreviousYearChart" style="display: inline-block; width: 33%; height: 400px;">CREATED-CLOSED PREVIOUS YEAR CHART</div>
|
||||
|
@ -82,12 +94,16 @@
|
|||
document.getElementById ('createClose3MonthsButton').classList.remove('selected');
|
||||
document.getElementById ('createClose6MonthsButton').classList.remove('selected');
|
||||
document.getElementById ('createClose12MonthsButton').classList.remove('selected');
|
||||
document.getElementById ('createClosePrevious3YearButton').classList.remove('selected');
|
||||
document.getElementById ('createClosePrevious2YearButton').classList.remove('selected');
|
||||
document.getElementById ('createClosePreviousYearButton').classList.remove('selected');
|
||||
document.getElementById ('createCloseFullButton').classList.remove('selected');
|
||||
|
||||
document.getElementById ('3MonthsBox').style.display = 'none';
|
||||
document.getElementById ('6MonthsBox').style.display = 'none';
|
||||
document.getElementById ('12MonthsBox').style.display = 'none';
|
||||
document.getElementById ('previous3YearBox').style.display = 'none';
|
||||
document.getElementById ('previous2YearBox').style.display = 'none';
|
||||
document.getElementById ('previousYearBox').style.display = 'none';
|
||||
document.getElementById ('fullBox').style.display = 'none';
|
||||
|
||||
|
@ -106,6 +122,16 @@
|
|||
document.getElementById ('createClose12MonthsButton').classList.add('selected');
|
||||
document.getElementById ('12MonthsBox').style.display = 'block';
|
||||
}
|
||||
else if (selection == 'previous3Year')
|
||||
{
|
||||
document.getElementById ('createClosePrevious3YearButton').classList.add('selected');
|
||||
document.getElementById ('previous3YearBox').style.display = 'block';
|
||||
}
|
||||
else if (selection == 'previous2Year')
|
||||
{
|
||||
document.getElementById ('createClosePrevious2YearButton').classList.add('selected');
|
||||
document.getElementById ('previous2YearBox').style.display = 'block';
|
||||
}
|
||||
else if (selection == 'previousYear')
|
||||
{
|
||||
document.getElementById ('createClosePreviousYearButton').classList.add('selected');
|
||||
|
|
Loading…
Reference in a new issue