|
|
@@ -402,7 +402,6 @@ class Route_Debug extends RouteBase {
|
|
|
V::exec("head -100 '{$logPath}'", $contentLines, $ret);
|
|
|
$hasMoreRows = ( count($contentLines) >= 100 );
|
|
|
if ($hasMoreRows) array_pop($contentLines);
|
|
|
- if ($hasMoreRows) UI::alert('info', "pobierz więcej..." . "cnt(".count($contentLines).")");
|
|
|
|
|
|
$lastTime = '';
|
|
|
UI::table([
|
|
|
@@ -433,7 +432,8 @@ class Route_Debug extends RouteBase {
|
|
|
$contentLines
|
|
|
),
|
|
|
($hasMoreRows)
|
|
|
- ? [[ 'msg' => UI::hButtonAjax("Pobierz więcej danych ...", 'fetchMoreDbgLines', [
|
|
|
+ ? [[ 'msg' => UI::h('div', [], [
|
|
|
+ UI::hButtonAjax("Pobierz kolejne 100 linii ...", 'fetchMoreDbgLines', [
|
|
|
'class' => "btn btn-xs btn-primary",
|
|
|
'href' => $this->getLink('fetchMoreDbgLinesAjax'),
|
|
|
'data' => [
|
|
|
@@ -442,7 +442,16 @@ class Route_Debug extends RouteBase {
|
|
|
'limit' => 100,
|
|
|
],
|
|
|
]),
|
|
|
- ]]
|
|
|
+ UI::hButtonAjax("Pobierz kolejne 1000 linii ...", 'fetchMoreDbgLines', [
|
|
|
+ 'class' => "btn btn-xs btn-default",
|
|
|
+ 'href' => $this->getLink('fetchMoreDbgLinesAjax'),
|
|
|
+ 'data' => [
|
|
|
+ 'logPath' => $logPath,
|
|
|
+ 'from' => 100,
|
|
|
+ 'limit' => 1000,
|
|
|
+ ],
|
|
|
+ ]),
|
|
|
+ ]) ]]
|
|
|
: []
|
|
|
),
|
|
|
]);
|
|
|
@@ -480,7 +489,7 @@ class Route_Debug extends RouteBase {
|
|
|
|
|
|
console.log('rows', rows)
|
|
|
console.log('outHtml', outHtml)
|
|
|
- jQuery(n).parent().parent().replaceWith(outHtml)
|
|
|
+ jQuery(n).parent().parent().parent().replaceWith(outHtml)
|
|
|
");
|
|
|
echo UI::h('script', [], "
|
|
|
function p5DBG__showLogTrace(n, e, maxWidth) {
|
|
|
@@ -590,14 +599,25 @@ class Route_Debug extends RouteBase {
|
|
|
}, $contentLines),
|
|
|
'fetchMoreLink' =>
|
|
|
($hasMoreRows)
|
|
|
- ? UI::hButtonAjax("Pobierz więcej danych ...", 'fetchMoreDbgLines', [
|
|
|
- 'class' => "btn btn-xs btn-primary",
|
|
|
- 'href' => $this->getLink('fetchMoreDbgLinesAjax'),
|
|
|
- 'data' => [
|
|
|
- 'logPath' => $logPath,
|
|
|
- 'from' => $from + $limit,
|
|
|
- 'limit' => $limit,
|
|
|
- ],
|
|
|
+ ? UI::h('div', [], [
|
|
|
+ UI::hButtonAjax("Pobierz kolejne {$limit} linii ...", 'fetchMoreDbgLines', [
|
|
|
+ 'class' => "btn btn-xs btn-primary",
|
|
|
+ 'href' => $this->getLink('fetchMoreDbgLinesAjax'),
|
|
|
+ 'data' => [
|
|
|
+ 'logPath' => $logPath,
|
|
|
+ 'from' => $from + $limit,
|
|
|
+ 'limit' => $limit,
|
|
|
+ ],
|
|
|
+ ]),
|
|
|
+ UI::hButtonAjax("Pobierz wszystkie", 'fetchMoreDbgLines', [
|
|
|
+ 'class' => "btn btn-xs btn-default",
|
|
|
+ 'href' => $this->getLink('fetchMoreDbgLinesAjax'),
|
|
|
+ 'data' => [
|
|
|
+ 'logPath' => $logPath,
|
|
|
+ 'from' => $from + $limit,
|
|
|
+ 'limit' => 1000,
|
|
|
+ ],
|
|
|
+ ]),
|
|
|
])
|
|
|
: null,
|
|
|
]
|