diff options
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java')
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java index 938b05e3..4c471a1e 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java @@ -76,6 +76,8 @@ public class EditRepositoryPage extends RootSubPage { RepositoryModel repositoryModel;
+ private IModel<String> metricAuthorExclusions;
+
private IModel<String> mailingLists;
public EditRepositoryPage() {
@@ -316,6 +318,23 @@ public class EditRepositoryPage extends RootSubPage { }
}
+ // set author metric exclusions
+ String ax = metricAuthorExclusions.getObject();
+ if (!StringUtils.isEmpty(ax)) {
+ Set<String> list = new HashSet<String>();
+ for (String exclusion : StringUtils.getStringsFromValue(ax, " ")) {
+ if (StringUtils.isEmpty(exclusion)) {
+ continue;
+ }
+ if (exclusion.indexOf(' ') > -1) {
+ list.add("\"" + exclusion + "\"");
+ } else {
+ list.add(exclusion);
+ }
+ }
+ repositoryModel.metricAuthorExclusions = new ArrayList<String>(list);
+ }
+
// set mailing lists
String ml = mailingLists.getObject();
if (!StringUtils.isEmpty(ml)) {
@@ -435,6 +454,10 @@ public class EditRepositoryPage extends RootSubPage { List<Integer> maxActivityCommits = Arrays.asList(-1, 0, 25, 50, 75, 100, 150, 200, 250, 500 );
form.add(new DropDownChoice<Integer>("maxActivityCommits", maxActivityCommits, new MaxActivityCommitsRenderer()));
+ metricAuthorExclusions = new Model<String>(ArrayUtils.isEmpty(repositoryModel.metricAuthorExclusions) ? ""
+ : StringUtils.flattenStrings(repositoryModel.metricAuthorExclusions, " "));
+ form.add(new TextField<String>("metricAuthorExclusions", metricAuthorExclusions));
+
mailingLists = new Model<String>(ArrayUtils.isEmpty(repositoryModel.mailingLists) ? ""
: StringUtils.flattenStrings(repositoryModel.mailingLists, " "));
form.add(new TextField<String>("mailingLists", mailingLists));
|