Update Dashboards for handleRequest
Summary: Updates Dashboards app Test Plan: Click on Manage Dashboard, page load a.ok Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D13836
This commit is contained in:
@@ -3,16 +3,10 @@
|
|||||||
final class PhabricatorDashboardManageController
|
final class PhabricatorDashboardManageController
|
||||||
extends PhabricatorDashboardController {
|
extends PhabricatorDashboardController {
|
||||||
|
|
||||||
private $id;
|
public function handleRequest(AphrontRequest $request) {
|
||||||
|
$viewer = $request->getViewer();
|
||||||
|
$id = $request->getURIData('id');
|
||||||
|
|
||||||
public function willProcessRequest(array $data) {
|
|
||||||
$this->id = $data['id'];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function processRequest() {
|
|
||||||
$request = $this->getRequest();
|
|
||||||
$viewer = $request->getUser();
|
|
||||||
$id = $this->id;
|
|
||||||
$dashboard_uri = $this->getApplicationURI('view/'.$id.'/');
|
$dashboard_uri = $this->getApplicationURI('view/'.$id.'/');
|
||||||
|
|
||||||
// TODO: This UI should drop a lot of capabilities if the user can't
|
// TODO: This UI should drop a lot of capabilities if the user can't
|
||||||
@@ -21,7 +15,7 @@ final class PhabricatorDashboardManageController
|
|||||||
|
|
||||||
$dashboard = id(new PhabricatorDashboardQuery())
|
$dashboard = id(new PhabricatorDashboardQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withIDs(array($this->id))
|
->withIDs(array($id))
|
||||||
->needPanels(true)
|
->needPanels(true)
|
||||||
->executeOne();
|
->executeOne();
|
||||||
if (!$dashboard) {
|
if (!$dashboard) {
|
||||||
|
|||||||
Reference in New Issue
Block a user