forked from jenkinsci/jenkins
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d45ca7
commit 2b6ffc8
Showing
12 changed files
with
70 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,16 @@ | ||
package hudson.search; | ||
|
||
import org.kohsuke.stapler.export.Exported; | ||
import org.kohsuke.stapler.export.ExportedBean; | ||
public final class SearchGroup { | ||
|
||
@ExportedBean(defaultVisibility = 999) | ||
public class SearchGroup { | ||
public static final String VIEW = Messages.SearchGroup_views(); | ||
|
||
private final String displayName; | ||
public static final String BUILD = Messages.SearchGroup_builds(); | ||
|
||
public SearchGroup(String displayName) { | ||
this.displayName = displayName; | ||
} | ||
public static final String COMPUTER = Messages.SearchGroup_nodes(); | ||
|
||
@Exported | ||
public String getDisplayName() { | ||
return displayName; | ||
} | ||
public static final String PROJECT = Messages.SearchGroup_projects(); | ||
|
||
public static final SearchGroup VIEW = new SearchGroup(Messages.SearchGroup_views()); | ||
public static final String PEOPLE = Messages.SearchGroup_people(); | ||
|
||
public static final SearchGroup BUILD = new SearchGroup(Messages.SearchGroup_builds()); | ||
|
||
public static final SearchGroup COMPUTER = new SearchGroup(Messages.SearchGroup_nodes()); | ||
|
||
public static final SearchGroup PROJECT = new SearchGroup(Messages.SearchGroup_projects()); | ||
|
||
public static final SearchGroup PEOPLE = new SearchGroup(Messages.SearchGroup_people()); | ||
|
||
public static final SearchGroup OTHER = new SearchGroup(Messages.SearchGroup_other()); | ||
public static final String OTHER = Messages.SearchGroup_other(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Group results by 'group' field into a map | ||
*/ | ||
export function groupResultsByCategory(array) { | ||
return array.reduce((hash, obj) => { | ||
if (obj.group === undefined) { | ||
return hash; | ||
} | ||
return Object.assign(hash, { | ||
[obj.group]: (hash[obj.group] || []).concat(obj), | ||
}); | ||
}, {}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters