Allow panels to appear on dashboards
Summary:
Ref T3583. Adds edges, query relationships, etc. Lots of debugging/temporary UI.
My general intent here is to use edges to track where panels appear, and then put additional data on the dashboard itself to control layout, positioning, etc.
Dashboards don't actually render yet so this is still pretty boring.
Test Plan:
{F149175}
{F149176}
{F149177}
Reviewers: chad, btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T3583
Differential Revision: https://secure.phabricator.com/D8916
This commit is contained in:
@@ -16,6 +16,7 @@ final class PhabricatorDashboardViewController
|
||||
$dashboard = id(new PhabricatorDashboardQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($this->id))
|
||||
->needPanels(true)
|
||||
->executeOne();
|
||||
if (!$dashboard) {
|
||||
return new Aphront404Response();
|
||||
@@ -77,6 +78,14 @@ final class PhabricatorDashboardViewController
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit));
|
||||
|
||||
$actions->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Add Panel'))
|
||||
->setIcon('new')
|
||||
->setHref($this->getApplicationURI("addpanel/{$id}/"))
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(true));
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
@@ -95,6 +104,13 @@ final class PhabricatorDashboardViewController
|
||||
pht('Editable By'),
|
||||
$descriptions[PhabricatorPolicyCapability::CAN_EDIT]);
|
||||
|
||||
$panel_phids = $dashboard->getPanelPHIDs();
|
||||
$this->loadHandles($panel_phids);
|
||||
|
||||
$properties->addProperty(
|
||||
pht('Panels'),
|
||||
$this->renderHandlesForPHIDs($panel_phids));
|
||||
|
||||
return $properties;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user