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
F14035949: D11782.id28403.diff
Sun, Nov 10, 8:06 AM
F14035947: D11782.id28445.diff
Sun, Nov 10, 8:06 AM
F14029881: D11782.id28403.diff
Fri, Nov 8, 10:16 PM
F13976409: D11782.id28445.diff
Fri, Oct 18, 2:08 PM
F13961922: D11782.id28446.diff
Tue, Oct 15, 7:03 AM
Unknown Object (File)
Oct 13 2024, 10:14 AM
Unknown Object (File)
Oct 6 2024, 2:34 PM
Unknown Object (File)
Sep 26 2024, 10:06 PM
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.