1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 21:32:43 +01:00

Update Multimeter to new UI

Summary: Converts to two column UI

Test Plan: Review a multiple sample page

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15584
This commit is contained in:
Chad Little 2016-04-02 13:16:51 -07:00
parent 2992b5277a
commit bdeb5cf141

View file

@ -230,17 +230,15 @@ final class MultimeterSampleController extends MultimeterController {
)); ));
$box = id(new PHUIObjectBoxView()) $box = id(new PHUIObjectBoxView())
->setHeaderText( ->setHeaderText(pht('Samples'))
pht( ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
'Samples (%s - %s)',
phabricator_datetime($ago, $viewer),
phabricator_datetime($now, $viewer)))
->setTable($table); ->setTable($table);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb( $crumbs->addTextCrumb(
pht('Samples'), pht('Samples'),
$this->getGroupURI(array(), true)); $this->getGroupURI(array(), true));
$crumbs->setBorder(true);
$crumb_map = array( $crumb_map = array(
'host' => pht('By Host'), 'host' => pht('By Host'),
@ -262,14 +260,23 @@ final class MultimeterSampleController extends MultimeterController {
$this->getGroupURI($parts, true)); $this->getGroupURI($parts, true));
} }
return $this->buildApplicationPage( $header = id(new PHUIHeaderView())
array( ->setHeader(
$crumbs, pht(
$box, 'Samples (%s - %s)',
), phabricator_datetime($ago, $viewer),
array( phabricator_datetime($now, $viewer)))
'title' => pht('Samples'), ->setHeaderIcon('fa-motorcycle');
));
$view = id(new PHUITwoColumnView())
->setHeader($header)
->setFooter($box);
return $this->newPage()
->setTitle(pht('Samples'))
->setCrumbs($crumbs)
->appendChild($view);
} }
private function renderGroupingLink(array $group, $key, $name = null) { private function renderGroupingLink(array $group, $key, $name = null) {