diff options
author | James Moger <james.moger@gitblit.com> | 2012-12-06 17:15:05 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-12-06 17:15:05 -0500 |
commit | dab13a996adbfbc4086be6ff96836e590f7d339c (patch) | |
tree | e059aad431d3413b2f3d47327855e5897334c688 /src/com/gitblit | |
parent | f8337b5438043bc3065455d7e3c93f1c3cce93b0 (diff) | |
download | gitblit-dab13a996adbfbc4086be6ff96836e590f7d339c.tar.gz gitblit-dab13a996adbfbc4086be6ff96836e590f7d339c.zip |
Setting to stop a repository from contributing to the activity page
Diffstat (limited to 'src/com/gitblit')
-rw-r--r-- | src/com/gitblit/client/EditRepositoryDialog.java | 3 | ||||
-rw-r--r-- | src/com/gitblit/utils/ActivityUtils.java | 4 | ||||
-rw-r--r-- | src/com/gitblit/wicket/GitBlitWebApp.properties | 3 | ||||
-rw-r--r-- | src/com/gitblit/wicket/pages/EditRepositoryPage.java | 6 |
4 files changed, 11 insertions, 5 deletions
diff --git a/src/com/gitblit/client/EditRepositoryDialog.java b/src/com/gitblit/client/EditRepositoryDialog.java index aa6ad58d..6f9ed525 100644 --- a/src/com/gitblit/client/EditRepositoryDialog.java +++ b/src/com/gitblit/client/EditRepositoryDialog.java @@ -227,10 +227,9 @@ public class EditRepositoryDialog extends JDialog { isFrozen = new JCheckBox(Translation.get("gb.isFrozenDescription"),
anRepository.isFrozen);
- maxActivityCommits = new JComboBox(new Integer [] { 0, 25, 50, 75, 100, 150, 250, 500 });
+ maxActivityCommits = new JComboBox(new Integer [] { -1, 0, 25, 50, 75, 100, 150, 250, 500 });
maxActivityCommits.setSelectedItem(anRepository.maxActivityCommits);
-
mailingListsField = new JTextField(
ArrayUtils.isEmpty(anRepository.mailingLists) ? ""
: StringUtils.flattenStrings(anRepository.mailingLists,
diff --git a/src/com/gitblit/utils/ActivityUtils.java b/src/com/gitblit/utils/ActivityUtils.java index 80aaebbb..ef3a55e7 100644 --- a/src/com/gitblit/utils/ActivityUtils.java +++ b/src/com/gitblit/utils/ActivityUtils.java @@ -81,6 +81,10 @@ public class ActivityUtils { Map<String, Activity> activity = new HashMap<String, Activity>();
for (RepositoryModel model : models) {
+ if (model.maxActivityCommits == -1) {
+ // skip this repository
+ continue;
+ }
if (model.hasCommits && model.lastChange.after(thresholdDate)) {
if (model.isCollectingGarbage) {
continue;
diff --git a/src/com/gitblit/wicket/GitBlitWebApp.properties b/src/com/gitblit/wicket/GitBlitWebApp.properties index 5b42a2c0..16f76411 100644 --- a/src/com/gitblit/wicket/GitBlitWebApp.properties +++ b/src/com/gitblit/wicket/GitBlitWebApp.properties @@ -439,4 +439,5 @@ gb.serveCertificate = serve https with this certificate gb.sslCertificateGeneratedRestart = Successfully generated new server SSL certificate for {0}.\nYou must restart Gitblit to use the new certificate.\n\nIf you are launching with the '--alias' parameter you will have to set that to ''--alias {0}''.
gb.validity = validity
gb.siteName = site name
-gb.siteNameDescription = short, descriptive name of your server
\ No newline at end of file +gb.siteNameDescription = short, descriptive name of your server
+gb.excludeFromActivity = exclude from activity page
\ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/com/gitblit/wicket/pages/EditRepositoryPage.java index 7f66f688..a071b69e 100644 --- a/src/com/gitblit/wicket/pages/EditRepositoryPage.java +++ b/src/com/gitblit/wicket/pages/EditRepositoryPage.java @@ -414,7 +414,7 @@ public class EditRepositoryPage extends RootSubPage { form.add(new CheckBox("showReadme"));
form.add(new CheckBox("skipSizeCalculation"));
form.add(new CheckBox("skipSummaryMetrics"));
- List<Integer> maxActivityCommits = Arrays.asList(0, 25, 50, 75, 100, 150, 200, 250, 500 );
+ List<Integer> maxActivityCommits = Arrays.asList(-1, 0, 25, 50, 75, 100, 150, 200, 250, 500 );
form.add(new DropDownChoice<Integer>("maxActivityCommits", maxActivityCommits, new MaxActivityCommitsRenderer()));
mailingLists = new Model<String>(ArrayUtils.isEmpty(repositoryModel.mailingLists) ? ""
@@ -666,7 +666,9 @@ public class EditRepositoryPage extends RootSubPage { @Override
public String getDisplayValue(Integer value) {
- if (value == 0) {
+ if (value == -1) {
+ return getString("gb.excludeFromActivity");
+ } else if (value == 0) {
return getString("gb.noMaximum");
} else {
return value + " " + getString("gb.commits");
|