Improve web tools for viewing daemons
Summary: - Provides an "all daemons" view to look at more than the first 15 daemons. - Provides a "combined log" view with a large page size, to quickly look at the log across all the daemons, making it easier to find issues when you have a bunch of the same daemon and only one is having issues. - When viewing the web console on the same host as a daemon, show whether it's running or not. Test Plan: Clicked the various daemon log interfaces. Reviewed By: aran Reviewers: jungejason, tuomaspelkonen, aran CC: aran Differential Revision: 215
This commit is contained in:
@@ -34,7 +34,7 @@ class PhabricatorDaemonLogViewController extends PhabricatorDaemonController {
|
||||
}
|
||||
|
||||
$events = id(new PhabricatorDaemonLogEvent())->loadAllWhere(
|
||||
'logID = %d ORDER BY id DESC LIMIT 200',
|
||||
'logID = %d ORDER BY id DESC LIMIT 1000',
|
||||
$log->getID());
|
||||
|
||||
$content = array();
|
||||
@@ -72,44 +72,19 @@ class PhabricatorDaemonLogViewController extends PhabricatorDaemonController {
|
||||
|
||||
$content[] = $panel;
|
||||
|
||||
$rows = array();
|
||||
foreach ($events as $event) {
|
||||
$rows[] = array(
|
||||
phutil_escape_html($event->getLogType()),
|
||||
date('M j, Y', $event->getEpoch()),
|
||||
date('g:i:s A', $event->getEpoch()),
|
||||
str_replace("\n", '<br />', phutil_escape_html($event->getMessage())),
|
||||
);
|
||||
}
|
||||
|
||||
$log_table = new AphrontTableView($rows);
|
||||
$log_table->setHeaders(
|
||||
array(
|
||||
'Type',
|
||||
'Date',
|
||||
'Time',
|
||||
'Message',
|
||||
));
|
||||
$log_table->setColumnClasses(
|
||||
array(
|
||||
'',
|
||||
'',
|
||||
'right',
|
||||
'wide wrap',
|
||||
));
|
||||
$event_view = new PhabricatorDaemonLogEventsView();
|
||||
$event_view->setEvents($events);
|
||||
|
||||
$log_panel = new AphrontPanelView();
|
||||
$log_panel->setHeader('Daemon Logs');
|
||||
$log_panel->appendChild($log_table);
|
||||
$log_panel->appendChild($event_view);
|
||||
|
||||
$content[] = $log_panel;
|
||||
|
||||
|
||||
|
||||
return $this->buildStandardPageResponse(
|
||||
$content,
|
||||
array(
|
||||
'title' => 'Log',
|
||||
'title' => 'Daemon Log',
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user