From 27ae9095639bb228a1b7ff86a3ebe4264abf05be Mon Sep 17 00:00:00 2001
From: mschaefers <mschaefers@scoop-gmbh.de>
Date: Thu, 29 Nov 2012 12:33:09 -0500
Subject: [PATCH] feature: when using LdapUserService one can configure Gitblit to fetch all users from ldap that can possibly login. This allows to see newly generated LDAP users instantly in Gitblit. By now an LDAP user had to log in once to appear in GitBlit.
---
src/com/gitblit/wicket/pages/ActivityPage.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/com/gitblit/wicket/pages/ActivityPage.java b/src/com/gitblit/wicket/pages/ActivityPage.java
index 634b298..bceac8f 100644
--- a/src/com/gitblit/wicket/pages/ActivityPage.java
+++ b/src/com/gitblit/wicket/pages/ActivityPage.java
@@ -67,7 +67,8 @@
// determine repositories to view and retrieve the activity
List<RepositoryModel> models = getRepositories(params);
- List<Activity> recentActivity = ActivityUtils.getRecentActivity(models, daysBack, objectId);
+ List<Activity> recentActivity = ActivityUtils.getRecentActivity(models,
+ daysBack, objectId, getTimeZone());
if (recentActivity.size() == 0) {
// no activity, skip graphs and activity panel
@@ -79,7 +80,7 @@
int totalCommits = 0;
Set<String> uniqueAuthors = new HashSet<String>();
for (Activity activity : recentActivity) {
- totalCommits += activity.commits.size();
+ totalCommits += activity.getCommitCount();
uniqueAuthors.addAll(activity.getAuthorMetrics().keySet());
}
int totalAuthors = uniqueAuthors.size();
@@ -173,8 +174,9 @@
GoogleChart chart = new GoogleLineChart("chartDaily", getString("gb.dailyActivity"), "day",
getString("gb.commits"));
SimpleDateFormat df = new SimpleDateFormat("MMM dd");
+ df.setTimeZone(getTimeZone());
for (Activity metric : recentActivity) {
- chart.addValue(df.format(metric.startDate), metric.commits.size());
+ chart.addValue(df.format(metric.startDate), metric.getCommitCount());
}
chart.setWidth(w);
chart.setHeight(h);
--
Gitblit v1.9.1