new DropDownChoice<Integer>("choice",
new PropertyModel<Integer>(repositoryModel, "gcPeriod"),
gcPeriods,
new GCPeriodRenderer())).setEnabled(gcEnabled));
form.add(new TextOption("gcThreshold",
getString("gb.gcThreshold"),
getString("gb.gcThresholdDescription"),
"span1",
new PropertyModel<String>(repositoryModel, "gcThreshold")).setEnabled(gcEnabled));
//
// MISCELLANEOUS
//
form.add(new TextOption("origin",
getString("gb.origin"),
getString("gb.originDescription"),
"span6",
new PropertyModel<String>(repositoryModel, "origin")).setEnabled(false));
form.add(new BooleanOption("showRemoteBranches",
getString("gb.showRemoteBranches"),
getString("gb.showRemoteBranchesDescription"),
new PropertyModel<Boolean>(repositoryModel, "showRemoteBranches")));
form.add(new BooleanOption("skipSizeCalculation",
getString("gb.skipSizeCalculation"),
getString("gb.skipSizeCalculationDescription"),
new PropertyModel<Boolean>(repositoryModel, "skipSizeCalculation")));
form.add(new BooleanOption("skipSummaryMetrics",
getString("gb.skipSummaryMetrics"),
getString("gb.skipSummaryMetricsDescription"),
new PropertyModel<Boolean>(repositoryModel, "skipSummaryMetrics")));
List<Integer> maxActivityCommits = Arrays.asList(-1, 0, 25, 50, 75, 100, 150, 200, 250, 500);
form.add(new ChoiceOption<Integer>("maxActivityCommits",
getString("gb.maxActivityCommits"),
getString("gb.maxActivityCommitsDescription"),
new DropDownChoice<Integer>("choice",
new PropertyModel<Integer>(repositoryModel, "maxActivityCommits"),
maxActivityCommits,
new MaxActivityCommitsRenderer())));
List<CommitMessageRenderer> renderers = Arrays.asList(CommitMessageRenderer.values());
form.add(new ChoiceOption<CommitMessageRenderer>("commitMessageRenderer",
getString("gb.commitMessageRenderer"),
getString("gb.commitMessageRendererDescription"),
new DropDownChoice<CommitMessageRenderer>("choice",
new PropertyModel<CommitMessageRenderer>(repositoryModel, "commitMessageRenderer"),
renderers)));
metricAuthorExclusions = new Model<String>(ArrayUtils.isEmpty(repositoryModel.metricAuthorExclusions) ? ""
: StringUtils.flattenStrings(repositoryModel.metricAuthorExclusions, " "));
form.add(new TextOption("metricAuthorExclusions",
getString("gb.metricAuthorExclusions"),
getString("gb.metricAuthorExclusions"),
"span6",
metricAuthorExclusions));
mailingLists = new Model<String>(ArrayUtils.isEmpty(repositoryModel.mailingLists) ? ""
: StringUtils.flattenStrings(repositoryModel.mailingLists, " "));
form.add(new TextOption("mailingLists",
getString("gb.mailingLists"),
getString("gb.mailingLists"),
"span6",
mailingLists));