Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/query/PhabricatorPeopleLogSearchEngine.php
| Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | protected function buildQueryFromParameters(array $map) { | ||||
| if (strlen($map['ip'])) { | if (strlen($map['ip'])) { | ||||
| $query->withRemoteAddressPrefix($map['ip']); | $query->withRemoteAddressPrefix($map['ip']); | ||||
| } | } | ||||
| if ($map['sessions']) { | if ($map['sessions']) { | ||||
| $query->withSessionKeys($map['sessions']); | $query->withSessionKeys($map['sessions']); | ||||
| } | } | ||||
| if ($map['createdStart'] || $map['createdEnd']) { | |||||
| $query->withDateCreatedBetween( | |||||
| $map['createdStart'], | |||||
| $map['createdEnd']); | |||||
| } | |||||
| return $query; | return $query; | ||||
| } | } | ||||
| protected function buildCustomSearchFields() { | protected function buildCustomSearchFields() { | ||||
| return array( | return array( | ||||
| id(new PhabricatorUsersSearchField()) | id(new PhabricatorUsersSearchField()) | ||||
| ->setKey('userPHIDs') | ->setKey('userPHIDs') | ||||
| ->setAliases(array('users', 'user', 'userPHID')) | ->setAliases(array('users', 'user', 'userPHID')) | ||||
| Show All 12 Lines | return array( | ||||
| id(new PhabricatorSearchTextField()) | id(new PhabricatorSearchTextField()) | ||||
| ->setKey('ip') | ->setKey('ip') | ||||
| ->setLabel(pht('Filter IP')) | ->setLabel(pht('Filter IP')) | ||||
| ->setDescription(pht('Search for actions by remote address.')), | ->setDescription(pht('Search for actions by remote address.')), | ||||
| id(new PhabricatorSearchStringListField()) | id(new PhabricatorSearchStringListField()) | ||||
| ->setKey('sessions') | ->setKey('sessions') | ||||
| ->setLabel(pht('Sessions')) | ->setLabel(pht('Sessions')) | ||||
| ->setDescription(pht('Search for activity in particular sessions.')), | ->setDescription(pht('Search for activity in particular sessions.')), | ||||
| 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 '/people/logs/'.$path; | return '/people/logs/'.$path; | ||||
| } | } | ||||
| protected function getBuiltinQueryNames() { | protected function getBuiltinQueryNames() { | ||||
| ▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines | |||||