|
|
@ -3,6 +3,7 @@ |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\grid\GridView; |
|
|
|
use yii\grid\GridView; |
|
|
|
use yii\data\ArrayDataProvider; |
|
|
|
use yii\data\ArrayDataProvider; |
|
|
|
|
|
|
|
use yii\debug\panels\ConfigPanel; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var \yii\web\View $this |
|
|
|
* @var \yii\web\View $this |
|
|
@ -14,15 +15,18 @@ use yii\data\ArrayDataProvider; |
|
|
|
$this->title = 'Yii Debugger'; |
|
|
|
$this->title = 'Yii Debugger'; |
|
|
|
?> |
|
|
|
?> |
|
|
|
<div class="default-index"> |
|
|
|
<div class="default-index"> |
|
|
|
<div id="yii-debug-toolbar" class="yii-debug-toolbar-top"> |
|
|
|
|
|
|
|
<div class="yii-debug-toolbar-block title"> |
|
|
|
|
|
|
|
<a href="<?= Yii::$app->homeUrl ?>">
|
|
|
|
<div id="yii-debug-toolbar" class="yii-debug-toolbar-top"> |
|
|
|
<span class="glyphicon glyphicon-home"></span> |
|
|
|
<div class="yii-debug-toolbar-block title"> |
|
|
|
</a> |
|
|
|
<a href="#"> |
|
|
|
</div> |
|
|
|
<img width="29" height="30" alt="" src="<?= \yii\debug\Module::getYiiLogo() ?>">
|
|
|
|
<div class="yii-debug-toolbar-block title"> |
|
|
|
Yii Debugger |
|
|
|
Yii Debugger |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<?php foreach ($panels as $panel): ?> |
|
|
|
|
|
|
|
<?= $panel->getSummary() ?> |
|
|
|
|
|
|
|
<?php endforeach; ?> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="container"> |
|
|
|
<div class="container"> |
|
|
@ -49,17 +53,15 @@ echo GridView::widget([ |
|
|
|
['class' => 'yii\grid\SerialColumn'], |
|
|
|
['class' => 'yii\grid\SerialColumn'], |
|
|
|
[ |
|
|
|
[ |
|
|
|
'attribute' => 'tag', |
|
|
|
'attribute' => 'tag', |
|
|
|
'value' => function ($data) |
|
|
|
'value' => function ($data) { |
|
|
|
{ |
|
|
|
|
|
|
|
return Html::a($data['tag'], ['view', 'tag' => $data['tag']]); |
|
|
|
return Html::a($data['tag'], ['view', 'tag' => $data['tag']]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
'format' => 'html', |
|
|
|
'format' => 'html', |
|
|
|
], |
|
|
|
], |
|
|
|
[ |
|
|
|
[ |
|
|
|
'attribute' => 'time', |
|
|
|
'attribute' => 'time', |
|
|
|
'value' => function ($data) use ($timeFormatter) |
|
|
|
'value' => function ($data) use ($timeFormatter) { |
|
|
|
{ |
|
|
|
return $timeFormatter->asDateTime($data['time'], 'short'); |
|
|
|
return $timeFormatter->asDateTime($data['time'], 'long'); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
'ip', |
|
|
|
'ip', |
|
|
@ -71,7 +73,7 @@ echo GridView::widget([ |
|
|
|
|
|
|
|
|
|
|
|
if ($dbPanel->isQueryCountCritical($data['sqlCount'])) { |
|
|
|
if ($dbPanel->isQueryCountCritical($data['sqlCount'])) { |
|
|
|
|
|
|
|
|
|
|
|
$content = Html::tag('b', $data['sqlCount']) . ' ' . Html::tag('span','',['class' => 'glyphicon glyphicon-exclamation-sign']); |
|
|
|
$content = Html::tag('b', $data['sqlCount']) . ' ' . Html::tag('span', '', ['class' => 'glyphicon glyphicon-exclamation-sign']); |
|
|
|
return Html::a($content, ['view', 'panel' => 'db', 'tag' => $data['tag']], [ |
|
|
|
return Html::a($content, ['view', 'panel' => 'db', 'tag' => $data['tag']], [ |
|
|
|
'title' => 'Too many queries. Allowed count is ' . $dbPanel->criticalQueryThreshold, |
|
|
|
'title' => 'Too many queries. Allowed count is ' . $dbPanel->criticalQueryThreshold, |
|
|
|
]); |
|
|
|
]); |
|
|
@ -88,8 +90,7 @@ echo GridView::widget([ |
|
|
|
], |
|
|
|
], |
|
|
|
[ |
|
|
|
[ |
|
|
|
'attribute'=>'ajax', |
|
|
|
'attribute'=>'ajax', |
|
|
|
'value' => function ($data) |
|
|
|
'value' => function ($data) { |
|
|
|
{ |
|
|
|
|
|
|
|
return $data['ajax'] ? 'Yes' : 'No'; |
|
|
|
return $data['ajax'] ? 'Yes' : 'No'; |
|
|
|
}, |
|
|
|
}, |
|
|
|
'filter' => ['No', 'Yes'], |
|
|
|
'filter' => ['No', 'Yes'], |
|
|
|