From ed9717d4e8d36bdc37a48bb0bdf8a000a1362127 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 30 Sep 2013 08:07:56 -0400 Subject: Remove issue artifacts from classes missed in previous purge Change-Id: Ie0b7d1e11d634577e943c8e4dbab080b0078f1b4 --- src/main/java/com/gitblit/Constants.java | 2 +- src/main/java/com/gitblit/LuceneExecutor.java | 6 ------ src/main/java/com/gitblit/models/SearchResult.java | 6 ------ src/main/java/com/gitblit/wicket/WicketUtils.java | 16 ---------------- .../java/com/gitblit/wicket/pages/LuceneSearchPage.java | 8 -------- 5 files changed, 1 insertion(+), 37 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/gitblit/Constants.java b/src/main/java/com/gitblit/Constants.java index 3ac7082e..b36321e3 100644 --- a/src/main/java/com/gitblit/Constants.java +++ b/src/main/java/com/gitblit/Constants.java @@ -389,7 +389,7 @@ public class Constants { * The types of objects that can be indexed and queried. */ public static enum SearchObjectType { - commit, blob, issue; + commit, blob; static SearchObjectType fromName(String name) { for (SearchObjectType value : values()) { diff --git a/src/main/java/com/gitblit/LuceneExecutor.java b/src/main/java/com/gitblit/LuceneExecutor.java index 3446289a..376a763a 100644 --- a/src/main/java/com/gitblit/LuceneExecutor.java +++ b/src/main/java/com/gitblit/LuceneExecutor.java @@ -114,7 +114,6 @@ public class LuceneExecutor implements Runnable { private static final String FIELD_COMMITTER = "committer"; private static final String FIELD_DATE = "date"; private static final String FIELD_TAG = "tag"; - private static final String FIELD_LABEL = "label"; private static final String CONF_FILE = "lucene.conf"; private static final String LUCENE_DIR = "lucene"; @@ -924,9 +923,6 @@ public class LuceneExecutor implements Runnable { if (doc.get(FIELD_TAG) != null) { result.tags = StringUtils.getStringsFromValue(doc.get(FIELD_TAG)); } - if (doc.get(FIELD_LABEL) != null) { - result.labels = StringUtils.getStringsFromValue(doc.get(FIELD_LABEL)); - } return result; } @@ -1197,13 +1193,11 @@ public class LuceneExecutor implements Runnable { int branchCount; int commitCount; int blobCount; - int issueCount; void add(IndexResult result) { this.branchCount += result.branchCount; this.commitCount += result.commitCount; this.blobCount += result.blobCount; - this.issueCount += result.issueCount; } void success() { diff --git a/src/main/java/com/gitblit/models/SearchResult.java b/src/main/java/com/gitblit/models/SearchResult.java index efd1b075..ee27a063 100644 --- a/src/main/java/com/gitblit/models/SearchResult.java +++ b/src/main/java/com/gitblit/models/SearchResult.java @@ -40,12 +40,8 @@ public class SearchResult implements Serializable { public String path; - public String issueId; - public List tags; - public List labels; - public SearchObjectType type; public SearchResult() { @@ -57,8 +53,6 @@ public class SearchResult implements Serializable { return path; case commit: return commitId; - case issue: - return issueId; } return commitId; } diff --git a/src/main/java/com/gitblit/wicket/WicketUtils.java b/src/main/java/com/gitblit/wicket/WicketUtils.java index aa86686c..1cf465e1 100644 --- a/src/main/java/com/gitblit/wicket/WicketUtils.java +++ b/src/main/java/com/gitblit/wicket/WicketUtils.java @@ -95,22 +95,6 @@ public class WicketUtils { } } - public static void setTicketCssClass(Component container, String state) { - String css = null; - if (state.equals("open")) { - css = "label label-important"; - } else if (state.equals("hold")) { - css = "label label-warning"; - } else if (state.equals("resolved")) { - css = "label label-success"; - } else if (state.equals("invalid")) { - css = "label"; - } - if (css != null) { - setCssClass(container, css); - } - } - public static void setPermissionClass(Component container, AccessPermission permission) { if (permission == null) { setCssClass(container, "badge"); diff --git a/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java b/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java index 79795ff2..98738b63 100644 --- a/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java +++ b/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java @@ -218,14 +218,6 @@ public class LuceneSearchPage extends RootPage { item.add(new Label("tags").setVisible(false)); break; } - case issue: { - Label icon = WicketUtils.newIcon("type", "icon-file"); - WicketUtils.setHtmlTooltip(icon, "issue"); - item.add(icon); - item.add(new Label("summary", "issue: " + sr.issueId)); - item.add(new Label("tags").setVisible(false)); - break; - } } item.add(new Label("fragment", sr.fragment).setEscapeModelStrings(false).setVisible(!StringUtils.isEmpty(sr.fragment))); item.add(new LinkPanel("repository", null, sr.repository, SummaryPage.class, WicketUtils.newRepositoryParameter(sr.repository))); -- cgit v1.2.3