]> source.dussan.org Git - gitblit.git/commitdiff
Use .git-stripped repository name for calculating color
authorJames Moger <james.moger@gitblit.com>
Fri, 6 Jan 2012 22:40:15 +0000 (17:40 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 6 Jan 2012 22:40:15 +0000 (17:40 -0500)
src/com/gitblit/wicket/pages/ActivityPage.java
src/com/gitblit/wicket/panels/ActivityPanel.java
src/com/gitblit/wicket/panels/RepositoriesPanel.java

index d548cfb649ef78db17f0677ebbd7d4488eb60a17..aa2f2665e36b4362db0e767ef6acf36261a966cc 100644 (file)
@@ -35,6 +35,7 @@ import com.gitblit.models.Activity;
 import com.gitblit.models.Metric;\r
 import com.gitblit.models.RepositoryModel;\r
 import com.gitblit.utils.ActivityUtils;\r
+import com.gitblit.utils.StringUtils;\r
 import com.gitblit.wicket.PageRegistration;\r
 import com.gitblit.wicket.PageRegistration.DropDownMenuItem;\r
 import com.gitblit.wicket.PageRegistration.DropDownMenuRegistration;\r
@@ -152,7 +153,7 @@ public class ActivityPage extends RootPage {
 \r
                        // aggregate repository metrics\r
                        for (Map.Entry<String, Metric> entry : activity.getRepositoryMetrics().entrySet()) {\r
-                               String repository = entry.getKey();\r
+                               String repository = StringUtils.stripDotGit(entry.getKey());\r
                                if (!repositoryMetrics.containsKey(repository)) {\r
                                        repositoryMetrics.put(repository, new Metric(repository));\r
                                }\r
index 7cafb828f60655b4c5e92913afb547d3fe263fea..2ee437de2155211322055a828d83ea9ac64f3841 100644 (file)
@@ -98,7 +98,7 @@ public class ActivityPanel extends BasePanel {
                                                LinkPanel repositoryLink = new LinkPanel("repository", null,\r
                                                                repoName, SummaryPage.class,\r
                                                                WicketUtils.newRepositoryParameter(commit.repository), true);\r
-                                               WicketUtils.setCssBackground(repositoryLink, commit.repository);\r
+                                               WicketUtils.setCssBackground(repositoryLink, repoName);\r
                                                fragment.add(repositoryLink);\r
 \r
                                                // repository branch\r
index 3b3db4923b008620294f7b78a3fb945f98e74f31..4007a97956eaeeafb83d094aec3cf3aeb68cee64 100644 (file)
@@ -148,10 +148,10 @@ public class RepositoriesPanel extends BasePanel {
                                if (!StringUtils.isEmpty(currGroupName) && (repoName.indexOf('/') > -1)) {\r
                                        repoName = repoName.substring(currGroupName.length() + 1);\r
                                }\r
-\r
+                               \r
                                // repository swatch\r
                                Component swatch = new Label("repositorySwatch", "&nbsp;").setEscapeModelStrings(false);\r
-                               WicketUtils.setCssBackground(swatch, entry.name);\r
+                               WicketUtils.setCssBackground(swatch, entry.toString());\r
                                row.add(swatch);\r
                                swatch.setVisible(showSwatch);\r
 \r