3 final class HarbormasterBuildLogSearchEngine
4 extends PhabricatorApplicationSearchEngine
{
6 public function getResultTypeDescription() {
7 return pht('Harbormaster Build Logs');
10 public function getApplicationClassName() {
11 return 'PhabricatorHarbormasterApplication';
14 public function newQuery() {
15 return new HarbormasterBuildLogQuery();
18 protected function buildCustomSearchFields() {
20 id(new PhabricatorPHIDsSearchField())
21 ->setLabel(pht('Build Targets'))
22 ->setKey('buildTargetPHIDs')
34 pht('Search for logs that belong to a particular build target.')),
38 protected function buildQueryFromParameters(array $map) {
39 $query = $this->newQuery();
41 if ($map['buildTargetPHIDs']) {
42 $query->withBuildTargetPHIDs($map['buildTargetPHIDs']);
48 protected function getURI($path) {
49 return '/harbormaster/log/'.$path;
52 protected function getBuiltinQueryNames() {
54 'all' => pht('All Builds'),
58 public function buildSavedQueryFromBuiltin($query_key) {
59 $query = $this->newSavedQuery();
60 $query->setQueryKey($query_key);
67 return parent
::buildSavedQueryFromBuiltin($query_key);
70 protected function renderResultList(
72 PhabricatorSavedQuery
$query,
75 // For now, this SearchEngine is only for driving the API.
76 throw new PhutilMethodNotImplementedException();