Browse Source

Added full active issue chart.

master
Christian P. MOMON 2 years ago
parent
commit
80818318ab
  1. 1
      .classpath
  2. 33
      src/org/april/agirstatool/core/pages/CreatedClosedDiffChartView.java
  3. 1
      src/org/april/agirstatool/core/pages/ProjectPage.java
  4. 5
      src/org/april/agirstatool/core/pages/project.xhtml

1
.classpath

@ -21,5 +21,6 @@
<classpathentry kind="lib" path="lib/devinsy-strings-0.8.2.jar" sourcepath="lib/devinsy-strings-0.8.2-sources.zip"/>
<classpathentry kind="lib" path="lib/devinsy-xml-0.8.2.jar" sourcepath="lib/devinsy-xml-0.8.2-sources.zip"/>
<classpathentry kind="lib" path="lib/xidyn-1.8.2.jar" sourcepath="lib/xidyn-1.8.2-sources.zip"/>
<classpathentry kind="lib" path="lib/commons-cli-1.4.jar" sourcepath="lib/commons-cli-1.4-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

33
src/org/april/agirstatool/core/pages/CreatedClosedDiffChartView.java

@ -117,36 +117,15 @@ public class CreatedClosedDiffChartView
{
String result;
try
{
logger.debug("Building created/concluded chart view…");
if (project.hasIssue())
{
String source = XidynUtils.load(AgirStatool.class.getResource("/org/april/agirstatool/core/pages/chartLineView.xhtml"));
String code = XidynUtils.extractBodyContent(source);
code = code.replaceAll("myChart", "myChart_" + DigestUtils.md5Hex(title + "lineBar"));
StringList labels = buildWeekLabels(project.issueStats().getFirstCreate().toLocalDate());
code = code.replaceAll("labels: \\[.*\\]", "labels: " + AgirStatoolUtils.toJSonStrings(labels));
StringList values = project.issueStats().getWeekCreatedIssueCounts().toValueList();
code = code.replaceAll("data: \\[.*\\]", "data: " + AgirStatoolUtils.toJSonNumbers(values));
logger.debug("Building created/concluded chart view…");
values = project.issueStats().getWeekConcludedIssueCounts().toValueList();
code = code.replaceAll("data: \\[.*\\] ", "data: " + AgirStatoolUtils.toJSonNumbers(values));
result = code.toString();
}
else
{
result = "No issue.";
}
if (project.hasIssue())
{
result = build(title, project, project.issueStats().getFirstCreate().toLocalDate(), LocalDate.now());
}
catch (IOException exception)
else
{
throw new AgirStatoolException("Error building ProjectsRaw view: " + exception.getMessage(), exception);
result = "No issue.";
}
//

1
src/org/april/agirstatool/core/pages/ProjectPage.java

@ -67,6 +67,7 @@ public class ProjectPage
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("createdClosedFullChart", CreatedClosedCountChartView.buildFull("Created/closed Count", project));
data.setContent("created-ClosedFullChart", CreatedClosedDiffChartView.buildFull("Created-closed Count", project));
data.setContent("issueRawChart", IssueStatChartView.build("Issue Raw Count", project));
data.setContent("issueGroupedChart", IssueStatChartView.buildGrouped("Issue Grouped Count", project));

5
src/org/april/agirstatool/core/pages/project.xhtml

@ -11,7 +11,7 @@
<script src="Chart.bundle.min.js"></script>
</head>
<body>
<div style="margin: 10px;">
<div style="margin: 5px 10px 10px 10px;">
<h1><a href="index.xhtml">Agir Statool</a><sup id="versionsup" style="font-size: 9px;">v0.0.14</sup> – Project <a id="agirLink" href="#">n/a</a></h1>
<div>
<div style="margin: 5px;">
@ -39,7 +39,8 @@
<div id="created-ClosedPreviousYearChart" style="display: inline-block; width: 49%; height: 400px;">CREATED-CLOSED PREVIOUS YEAR CHART</div>
</div>
<div id="fullBox">
<div id="createdClosedFullChart" style="height: 400px;">CREATED/CLOSED FULL CHART</div>
<div id="createdClosedFullChart" style="height: 400px; padding-bottom: 4px;">CREATED/CLOSED FULL CHART</div>
<div id="created-ClosedFullChart" style="height: 400px;">CREATED-CLOSED FULL CHART</div>
</div>
</div>

Loading…
Cancel
Save