mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-23 03:59:25 +01:00
Reduce application search engine results list for Dashboards
Summary: Ref T10390. Simplifies dropdown by rolling out canUseInPanel in useless panels Test Plan: Add a query panel, see less options. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T10390 Differential Revision: https://secure.phabricator.com/D17341
This commit is contained in:
parent
254ee82a0c
commit
bf44210dc8
30 changed files with 108 additions and 8 deletions
|
@ -4,7 +4,7 @@ final class PhabricatorCommitSearchEngine
|
||||||
extends PhabricatorApplicationSearchEngine {
|
extends PhabricatorApplicationSearchEngine {
|
||||||
|
|
||||||
public function getResultTypeDescription() {
|
public function getResultTypeDescription() {
|
||||||
return pht('Commits');
|
return pht('Diffusion Commits');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
public function getApplicationClassName() {
|
||||||
|
|
|
@ -4,13 +4,17 @@ final class PhabricatorAuthInviteSearchEngine
|
||||||
extends PhabricatorApplicationSearchEngine {
|
extends PhabricatorApplicationSearchEngine {
|
||||||
|
|
||||||
public function getResultTypeDescription() {
|
public function getResultTypeDescription() {
|
||||||
return pht('Email Invites');
|
return pht('Auth Email Invites');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
public function getApplicationClassName() {
|
||||||
return 'PhabricatorAuthApplication';
|
return 'PhabricatorAuthApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
||||||
$saved = new PhabricatorSavedQuery();
|
$saved = new PhabricatorSavedQuery();
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ final class PhabricatorBadgesSearchEngine
|
||||||
extends PhabricatorApplicationSearchEngine {
|
extends PhabricatorApplicationSearchEngine {
|
||||||
|
|
||||||
public function getResultTypeDescription() {
|
public function getResultTypeDescription() {
|
||||||
return pht('Badge');
|
return pht('Badges');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
public function getApplicationClassName() {
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorCalendarExportSearchEngine
|
||||||
return 'PhabricatorCalendarApplication';
|
return 'PhabricatorCalendarApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function newQuery() {
|
public function newQuery() {
|
||||||
$viewer = $this->requireViewer();
|
$viewer = $this->requireViewer();
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorCalendarImportLogSearchEngine
|
||||||
return 'PhabricatorCalendarApplication';
|
return 'PhabricatorCalendarApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function newQuery() {
|
public function newQuery() {
|
||||||
return new PhabricatorCalendarImportLogQuery();
|
return new PhabricatorCalendarImportLogQuery();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorCalendarImportSearchEngine
|
||||||
return 'PhabricatorCalendarApplication';
|
return 'PhabricatorCalendarApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function newQuery() {
|
public function newQuery() {
|
||||||
return new PhabricatorCalendarImportQuery();
|
return new PhabricatorCalendarImportQuery();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorConduitLogSearchEngine
|
||||||
return 'PhabricatorConduitApplication';
|
return 'PhabricatorConduitApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function newQuery() {
|
public function newQuery() {
|
||||||
return new PhabricatorConduitLogQuery();
|
return new PhabricatorConduitLogQuery();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorConduitSearchEngine
|
||||||
return 'PhabricatorConduitApplication';
|
return 'PhabricatorConduitApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getPageSize(PhabricatorSavedQuery $saved) {
|
public function getPageSize(PhabricatorSavedQuery $saved) {
|
||||||
return PHP_INT_MAX - 1;
|
return PHP_INT_MAX - 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ final class ConpherenceThreadSearchEngine
|
||||||
extends PhabricatorApplicationSearchEngine {
|
extends PhabricatorApplicationSearchEngine {
|
||||||
|
|
||||||
public function getResultTypeDescription() {
|
public function getResultTypeDescription() {
|
||||||
return pht('Rooms');
|
return pht('Conpherence Rooms');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
public function getApplicationClassName() {
|
||||||
|
|
|
@ -15,6 +15,10 @@ final class PhabricatorDashboardPanelSearchEngine
|
||||||
return new PhabricatorDashboardPanelQuery();
|
return new PhabricatorDashboardPanelQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildQueryFromParameters(array $map) {
|
protected function buildQueryFromParameters(array $map) {
|
||||||
$query = $this->newQuery();
|
$query = $this->newQuery();
|
||||||
if ($map['status']) {
|
if ($map['status']) {
|
||||||
|
|
|
@ -16,6 +16,10 @@ final class PhabricatorDashboardSearchEngine
|
||||||
->needPanels(true);
|
->needPanels(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildCustomSearchFields() {
|
protected function buildCustomSearchFields() {
|
||||||
return array(
|
return array(
|
||||||
id(new PhabricatorSearchTextField())
|
id(new PhabricatorSearchTextField())
|
||||||
|
|
|
@ -10,6 +10,10 @@ final class DivinerAtomSearchEngine extends PhabricatorApplicationSearchEngine {
|
||||||
return 'PhabricatorDivinerApplication';
|
return 'PhabricatorDivinerApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
||||||
$saved = new PhabricatorSavedQuery();
|
$saved = new PhabricatorSavedQuery();
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorFileSearchEngine
|
||||||
return 'PhabricatorFilesApplication';
|
return 'PhabricatorFilesApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function newQuery() {
|
public function newQuery() {
|
||||||
return new PhabricatorFileQuery();
|
return new PhabricatorFileQuery();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class HeraldTranscriptSearchEngine
|
||||||
return 'PhabricatorHeraldApplication';
|
return 'PhabricatorHeraldApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
||||||
$saved = new PhabricatorSavedQuery();
|
$saved = new PhabricatorSavedQuery();
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ final class ManiphestTaskSearchEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResultTypeDescription() {
|
public function getResultTypeDescription() {
|
||||||
return pht('Tasks');
|
return pht('Maniphest Tasks');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
public function getApplicationClassName() {
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorMetaMTAMailSearchEngine
|
||||||
return 'PhabricatorMetaMTAApplication';
|
return 'PhabricatorMetaMTAApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function newQuery() {
|
public function newQuery() {
|
||||||
return new PhabricatorMetaMTAMailQuery();
|
return new PhabricatorMetaMTAMailQuery();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorOAuthServerClientSearchEngine
|
||||||
return 'PhabricatorOAuthServerApplication';
|
return 'PhabricatorOAuthServerApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function newQuery() {
|
public function newQuery() {
|
||||||
return id(new PhabricatorOAuthServerClientQuery());
|
return id(new PhabricatorOAuthServerClientQuery());
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,10 @@ final class PhabricatorOwnersPackageSearchEngine
|
||||||
return new PhabricatorOwnersPackageQuery();
|
return new PhabricatorOwnersPackageQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildCustomSearchFields() {
|
protected function buildCustomSearchFields() {
|
||||||
return array(
|
return array(
|
||||||
id(new PhabricatorSearchDatasourceField())
|
id(new PhabricatorSearchDatasourceField())
|
||||||
|
|
|
@ -15,6 +15,10 @@ final class PhabricatorPackagesPackageSearchEngine
|
||||||
return id(new PhabricatorPackagesPackageQuery());
|
return id(new PhabricatorPackagesPackageQuery());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildQueryFromParameters(array $map) {
|
protected function buildQueryFromParameters(array $map) {
|
||||||
$query = $this->newQuery();
|
$query = $this->newQuery();
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,10 @@ final class PhabricatorPackagesPublisherSearchEngine
|
||||||
return id(new PhabricatorPackagesPublisherQuery());
|
return id(new PhabricatorPackagesPublisherQuery());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildQueryFromParameters(array $map) {
|
protected function buildQueryFromParameters(array $map) {
|
||||||
$query = $this->newQuery();
|
$query = $this->newQuery();
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,10 @@ final class PhabricatorPackagesVersionSearchEngine
|
||||||
return id(new PhabricatorPackagesVersionQuery());
|
return id(new PhabricatorPackagesVersionQuery());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildQueryFromParameters(array $map) {
|
protected function buildQueryFromParameters(array $map) {
|
||||||
$query = $this->newQuery();
|
$query = $this->newQuery();
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,11 @@ final class PhrequentSearchEngine extends PhabricatorApplicationSearchEngine {
|
||||||
return 'PhabricatorPhrequentApplication';
|
return 'PhabricatorPhrequentApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getPageSize(PhabricatorSavedQuery $saved) {
|
public function getPageSize(PhabricatorSavedQuery $saved) {
|
||||||
return $saved->getParameter('limit', 1000);
|
return $saved->getParameter('limit', 1000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ final class PhabricatorPhurlURLSearchEngine
|
||||||
extends PhabricatorApplicationSearchEngine {
|
extends PhabricatorApplicationSearchEngine {
|
||||||
|
|
||||||
public function getResultTypeDescription() {
|
public function getResultTypeDescription() {
|
||||||
return pht('Shortened URLs');
|
return pht('Phurl URLs');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
public function getApplicationClassName() {
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorProjectColumnSearchEngine
|
||||||
return 'PhabricatorProjectApplication';
|
return 'PhabricatorProjectApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function newQuery() {
|
public function newQuery() {
|
||||||
return new PhabricatorProjectColumnQuery();
|
return new PhabricatorProjectColumnQuery();
|
||||||
}
|
}
|
||||||
|
@ -25,7 +29,6 @@ final class PhabricatorProjectColumnSearchEngine
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function buildQueryFromParameters(array $map) {
|
protected function buildQueryFromParameters(array $map) {
|
||||||
$query = $this->newQuery();
|
$query = $this->newQuery();
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,10 @@ final class ReleephBranchSearchEngine
|
||||||
return pht('Releeph Branches');
|
return pht('Releeph Branches');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
public function getApplicationClassName() {
|
||||||
return 'PhabricatorReleephApplication';
|
return 'PhabricatorReleephApplication';
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class ReleephProductSearchEngine
|
||||||
return 'PhabricatorReleephApplication';
|
return 'PhabricatorReleephApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
||||||
$saved = new PhabricatorSavedQuery();
|
$saved = new PhabricatorSavedQuery();
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,10 @@ final class ReleephRequestSearchEngine
|
||||||
return 'PhabricatorReleephApplication';
|
return 'PhabricatorReleephApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function setBranch(ReleephBranch $branch) {
|
public function setBranch(ReleephBranch $branch) {
|
||||||
$this->branch = $branch;
|
$this->branch = $branch;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -11,6 +11,10 @@ final class PhabricatorSearchApplicationSearchEngine
|
||||||
return 'PhabricatorSearchApplication';
|
return 'PhabricatorSearchApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
||||||
$saved = new PhabricatorSavedQuery();
|
$saved = new PhabricatorSavedQuery();
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,10 @@ final class PhabricatorEditEngineSearchEngine
|
||||||
return id(new PhabricatorEditEngineQuery());
|
return id(new PhabricatorEditEngineQuery());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildQueryFromParameters(array $map) {
|
protected function buildQueryFromParameters(array $map) {
|
||||||
$query = $this->newQuery();
|
$query = $this->newQuery();
|
||||||
return $query;
|
return $query;
|
||||||
|
|
|
@ -4,7 +4,7 @@ final class PhabricatorWorkerBulkJobSearchEngine
|
||||||
extends PhabricatorApplicationSearchEngine {
|
extends PhabricatorApplicationSearchEngine {
|
||||||
|
|
||||||
public function getResultTypeDescription() {
|
public function getResultTypeDescription() {
|
||||||
return pht('Bulk Jobs');
|
return pht('Daemon Bulk Jobs');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
public function getApplicationClassName() {
|
||||||
|
@ -15,6 +15,10 @@ final class PhabricatorWorkerBulkJobSearchEngine
|
||||||
return id(new PhabricatorWorkerBulkJobQuery());
|
return id(new PhabricatorWorkerBulkJobQuery());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canUseInPanelContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildQueryFromParameters(array $map) {
|
protected function buildQueryFromParameters(array $map) {
|
||||||
$query = $this->newQuery();
|
$query = $this->newQuery();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue