Yii2 Bootstrap 3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.7 KiB

12 years ago
<?php
use Yii;
12 years ago
use yii\helpers\Html;
use yii\grid\GridView;
use yii\data\ArrayDataProvider;
12 years ago
/**
11 years ago
* @var \yii\web\View $this
12 years ago
* @var array $manifest
12 years ago
*/
12 years ago
12 years ago
$this->title = 'Yii Debugger';
12 years ago
?>
12 years ago
<div class="default-index">
<div id="yii-debug-toolbar">
<div class="yii-debug-toolbar-block title">
Yii Debugger
12 years ago
</div>
</div>
<div class="container">
<div class="row">
<h1>Available Debug Data</h1>
<?php
$timeFormatter = extension_loaded('intl') ? Yii::createObject(['class' => 'yii\i18n\Formatter']) : Yii::$app->formatter;
echo GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'rowOptions' => function ($model, $key, $index, $grid) use ($searchModel)
{
if ($searchModel->isCodeCritical($model['statusCode']))
return ['class'=>'danger'];
},
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'tag',
'value' => function ($data)
{
return Html::a($data['tag'], ['view', 'tag' => $data['tag']]);
},
'format' => 'html',
],
[
'attribute' => 'time',
'value' => function ($data) use ($timeFormatter)
{
return $timeFormatter->asDateTime($data['time'], 'long');
},
],
'ip',
[
'attribute' => 'sqlCount',
'label' => 'Total queries count'
],
[
'attribute' => 'method',
'filter' => ['get' => 'GET', 'post' => 'POST', 'delete' => 'DELETE', 'put' => 'PUT', 'head' => 'HEAD']
],
[
'attribute'=>'ajax',
'value' => function ($data)
{
return $data['ajax'] ? 'Yes' : 'No';
},
'filter' => ['No', 'Yes'],
],
'url',
[
'attribute' => 'statusCode',
'filter' => [200=>200, 404=>404, 403=>403, 500=>500],
'label' => 'Status code'
],
],
]); ?>
</div>
</div>
12 years ago
</div>