buildStandardPageView(); $page->setApplicationName('Drydock'); $page->setBaseURI('/drydock/'); $page->setTitle(idx($data, 'title')); $page->setGlyph("\xE2\x98\x82"); $page->appendChild($view); $response = new AphrontWebpageResponse(); return $response->setContent($page->render()); } final protected function buildSideNav($selected) { $nav = new AphrontSideNavFilterView(); $nav->setBaseURI(new PhutilURI('/drydock/')); $nav->addFilter('resource', 'Resources'); $nav->addFilter('lease', 'Leases'); $nav->addSpacer(); $nav->addFilter('log', 'Logs'); $nav->selectFilter($selected, 'resource'); return $nav; } protected function buildLogTableView(array $logs) { assert_instances_of($logs, 'DrydockLog'); $user = $this->getRequest()->getUser(); // TODO: It's probably a stretch to claim this works on mobile. $rows = array(); foreach ($logs as $log) { $resource_uri = '/resource/'.$log->getResourceID().'/'; $resource_uri = $this->getApplicationURI($resource_uri); $lease_uri = '/lease/'.$log->getLeaseID().'/'; $lease_uri = $this->getApplicationURI($lease_uri); $rows[] = array( phutil_render_tag( 'a', array( 'href' => $resource_uri, ), phutil_escape_html($log->getResourceID())), phutil_render_tag( 'a', array( 'href' => $lease_uri, ), phutil_escape_html($log->getLeaseID())), phutil_escape_html($log->getMessage()), phabricator_datetime($log->getEpoch(), $user), ); } $table = new AphrontTableView($rows); $table->setHeaders( array( 'Resource', 'Lease', 'Message', 'Date', )); $table->setColumnClasses( array( '', '', 'wide', '', )); $panel = new AphrontPanelView(); $panel->setHeader('Logs'); $panel->appendChild($table); return $panel; } }