Differential D18970 Diff 45502 src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php
| Show All 20 Lines | protected function buildQueryFromParameters(array $map) { | ||||
| if ($map['repositoryPHIDs']) { | if ($map['repositoryPHIDs']) { | ||||
| $query->withRepositoryPHIDs($map['repositoryPHIDs']); | $query->withRepositoryPHIDs($map['repositoryPHIDs']); | ||||
| } | } | ||||
| if ($map['pusherPHIDs']) { | if ($map['pusherPHIDs']) { | ||||
| $query->withPusherPHIDs($map['pusherPHIDs']); | $query->withPusherPHIDs($map['pusherPHIDs']); | ||||
| } | } | ||||
| if ($map['createdStart'] || $map['createdEnd']) { | |||||
| $query->withEpochBetween( | |||||
| $map['createdStart'], | |||||
| $map['createdEnd']); | |||||
| } | |||||
| return $query; | return $query; | ||||
| } | } | ||||
| protected function buildCustomSearchFields() { | protected function buildCustomSearchFields() { | ||||
| return array( | return array( | ||||
| id(new PhabricatorSearchDatasourceField()) | id(new PhabricatorSearchDatasourceField()) | ||||
| ->setDatasource(new DiffusionRepositoryDatasource()) | ->setDatasource(new DiffusionRepositoryDatasource()) | ||||
| ->setKey('repositoryPHIDs') | ->setKey('repositoryPHIDs') | ||||
| ->setAliases(array('repository', 'repositories', 'repositoryPHID')) | ->setAliases(array('repository', 'repositories', 'repositoryPHID')) | ||||
| ->setLabel(pht('Repositories')) | ->setLabel(pht('Repositories')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Search for pull logs for specific repositories.')), | pht('Search for pull logs for specific repositories.')), | ||||
| id(new PhabricatorUsersSearchField()) | id(new PhabricatorUsersSearchField()) | ||||
| ->setKey('pusherPHIDs') | ->setKey('pusherPHIDs') | ||||
| ->setAliases(array('pusher', 'pushers', 'pusherPHID')) | ->setAliases(array('pusher', 'pushers', 'pusherPHID')) | ||||
| ->setLabel(pht('Pushers')) | ->setLabel(pht('Pushers')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Search for pull logs by specific users.')), | pht('Search for pull logs by specific users.')), | ||||
| id(new PhabricatorSearchDateField()) | |||||
| ->setLabel(pht('Created After')) | |||||
| ->setKey('createdStart'), | |||||
| id(new PhabricatorSearchDateField()) | |||||
| ->setLabel(pht('Created Before')) | |||||
| ->setKey('createdEnd'), | |||||
| ); | ); | ||||
| } | } | ||||
| protected function getURI($path) { | protected function getURI($path) { | ||||
| return '/diffusion/pushlog/'.$path; | return '/diffusion/pushlog/'.$path; | ||||
| } | } | ||||
| protected function getBuiltinQueryNames() { | protected function getBuiltinQueryNames() { | ||||
| ▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines | |||||