mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-09 22:31:03 +01:00
Modified DarkConsole Error Log to show more detailed information.
Summary: When function phlog() is called, stacktrace and detailed log information is shown in DarkConsole. Test Plan: Called 'phlog' function from various places in Phabricator and checked that the debug information was available in DarkConsole. Reviewed By: epriestley Reviewers: epriestley CC: jungejason, epriestley Differential Revision: 101
This commit is contained in:
parent
1910f43364
commit
d5ee8c792c
10 changed files with 212 additions and 101 deletions
|
@ -18,7 +18,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'aphront-dark-console-css' =>
|
'aphront-dark-console-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/056b0c12/rsrc/css/aphront/dark-console.css',
|
'uri' => '/res/0417eb95/rsrc/css/aphront/dark-console.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -61,24 +61,6 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/css/aphront/headsup-action-list-view.css',
|
'disk' => '/rsrc/css/aphront/headsup-action-list-view.css',
|
||||||
),
|
),
|
||||||
'aphront-list-filter-view-css' =>
|
|
||||||
array(
|
|
||||||
'uri' => '/res/50a790ae/rsrc/css/aphront/list-filter-view.css',
|
|
||||||
'type' => 'css',
|
|
||||||
'requires' =>
|
|
||||||
array(
|
|
||||||
),
|
|
||||||
'disk' => '/rsrc/css/aphront/list-filter-view.css',
|
|
||||||
),
|
|
||||||
'aphront-pager-view-css' =>
|
|
||||||
array(
|
|
||||||
'uri' => '/res/73ec8cd5/rsrc/css/aphront/pager-view.css',
|
|
||||||
'type' => 'css',
|
|
||||||
'requires' =>
|
|
||||||
array(
|
|
||||||
),
|
|
||||||
'disk' => '/rsrc/css/aphront/pager-view.css',
|
|
||||||
),
|
|
||||||
'aphront-panel-view-css' =>
|
'aphront-panel-view-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/8f9f3632/rsrc/css/aphront/panel-view.css',
|
'uri' => '/res/8f9f3632/rsrc/css/aphront/panel-view.css',
|
||||||
|
@ -134,6 +116,24 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/css/aphront/typeahead.css',
|
'disk' => '/rsrc/css/aphront/typeahead.css',
|
||||||
),
|
),
|
||||||
|
'aphront-pager-view-css' =>
|
||||||
|
array(
|
||||||
|
'uri' => '/res/73ec8cd5/rsrc/css/aphront/pager-view.css',
|
||||||
|
'type' => 'css',
|
||||||
|
'requires' =>
|
||||||
|
array(
|
||||||
|
),
|
||||||
|
'disk' => '/rsrc/css/aphront/pager-view.css',
|
||||||
|
),
|
||||||
|
'aphront-list-filter-view-css' =>
|
||||||
|
array(
|
||||||
|
'uri' => '/res/50a790ae/rsrc/css/aphront/list-filter-view.css',
|
||||||
|
'type' => 'css',
|
||||||
|
'requires' =>
|
||||||
|
array(
|
||||||
|
),
|
||||||
|
'disk' => '/rsrc/css/aphront/list-filter-view.css',
|
||||||
|
),
|
||||||
'phabricator-standard-page-view' =>
|
'phabricator-standard-page-view' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/0d41ea7c/rsrc/css/application/base/standard-page-view.css',
|
'uri' => '/res/0d41ea7c/rsrc/css/application/base/standard-page-view.css',
|
||||||
|
@ -297,15 +297,6 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/css/application/objectselector/object-selector.css',
|
'disk' => '/rsrc/css/application/objectselector/object-selector.css',
|
||||||
),
|
),
|
||||||
'owners-path-editor-css' =>
|
|
||||||
array(
|
|
||||||
'uri' => '/res/f40dc6b1/rsrc/css/application/owners/owners-path-editor.css',
|
|
||||||
'type' => 'css',
|
|
||||||
'requires' =>
|
|
||||||
array(
|
|
||||||
),
|
|
||||||
'disk' => '/rsrc/css/application/owners/owners-path-editor.css',
|
|
||||||
),
|
|
||||||
'phabricator-profile-css' =>
|
'phabricator-profile-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/259ad37f/rsrc/css/application/people/profile.css',
|
'uri' => '/res/259ad37f/rsrc/css/application/people/profile.css',
|
||||||
|
@ -315,6 +306,15 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/css/application/people/profile.css',
|
'disk' => '/rsrc/css/application/people/profile.css',
|
||||||
),
|
),
|
||||||
|
'owners-path-editor-css' =>
|
||||||
|
array(
|
||||||
|
'uri' => '/res/f40dc6b1/rsrc/css/application/owners/owners-path-editor.css',
|
||||||
|
'type' => 'css',
|
||||||
|
'requires' =>
|
||||||
|
array(
|
||||||
|
),
|
||||||
|
'disk' => '/rsrc/css/application/owners/owners-path-editor.css',
|
||||||
|
),
|
||||||
'phabricator-ui-example-css' =>
|
'phabricator-ui-example-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/365a10f1/rsrc/css/application/uiexample/example.css',
|
'uri' => '/res/365a10f1/rsrc/css/application/uiexample/example.css',
|
||||||
|
@ -360,6 +360,16 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/css/core/syntax.css',
|
'disk' => '/rsrc/css/core/syntax.css',
|
||||||
),
|
),
|
||||||
|
'multirow-row-manager' =>
|
||||||
|
array(
|
||||||
|
'uri' => '/res/330d076b/rsrc/js/application/core/MultirowRowManager.js',
|
||||||
|
'type' => 'js',
|
||||||
|
'requires' =>
|
||||||
|
array(
|
||||||
|
0 => 'javelin-lib-dev',
|
||||||
|
),
|
||||||
|
'disk' => '/rsrc/js/application/core/MultirowRowManager.js',
|
||||||
|
),
|
||||||
'javelin-behavior-dark-console' =>
|
'javelin-behavior-dark-console' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/020b0265/rsrc/js/application/core/behavior-dark-console.js',
|
'uri' => '/res/020b0265/rsrc/js/application/core/behavior-dark-console.js',
|
||||||
|
@ -371,7 +381,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'javelin-behavior-phabricator-object-selector' =>
|
'javelin-behavior-phabricator-object-selector' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/4fe735af/rsrc/js/application/core/behavior-object-selector.js',
|
'uri' => '/res/c0f12b29/rsrc/js/application/core/behavior-object-selector.js',
|
||||||
'type' => 'js',
|
'type' => 'js',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -399,15 +409,15 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/js/application/core/behavior-workflow.js',
|
'disk' => '/rsrc/js/application/core/behavior-workflow.js',
|
||||||
),
|
),
|
||||||
'multirow-row-manager' =>
|
'javelin-behavior-error-log' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/330d076b/rsrc/js/application/core/MultirowRowManager.js',
|
'uri' => '/res/c57a323f/rsrc/js/application/core/behavior-error-log.js',
|
||||||
'type' => 'js',
|
'type' => 'js',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-lib-dev',
|
0 => 'javelin-lib-dev',
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/js/application/core/MultirowRowManager.js',
|
'disk' => '/rsrc/js/application/core/behavior-error-log.js',
|
||||||
),
|
),
|
||||||
'javelin-behavior-differential-add-reviewers' =>
|
'javelin-behavior-differential-add-reviewers' =>
|
||||||
array(
|
array(
|
||||||
|
@ -499,17 +509,6 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/js/application/diffusion/behavior-pull-lastmodified.js',
|
'disk' => '/rsrc/js/application/diffusion/behavior-pull-lastmodified.js',
|
||||||
),
|
),
|
||||||
'javelin-behavior-herald-rule-editor' =>
|
|
||||||
array(
|
|
||||||
'uri' => '/res/48108130/rsrc/js/application/herald/herald-rule-editor.js',
|
|
||||||
'type' => 'js',
|
|
||||||
'requires' =>
|
|
||||||
array(
|
|
||||||
0 => 'herald-rule-editor',
|
|
||||||
1 => 'javelin-lib-dev',
|
|
||||||
),
|
|
||||||
'disk' => '/rsrc/js/application/herald/herald-rule-editor.js',
|
|
||||||
),
|
|
||||||
'herald-rule-editor' =>
|
'herald-rule-editor' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/ec8e2110/rsrc/js/application/herald/HeraldRuleEditor.js',
|
'uri' => '/res/ec8e2110/rsrc/js/application/herald/HeraldRuleEditor.js',
|
||||||
|
@ -523,6 +522,17 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/js/application/herald/HeraldRuleEditor.js',
|
'disk' => '/rsrc/js/application/herald/HeraldRuleEditor.js',
|
||||||
),
|
),
|
||||||
|
'javelin-behavior-herald-rule-editor' =>
|
||||||
|
array(
|
||||||
|
'uri' => '/res/48108130/rsrc/js/application/herald/herald-rule-editor.js',
|
||||||
|
'type' => 'js',
|
||||||
|
'requires' =>
|
||||||
|
array(
|
||||||
|
0 => 'herald-rule-editor',
|
||||||
|
1 => 'javelin-lib-dev',
|
||||||
|
),
|
||||||
|
'disk' => '/rsrc/js/application/herald/herald-rule-editor.js',
|
||||||
|
),
|
||||||
'path-typeahead' =>
|
'path-typeahead' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/42fb76c3/rsrc/js/application/herald/PathTypeahead.js',
|
'uri' => '/res/42fb76c3/rsrc/js/application/herald/PathTypeahead.js',
|
||||||
|
@ -544,17 +554,6 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/js/application/maniphest/behavior-transaction-controls.js',
|
'disk' => '/rsrc/js/application/maniphest/behavior-transaction-controls.js',
|
||||||
),
|
),
|
||||||
'javelin-behavior-owners-path-editor' =>
|
|
||||||
array(
|
|
||||||
'uri' => '/res/7568aa22/rsrc/js/application/owners/owners-path-editor.js',
|
|
||||||
'type' => 'js',
|
|
||||||
'requires' =>
|
|
||||||
array(
|
|
||||||
0 => 'owners-path-editor',
|
|
||||||
1 => 'javelin-lib-dev',
|
|
||||||
),
|
|
||||||
'disk' => '/rsrc/js/application/owners/owners-path-editor.js',
|
|
||||||
),
|
|
||||||
'owners-path-editor' =>
|
'owners-path-editor' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/b01c1ca9/rsrc/js/application/owners/OwnersPathEditor.js',
|
'uri' => '/res/b01c1ca9/rsrc/js/application/owners/OwnersPathEditor.js',
|
||||||
|
@ -568,6 +567,17 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/js/application/owners/OwnersPathEditor.js',
|
'disk' => '/rsrc/js/application/owners/OwnersPathEditor.js',
|
||||||
),
|
),
|
||||||
|
'javelin-behavior-owners-path-editor' =>
|
||||||
|
array(
|
||||||
|
'uri' => '/res/7568aa22/rsrc/js/application/owners/owners-path-editor.js',
|
||||||
|
'type' => 'js',
|
||||||
|
'requires' =>
|
||||||
|
array(
|
||||||
|
0 => 'owners-path-editor',
|
||||||
|
1 => 'javelin-lib-dev',
|
||||||
|
),
|
||||||
|
'disk' => '/rsrc/js/application/owners/owners-path-editor.js',
|
||||||
|
),
|
||||||
'javelin-magical-init' =>
|
'javelin-magical-init' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/76614f84/rsrc/js/javelin/init.dev.js',
|
'uri' => '/res/76614f84/rsrc/js/javelin/init.dev.js',
|
||||||
|
|
|
@ -124,7 +124,7 @@ final class DarkConsoleCore {
|
||||||
$panel_markup[] = javelin_render_tag(
|
$panel_markup[] = javelin_render_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'dark-console-panel',
|
'class' => 'dark-console-panel dark-console-panel-'.$key,
|
||||||
'style' => $style,
|
'style' => $style,
|
||||||
'sigil' => 'dark-console-panel',
|
'sigil' => 'dark-console-panel',
|
||||||
),
|
),
|
||||||
|
|
|
@ -46,39 +46,62 @@ class DarkConsoleErrorLogPlugin extends DarkConsolePlugin {
|
||||||
$data = $this->getData();
|
$data = $this->getData();
|
||||||
|
|
||||||
$rows = array();
|
$rows = array();
|
||||||
foreach ($data as $row) {
|
$details = '';
|
||||||
switch ($row['event']) {
|
|
||||||
case 'error':
|
foreach ($data as $index => $row) {
|
||||||
$file = $row['file'];
|
$file = $row['file'];
|
||||||
$line = $row['line'];
|
$line = $row['line'];
|
||||||
break;
|
|
||||||
case 'exception':
|
$tag = phutil_render_tag(
|
||||||
$file = $row['exception']->getFile();
|
'a',
|
||||||
$line = $row['exception']->getLine();
|
array(
|
||||||
break;
|
'onclick' => jsprintf('show_details(%d)', $index),
|
||||||
|
),
|
||||||
|
phutil_escape_html($row['str'].' at ['.basename($file).':'.$line.']'));
|
||||||
|
$rows[] = array($tag);
|
||||||
|
|
||||||
|
$details .=
|
||||||
|
'<div class="dark-console-panel-error-details" id="row-details-'.
|
||||||
|
$index.'">'.
|
||||||
|
phutil_escape_html($row['details'])."\n".
|
||||||
|
'Stack trace:'."\n";
|
||||||
|
|
||||||
|
foreach ($row['trace'] as $key => $entry) {
|
||||||
|
$line = '';
|
||||||
|
if (isset($entry['class'])) {
|
||||||
|
$line .= $entry['class'].'::';
|
||||||
|
}
|
||||||
|
$line .= idx($entry, 'function', '');
|
||||||
|
$onclick = '';
|
||||||
|
if (isset($entry['file'])) {
|
||||||
|
$line .= ' called at ['.$entry['file'].':'.$entry['line'].']';
|
||||||
|
$onclick = jsprintf(
|
||||||
|
'open_file(%s, %d)', $entry['file'], $entry['line']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$details .= phutil_render_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'onclick' => $onclick,
|
||||||
|
),
|
||||||
|
phutil_escape_html($line));
|
||||||
|
$details .= "\n";
|
||||||
|
}
|
||||||
|
|
||||||
$rows[] = array(
|
$details .= '</div>';
|
||||||
basename($file).':'.$line,
|
|
||||||
$row['str'],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = new AphrontTableView($rows);
|
$table = new AphrontTableView($rows);
|
||||||
$table->setColumnClasses(
|
$table->setClassName('error-log');
|
||||||
array(
|
$table->setHeaders(array('Error'));
|
||||||
null,
|
|
||||||
'wide wrap',
|
|
||||||
));
|
|
||||||
$table->setHeaders(
|
|
||||||
array(
|
|
||||||
'File',
|
|
||||||
'Error',
|
|
||||||
));
|
|
||||||
$table->setNoDataString('No errors.');
|
$table->setNoDataString('No errors.');
|
||||||
|
|
||||||
return $table->render();
|
return '<div>'.
|
||||||
|
'<div>'.$table->render().'</div>'.
|
||||||
|
'<div class="dark-console-panel-error-separator"></div>'.
|
||||||
|
'<pre class="PhabricatorMonospaced">'.
|
||||||
|
$details.'</pre>'.
|
||||||
|
'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,9 @@ phutil_require_module('phabricator', 'aphront/console/plugin/base');
|
||||||
phutil_require_module('phabricator', 'aphront/console/plugin/errorlog/api');
|
phutil_require_module('phabricator', 'aphront/console/plugin/errorlog/api');
|
||||||
phutil_require_module('phabricator', 'view/control/table');
|
phutil_require_module('phabricator', 'view/control/table');
|
||||||
|
|
||||||
|
phutil_require_module('phutil', 'markup');
|
||||||
|
phutil_require_module('phutil', 'utils');
|
||||||
|
phutil_require_module('phutil', 'xsprintf/jsprintf');
|
||||||
|
|
||||||
|
|
||||||
phutil_require_source('DarkConsoleErrorLogPlugin.php');
|
phutil_require_source('DarkConsoleErrorLogPlugin.php');
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
class DarkConsoleErrorLogPluginAPI {
|
class DarkConsoleErrorLogPluginAPI {
|
||||||
|
|
||||||
private static $errors = array();
|
private static $errors = array();
|
||||||
|
@ -30,29 +31,50 @@ class DarkConsoleErrorLogPluginAPI {
|
||||||
return self::$errors;
|
return self::$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function handleError($num, $str, $file, $line, $cxt) {
|
public static function handleErrors($event, $value, $metadata) {
|
||||||
if (!self::$discardMode) {
|
if (self::$discardMode) {
|
||||||
self::$errors[] = array(
|
return;
|
||||||
'event' => 'error',
|
|
||||||
'num' => $num,
|
|
||||||
'str' => $str,
|
|
||||||
'file' => $file,
|
|
||||||
'line' => $line,
|
|
||||||
'cxt' => $cxt,
|
|
||||||
'trace' => debug_backtrace(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
error_log("{$file}:{$line} {$str}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function handleException($ex) {
|
switch ($event) {
|
||||||
if (!self::$discardMode) {
|
case PhutilErrorHandler::EXCEPTION:
|
||||||
|
// $value is of type Exception
|
||||||
self::$errors[] = array(
|
self::$errors[] = array(
|
||||||
'event' => 'exception',
|
'details' => $value->getMessage(),
|
||||||
'exception' => $ex,
|
'event' => $event,
|
||||||
|
'file' => $value->getFile(),
|
||||||
|
'line' => $value->getLine(),
|
||||||
|
'str' => $value->getMessage(),
|
||||||
|
'trace' => $metadata['trace'],
|
||||||
);
|
);
|
||||||
|
break;
|
||||||
|
case PhutilErrorHandler::ERROR:
|
||||||
|
// $value is a simple string
|
||||||
|
self::$errors[] = array(
|
||||||
|
'details' => $value,
|
||||||
|
'event' => $event,
|
||||||
|
'file' => $metadata['file'],
|
||||||
|
'line' => $metadata['line'],
|
||||||
|
'str' => $value,
|
||||||
|
'trace' => $metadata['trace'],
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case PhutilErrorHandler::PHLOG:
|
||||||
|
// $value can be anything
|
||||||
|
self::$errors[] = array(
|
||||||
|
'details' => PhutilReadableSerializer::printShallow($value, 3),
|
||||||
|
'event' => $event,
|
||||||
|
'file' => $metadata['file'],
|
||||||
|
'line' => $metadata['line'],
|
||||||
|
'str' => PhutilReadableSerializer::printShort($value),
|
||||||
|
'trace' => $metadata['trace'],
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
error_log('Unknown event : '.$event);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
error_log($ex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,5 +6,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
phutil_require_module('phutil', 'error');
|
||||||
|
phutil_require_module('phutil', 'readableserializer');
|
||||||
|
|
||||||
|
|
||||||
phutil_require_source('DarkConsoleErrorLogPluginAPI.php');
|
phutil_require_source('DarkConsoleErrorLogPluginAPI.php');
|
||||||
|
|
|
@ -101,6 +101,9 @@ class PhabricatorStandardPageView extends AphrontPageView {
|
||||||
array(
|
array(
|
||||||
'uri' => '/~/',
|
'uri' => '/~/',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Change this to initBehavior when there is some behavior to initialize
|
||||||
|
require_celerity_resource('javelin-behavior-error-log');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->bodyContent = $this->renderChildren();
|
$this->bodyContent = $this->renderChildren();
|
||||||
|
|
|
@ -71,6 +71,11 @@ $tz = PhabricatorEnv::getEnvConfig('phabricator.timezone');
|
||||||
if ($tz) {
|
if ($tz) {
|
||||||
date_default_timezone_set($tz);
|
date_default_timezone_set($tz);
|
||||||
}
|
}
|
||||||
|
phutil_require_module('phabricator', 'aphront/console/plugin/errorlog/api');
|
||||||
|
phutil_require_module('phutil', 'error');
|
||||||
|
|
||||||
|
PhutilErrorHandler::setErrorListener(
|
||||||
|
array('DarkConsoleErrorLogPluginAPI', 'handleErrors'));
|
||||||
|
|
||||||
foreach (PhabricatorEnv::getEnvConfig('load-libraries') as $library) {
|
foreach (PhabricatorEnv::getEnvConfig('load-libraries') as $library) {
|
||||||
phutil_load_library($library);
|
phutil_load_library($library);
|
||||||
|
@ -89,6 +94,7 @@ switch ($host) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$application->setHost($host);
|
$application->setHost($host);
|
||||||
$application->setPath($path);
|
$application->setPath($path);
|
||||||
$application->willBuildRequest();
|
$application->willBuildRequest();
|
||||||
|
@ -126,6 +132,7 @@ foreach ($headers as $header) {
|
||||||
header("{$header}: {$value}");
|
header("{$header}: {$value}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: This shouldn't be possible in a production-configured environment.
|
// TODO: This shouldn't be possible in a production-configured environment.
|
||||||
if (isset($_REQUEST['__profile__']) &&
|
if (isset($_REQUEST['__profile__']) &&
|
||||||
($_REQUEST['__profile__'] == 'all')) {
|
($_REQUEST['__profile__'] == 'all')) {
|
||||||
|
|
|
@ -70,3 +70,20 @@ a.dark-console-tab-selected {
|
||||||
.dark-console .aphront-table-view tr.no-data td {
|
.dark-console .aphront-table-view tr.no-data td {
|
||||||
color: #dddddd;
|
color: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dark-console-panel-ErrorLog {
|
||||||
|
max-height: 500px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-console-panel-error-details {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-console-panel-error-separator {
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
border-bottom: 1px solid #b7b7b7;
|
||||||
|
border-top: 1px solid #b7b7b7;
|
||||||
|
height: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
22
webroot/rsrc/js/application/core/behavior-error-log.js
Normal file
22
webroot/rsrc/js/application/core/behavior-error-log.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* @provides javelin-behavior-error-log
|
||||||
|
* @requires javelin-lib-dev
|
||||||
|
*/
|
||||||
|
|
||||||
|
var current_details = null;
|
||||||
|
|
||||||
|
function open_file(file, row) {
|
||||||
|
// Do some fun some here, e.g., open the diffusion page for the file
|
||||||
|
// or open the file in an editor
|
||||||
|
}
|
||||||
|
|
||||||
|
function show_details(row) {
|
||||||
|
var node = JX.$('row-details-' + row);
|
||||||
|
|
||||||
|
if (current_details !== null) {
|
||||||
|
JX.$('row-details-' + current_details).style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
node.style.display = 'block';
|
||||||
|
current_details = row;
|
||||||
|
}
|
Loading…
Reference in a new issue