Page MenuHomePhabricator

Add ability to query dashboard panels by paneltype
ClosedPublic

Authored by chad on Feb 17 2015, 2:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 3, 5:06 AM
Unknown Object (File)
Mon, Sep 2, 8:31 PM
Unknown Object (File)
Sat, Aug 31, 2:34 PM
Unknown Object (File)
Fri, Aug 30, 10:07 PM
Unknown Object (File)
Tue, Aug 20, 5:51 AM
Unknown Object (File)
Mon, Aug 19, 6:07 PM
Unknown Object (File)
Sat, Aug 17, 9:03 AM
Unknown Object (File)
Sat, Aug 17, 1:09 AM
Subscribers

Details

Summary

Pretty basic, but you can now search panels by type (query, text, tab).

Test Plan

Searched for a few different types of panels, results look correct

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chad retitled this revision from to Add ability to query dashboard panels by paneltype.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added reviewers: epriestley, btrahan.
epriestley edited edge metadata.
epriestley added inline comments.
src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php
76–78

This should be auto-generated, so new panel types show up automatically as we (or third parties) add them.

You can do something like this, I think:

$panel_types = PhabricatorDashboardPanelType::getAllPanelTypes();
$panel_types = mpull($panel_types, 'getPanelTypeName', 'getPanelTypeKey');
asort($panel_types);
$panel_types = array(
  '' => pht('(All Types)'),
+ $panel_types;

And then:

->setOptions($panel_types)
This revision now requires changes to proceed.Feb 17 2015, 1:04 PM
chad edited edge metadata.
  • Update per comments
epriestley edited edge metadata.
This revision is now accepted and ready to land.Feb 18 2015, 6:49 PM
This revision was automatically updated to reflect the committed changes.