]> source.dussan.org Git - gitblit.git/commitdiff
Eliminate obsolete code
authorJames Moger <james.moger@gitblit.com>
Mon, 24 Jun 2013 18:06:35 +0000 (14:06 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 24 Jun 2013 18:06:35 +0000 (14:06 -0400)
src/main/java/com/gitblit/wicket/pages/DashboardPage.java

index 68a4279c0c4b21d4d2111e9e369af6e0b2343cd7..e25bcf2fe336d8dcfa704f0e2b29f78828a7f713 100644 (file)
@@ -142,43 +142,6 @@ public abstract class DashboardPage extends RootPage {
                }\r
        }\r
        \r
-       protected Fragment createNgList(String wicketId, String fragmentId, String ngController, List<RepositoryModel> repositories) {\r
-               String format = GitBlit.getString(Keys.web.datestampShortFormat, "MM/dd/yy");\r
-               final DateFormat df = new SimpleDateFormat(format);\r
-               df.setTimeZone(getTimeZone());\r
-\r
-               Fragment fragment = new Fragment(wicketId, fragmentId, this);\r
-               \r
-               List<RepoListItem> list = new ArrayList<RepoListItem>();\r
-               for (RepositoryModel repo : repositories) {\r
-                       String name = StringUtils.stripDotGit(repo.name); \r
-                       String path = "";\r
-                       if (name.indexOf('/') > -1) {\r
-                               path = name.substring(0, name.lastIndexOf('/') + 1);\r
-                               name = name.substring(name.lastIndexOf('/') + 1);\r
-                       }\r
-                       \r
-                       RepoListItem item = new RepoListItem();\r
-                       item.n = name;\r
-                       item.p = path;\r
-                       item.r = repo.name;\r
-                       item.i = repo.description;\r
-                       item.s = GitBlit.self().getStarCount(repo);\r
-                       item.t = getTimeUtils().timeAgo(repo.lastChange);\r
-                       item.d = df.format(repo.lastChange);\r
-                       item.c = StringUtils.getColor(StringUtils.stripDotGit(repo.name));\r
-                       item.wc = repo.isBare ? 0 : 1;\r
-                       list.add(item);\r
-               }\r
-               \r
-               // inject an AngularJS controller with static data\r
-               NgController ctrl = new NgController(ngController);\r
-               ctrl.addVariable(wicketId, list);\r
-               add(new HeaderContributor(ctrl));\r
-               \r
-               return fragment;\r
-       }\r
-\r
        @Override\r
        protected void addDropDownMenus(List<PageRegistration> pages) {\r
                PageParameters params = getPageParameters();\r
@@ -281,19 +244,4 @@ public abstract class DashboardPage extends RootPage {
                add(new HeaderContributor(charts));             \r
                frag.add(new Fragment("charts", "chartsFragment", this));\r
        }\r
-       \r
-       protected class RepoListItem implements Serializable {\r
-\r
-               private static final long serialVersionUID = 1L;\r
-               \r
-               String r; // repository\r
-               String n; // name\r
-               String p; // project/path\r
-               String t; // time ago\r
-               String d; // last updated\r
-               String i; // information/description\r
-               long s; // stars\r
-               String c; // html color\r
-               int wc; // working copy, 1 = true\r
-       }\r
 }\r