Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/controller/DrydockController.php
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | $table = id(new AphrontTableView($rows)) | ||||
null, | null, | ||||
null, | null, | ||||
)); | )); | ||||
return id(new PHUIPropertyListView()) | return id(new PHUIPropertyListView()) | ||||
->addRawContent($table); | ->addRawContent($table); | ||||
} | } | ||||
protected function buildLogBox(DrydockLogQuery $query, $all_uri) { | protected function buildLogTable(DrydockLogQuery $query) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$logs = $query | $logs = $query | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setLimit(100) | ->setLimit(100) | ||||
->execute(); | ->execute(); | ||||
$log_table = id(new DrydockLogListView()) | $log_table = id(new DrydockLogListView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setLogs($logs) | ->setLogs($logs); | ||||
->render(); | |||||
return $log_table; | |||||
} | |||||
protected function buildLogBox(DrydockLogListView $log_table, $all_uri) { | |||||
$log_header = id(new PHUIHeaderView()) | $log_header = id(new PHUIHeaderView()) | ||||
->setHeader(pht('Logs')) | ->setHeader(pht('Logs')) | ||||
->addActionLink( | ->addActionLink( | ||||
id(new PHUIButtonView()) | id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setHref($all_uri) | ->setHref($all_uri) | ||||
->setIcon('fa-search') | ->setIcon('fa-search') | ||||
->setText(pht('View All'))); | ->setText(pht('View All'))); | ||||
return id(new PHUIObjectBoxView()) | return id(new PHUIObjectBoxView()) | ||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ||||
->setHeader($log_header) | ->setHeader($log_header) | ||||
->setTable($log_table); | ->setTable($log_table); | ||||
} | } | ||||
} | } |