Page MenuHomePhabricator

On panel pages, show where panels are used
ClosedPublic

Authored by epriestley on Apr 11 2019, 7:02 PM.

Details

Summary

Depends on D20398. Ref T13272. Fixes T6018. Previously, panels showed "used on dashboards: x, y", but this did not include cases where a panel was used by another container panel (today, a tab panel).

Do edge indexing when a dashboard or panel is saved, then pull the edges on the Panel page so we can provide a full list of uses.

Test Plan

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Apr 11 2019, 7:02 PM
epriestley requested review of this revision.Apr 11 2019, 7:04 PM
amckinley accepted this revision.Apr 11 2019, 9:54 PM
amckinley added inline comments.
src/applications/dashboard/interface/PhabricatorDashboardPanelContainerInterface.php
4

Was this supposed to get an interface implementation template? I guess it's only ever going to have the two implementors in this diff...

src/applications/dashboard/query/PhabricatorDashboardPanelQuery.php
105

Intentional? At least in my DB, the table looks like local_dashboard.dashboard_panel.

This revision is now accepted and ready to land.Apr 11 2019, 9:54 PM
epriestley added inline comments.Apr 11 2019, 9:57 PM
src/applications/dashboard/query/PhabricatorDashboardPanelQuery.php
105

We SELECT * FROM dashboard_panel AS <this alias> in query construction, so it can be anything, as long as the rest of the query uses the same string.

It's mostly so when we join we can disambiguate between various id, phid, dateCreated, etc., columns.

I was initially adding a JOIN here but didn't need it, but kept the alias change since it's more consistent with other queries.

amckinley added inline comments.Apr 11 2019, 9:58 PM
src/applications/dashboard/query/PhabricatorDashboardPanelQuery.php
105

Ahhh that makes more sense.

epriestley added inline comments.Apr 11 2019, 9:59 PM
src/applications/dashboard/interface/PhabricatorDashboardPanelContainerInterface.php
4

(And, yeah, this one was "we probably only ever have two of these, I hope".)

This revision was automatically updated to reflect the committed changes.