Piotr Labudda 8 лет назад
Родитель
Сommit
f3f5b3d4fb
1 измененных файлов с 16 добавлено и 11 удалено
  1. 16 11
      SE/se-lib/Route/Debug.php

+ 16 - 11
SE/se-lib/Route/Debug.php

@@ -404,7 +404,6 @@ class Route_Debug extends RouteBase {
 				'diff',
 				'type',
 				'msg',
-				'log',
 				'trace',
 			],
 			'cols_help' => [
@@ -430,20 +429,26 @@ class Route_Debug extends RouteBase {
 					$trace = preg_replace('/<br>#(\d+\W+)([a-zA-Z0-9-_:\.\/]*):/', '#${1}<a href="http://localhost:9876/?project=se&file=${2}" target="_blank">${2}</a>:', $trace);
 					$trace = str_replace("\n<br>", "\n", $trace);
 					return [
-						'date' => '<nobr>' . $dbg['date'] . '</nobr>',
+						'date' => '<nobr>' . substr($dbg['date'], 11) . '</nobr>',
 						'diff' => '<nobr>' . $timeDiff . '</nobr>',
 						'@style[date]' => "width:1%",
 						'type' => $dbg['type'],
 						'@style[type]' => "width:1%",
-						'msg' => UI::h('div', ['style'=>'max-width:360px; overflow-x:auto'], $dbg['msg']),
-						// 'log' => (!empty($dbg['log'])) ? json_encode($dbg['log']) : '',
-						'@style[msg]' => "width:360px",
-						'log' => UI::h('div', [], [
-							UI::h('div', [
-								'title' => htmlspecialchars( ('sql' == $dbg['type'] && is_string($dbg['log'])) ? $dbg['log'] : var_export($dbg['log'], true) ),
-								'onClick' => "return p5DBG__showLogTrace(this, event, '600px')",
-								'style' => "cursor:pointer"
-							], str_replace(array('\n', '\t'), ' ', substr(htmlspecialchars(json_encode($dbg['log'])), 0, 100)) . ' ...')
+						'@style[msg]' => "min-width:540px",
+						'msg' => UI::h('div', [], [
+							UI::h('details', [], [
+								UI::h('summary', [], [
+									( ( $dbg['msg'] && 'sql' !== $dbg['msg'] ) ? "{$dbg['msg']} " : '' ),
+									UI::h('span', [ 'style' => "color:silver" ], str_replace(array('\n', '\t'), ' ', substr(htmlspecialchars(json_encode($dbg['log'])), 0, 100)) . ' ...'),
+									" (rozwiń)"
+								]),
+								UI::h('pre', [ 'style' => "font-size:x-small" ], htmlspecialchars( ('sql' == $dbg['type'] && is_string($dbg['log'])) ? $dbg['log'] : var_export($dbg['log'], true) )),
+							]),
+							// UI::h('div', [
+							// 	'title' => htmlspecialchars( ('sql' == $dbg['type'] && is_string($dbg['log'])) ? $dbg['log'] : var_export($dbg['log'], true) ),
+							// 	'onClick' => "return p5DBG__showLogTrace(this, event, '600px')",
+							// 	'style' => "cursor:pointer"
+							// ], str_replace(array('\n', '\t'), ' ', substr(htmlspecialchars(json_encode($dbg['log'])), 0, 100)) . ' ...')
 						]),
 						'trace' => UI::h('div', [], [
 							UI::h('details', [], [