|
|
@ -12,7 +12,7 @@ echo GridView::widget([ |
|
|
|
'id' => 'log-panel-detailed-grid', |
|
|
|
'id' => 'log-panel-detailed-grid', |
|
|
|
'filterModel' => $searchModel, |
|
|
|
'filterModel' => $searchModel, |
|
|
|
'filterUrl' => $panel->getUrl(), |
|
|
|
'filterUrl' => $panel->getUrl(), |
|
|
|
'rowOptions' => function ($model, $key, $index, $grid){ |
|
|
|
'rowOptions' => function ($model, $key, $index, $grid) { |
|
|
|
switch($model['level']) { |
|
|
|
switch($model['level']) { |
|
|
|
case Logger::LEVEL_ERROR : return ['class' => 'danger']; |
|
|
|
case Logger::LEVEL_ERROR : return ['class' => 'danger']; |
|
|
|
case Logger::LEVEL_WARNING : return ['class' => 'warning']; |
|
|
|
case Logger::LEVEL_WARNING : return ['class' => 'warning']; |
|
|
@ -24,8 +24,7 @@ echo GridView::widget([ |
|
|
|
['class' => 'yii\grid\SerialColumn'], |
|
|
|
['class' => 'yii\grid\SerialColumn'], |
|
|
|
[ |
|
|
|
[ |
|
|
|
'attribute' => 'time', |
|
|
|
'attribute' => 'time', |
|
|
|
'value' => function ($data) |
|
|
|
'value' => function ($data) { |
|
|
|
{ |
|
|
|
|
|
|
|
$timeInSeconds = $data['time'] / 1000; |
|
|
|
$timeInSeconds = $data['time'] / 1000; |
|
|
|
$millisecondsDiff = (int)(($timeInSeconds - (int)$timeInSeconds) * 1000); |
|
|
|
$millisecondsDiff = (int)(($timeInSeconds - (int)$timeInSeconds) * 1000); |
|
|
|
return date('H:i:s.',$timeInSeconds) . sprintf('%03d',$millisecondsDiff); |
|
|
|
return date('H:i:s.',$timeInSeconds) . sprintf('%03d',$millisecondsDiff); |
|
|
@ -33,8 +32,7 @@ echo GridView::widget([ |
|
|
|
], |
|
|
|
], |
|
|
|
[ |
|
|
|
[ |
|
|
|
'attribute' => 'level', |
|
|
|
'attribute' => 'level', |
|
|
|
'value' => function ($data) |
|
|
|
'value' => function ($data) { |
|
|
|
{ |
|
|
|
|
|
|
|
return Logger::getLevelName($data['level']); |
|
|
|
return Logger::getLevelName($data['level']); |
|
|
|
}, |
|
|
|
}, |
|
|
|
'filter' => [ |
|
|
|
'filter' => [ |
|
|
@ -47,15 +45,13 @@ echo GridView::widget([ |
|
|
|
'category', |
|
|
|
'category', |
|
|
|
[ |
|
|
|
[ |
|
|
|
'attribute' => 'message', |
|
|
|
'attribute' => 'message', |
|
|
|
'value' => function ($data) |
|
|
|
'value' => function ($data) { |
|
|
|
{ |
|
|
|
|
|
|
|
$message = nl2br(Html::encode($data['message'])); |
|
|
|
$message = nl2br(Html::encode($data['message'])); |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($data['trace'])) { |
|
|
|
if (!empty($data['trace'])) { |
|
|
|
$message .= Html::ul($data['trace'], [ |
|
|
|
$message .= Html::ul($data['trace'], [ |
|
|
|
'class' => 'trace', |
|
|
|
'class' => 'trace', |
|
|
|
'item' => function ($trace) |
|
|
|
'item' => function ($trace) { |
|
|
|
{ |
|
|
|
|
|
|
|
return "<li>{$trace['file']} ({$trace['line']})</li>"; |
|
|
|
return "<li>{$trace['file']} ({$trace['line']})</li>"; |
|
|
|
} |
|
|
|
} |
|
|
|
]); |
|
|
|
]); |
|
|
|