From 423180430e61e87f79476e12c594c8223b072b94 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 3 Mar 2015 11:09:59 -0800 Subject: [PATCH] Modernize Conduit app a bit Summary: Remove some AphrontPanels, add some phts, fix some table layouts. Test Plan: Browse many Conduit pages, test a few calls. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7427 Differential Revision: https://secure.phabricator.com/D11957 --- .../PhabricatorConduitAPIController.php | 24 ++++++------------- .../PhabricatorConduitLogController.php | 24 ++++++++++--------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/src/applications/conduit/controller/PhabricatorConduitAPIController.php b/src/applications/conduit/controller/PhabricatorConduitAPIController.php index 9c7c2d0ee8..a432269dfa 100644 --- a/src/applications/conduit/controller/PhabricatorConduitAPIController.php +++ b/src/applications/conduit/controller/PhabricatorConduitAPIController.php @@ -532,7 +532,6 @@ final class PhabricatorConduitAPIController } $param_table = new AphrontTableView($param_rows); - $param_table->setDeviceReadyTable(true); $param_table->setColumnClasses( array( 'header', @@ -548,27 +547,20 @@ final class PhabricatorConduitAPIController } $result_table = new AphrontTableView($result_rows); - $result_table->setDeviceReadyTable(true); $result_table->setColumnClasses( array( 'header', 'wide', )); - $param_panel = new AphrontPanelView(); - $param_panel->setHeader('Method Parameters'); + $param_panel = new PHUIObjectBoxView(); + $param_panel->setHeaderText(pht('Method Parameters')); $param_panel->appendChild($param_table); - $result_panel = new AphrontPanelView(); - $result_panel->setHeader('Method Result'); + $result_panel = new PHUIObjectBoxView(); + $result_panel->setHeaderText(pht('Method Result')); $result_panel->appendChild($result_table); - $param_head = id(new PHUIHeaderView()) - ->setHeader(pht('Method Parameters')); - - $result_head = id(new PHUIHeaderView()) - ->setHeader(pht('Method Result')); - $method_uri = $this->getApplicationURI('method/'.$method.'/'); $crumbs = $this->buildApplicationCrumbs() @@ -578,13 +570,11 @@ final class PhabricatorConduitAPIController return $this->buildApplicationPage( array( $crumbs, - $param_head, - $param_table, - $result_head, - $result_table, + $param_panel, + $result_panel, ), array( - 'title' => 'Method Call Result', + 'title' => pht('Method Call Result'), )); } diff --git a/src/applications/conduit/controller/PhabricatorConduitLogController.php b/src/applications/conduit/controller/PhabricatorConduitLogController.php index 07c48dd2f5..d8da592372 100644 --- a/src/applications/conduit/controller/PhabricatorConduitLogController.php +++ b/src/applications/conduit/controller/PhabricatorConduitLogController.php @@ -35,6 +35,9 @@ final class PhabricatorConduitLogController } $table = $this->renderCallTable($calls, $conns); + $box = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Call Logs')) + ->appendChild($table); $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('Call Logs')); @@ -42,11 +45,11 @@ final class PhabricatorConduitLogController return $this->buildApplicationPage( array( $crumbs, - $table, + $box, $pager, ), array( - 'title' => 'Conduit Logs', + 'title' => pht('Conduit Logs'), )); } @@ -100,18 +103,17 @@ final class PhabricatorConduitLogController ); } - $table = id(new AphrontTableView($rows)) - ->setDeviceReadyTable(true); + $table = id(new AphrontTableView($rows)); $table->setHeaders( array( - 'Connection', - 'User', - 'Method', - 'Status', - 'Error', - 'Duration', - 'Date', + pht('Connection'), + pht('User'), + pht('Method'), + pht('Status'), + pht('Error'), + pht('Duration'), + pht('Date'), )); $table->setColumnClasses( array(