| | |
| | | ActivityPage.class);
|
| | |
|
| | | PageParameters currentParameters = getPageParameters();
|
| | | int daysBack = GitBlit.getInteger(Keys.web.activityDuration, 14);
|
| | | int daysBack = GitBlit.getInteger(Keys.web.activityDuration, 7);
|
| | | if (currentParameters != null && !currentParameters.containsKey("db")) {
|
| | | currentParameters.put("db", daysBack);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | // build google charts
|
| | | int w = 310;
|
| | | int h = 150;
|
| | | GoogleCharts charts = new GoogleCharts();
|
| | |
|
| | | // sort in reverse-chronological order and then reverse that
|
| | |
| | | for (Activity metric : recentActivity) {
|
| | | chart.addValue(df.format(metric.startDate), metric.getCommitCount());
|
| | | }
|
| | | chart.setWidth(w);
|
| | | chart.setHeight(h);
|
| | | charts.addChart(chart);
|
| | |
|
| | | // active repositories pie chart
|
| | |
| | | for (Metric metric : repositoryMetrics.values()) {
|
| | | chart.addValue(metric.name, metric.count);
|
| | | }
|
| | | chart.setWidth(w);
|
| | | chart.setHeight(h);
|
| | | chart.setShowLegend(false);
|
| | | charts.addChart(chart);
|
| | |
|
| | | // active authors pie chart
|
| | |
| | | for (Metric metric : authorMetrics.values()) {
|
| | | chart.addValue(metric.name, metric.count);
|
| | | }
|
| | | chart.setWidth(w);
|
| | | chart.setHeight(h);
|
| | | chart.setShowLegend(false);
|
| | | charts.addChart(chart);
|
| | |
|
| | | return charts;
|