Remove issue artifacts from classes missed in previous purge
Change-Id: Ie0b7d1e11d634577e943c8e4dbab080b0078f1b4
| | |
| | | * 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()) {
|
| | |
| | | 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";
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | |
| | | 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() {
|
| | |
| | |
|
| | | public String path;
|
| | |
|
| | | public String issueId;
|
| | |
|
| | | public List<String> tags;
|
| | | |
| | | public List<String> labels;
|
| | |
|
| | | public SearchObjectType type;
|
| | |
|
| | |
| | | return path;
|
| | | case commit:
|
| | | return commitId;
|
| | | case issue:
|
| | | return issueId;
|
| | | }
|
| | | return commitId;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | 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");
|
| | |
| | | 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)));
|