Use .git-stripped repository name for calculating color
| | |
| | | import com.gitblit.models.Metric;
|
| | | import com.gitblit.models.RepositoryModel;
|
| | | import com.gitblit.utils.ActivityUtils;
|
| | | import com.gitblit.utils.StringUtils;
|
| | | import com.gitblit.wicket.PageRegistration;
|
| | | import com.gitblit.wicket.PageRegistration.DropDownMenuItem;
|
| | | import com.gitblit.wicket.PageRegistration.DropDownMenuRegistration;
|
| | |
| | |
|
| | | // aggregate repository metrics
|
| | | for (Map.Entry<String, Metric> entry : activity.getRepositoryMetrics().entrySet()) {
|
| | | String repository = entry.getKey();
|
| | | String repository = StringUtils.stripDotGit(entry.getKey());
|
| | | if (!repositoryMetrics.containsKey(repository)) {
|
| | | repositoryMetrics.put(repository, new Metric(repository));
|
| | | }
|
| | |
| | | LinkPanel repositoryLink = new LinkPanel("repository", null,
|
| | | repoName, SummaryPage.class,
|
| | | WicketUtils.newRepositoryParameter(commit.repository), true);
|
| | | WicketUtils.setCssBackground(repositoryLink, commit.repository);
|
| | | WicketUtils.setCssBackground(repositoryLink, repoName);
|
| | | fragment.add(repositoryLink);
|
| | |
|
| | | // repository branch
|
| | |
| | |
|
| | | // repository swatch
|
| | | Component swatch = new Label("repositorySwatch", " ").setEscapeModelStrings(false);
|
| | | WicketUtils.setCssBackground(swatch, entry.name);
|
| | | WicketUtils.setCssBackground(swatch, entry.toString());
|
| | | row.add(swatch);
|
| | | swatch.setVisible(showSwatch);
|
| | |
|