|
|
@ -41,7 +41,7 @@ class LogPanel extends Panel |
|
|
|
$searchModel = new Log(); |
|
|
|
$searchModel = new Log(); |
|
|
|
$dataProvider = $searchModel->search(Yii::$app->request->get(), $this->getModels()); |
|
|
|
$dataProvider = $searchModel->search(Yii::$app->request->get(), $this->getModels()); |
|
|
|
|
|
|
|
|
|
|
|
return Yii::$app->view->render('panels/log/detail',[ |
|
|
|
return Yii::$app->view->render('panels/log/detail', [ |
|
|
|
'dataProvider' => $dataProvider, |
|
|
|
'dataProvider' => $dataProvider, |
|
|
|
'panel' => $this, |
|
|
|
'panel' => $this, |
|
|
|
'searchModel' => $searchModel, |
|
|
|
'searchModel' => $searchModel, |
|
|
@ -61,7 +61,7 @@ class LogPanel extends Panel |
|
|
|
* @param boolean $refresh if needed to build models from log messages and refresh them. |
|
|
|
* @param boolean $refresh if needed to build models from log messages and refresh them. |
|
|
|
* @return array models |
|
|
|
* @return array models |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected function getModels($refresh=false) |
|
|
|
protected function getModels($refresh = false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($this->_models === null || $refresh) { |
|
|
|
if ($this->_models === null || $refresh) { |
|
|
|
$this->_models = []; |
|
|
|
$this->_models = []; |
|
|
@ -71,7 +71,7 @@ class LogPanel extends Panel |
|
|
|
'message' => $message[0], |
|
|
|
'message' => $message[0], |
|
|
|
'level' => $message[1], |
|
|
|
'level' => $message[1], |
|
|
|
'category' => $message[2], |
|
|
|
'category' => $message[2], |
|
|
|
'time' => ($message[3] * 1000), #time in milliseconds |
|
|
|
'time' => ($message[3] * 1000), // time in milliseconds |
|
|
|
'trace' => $message[4] |
|
|
|
'trace' => $message[4] |
|
|
|
]; |
|
|
|
]; |
|
|
|
} |
|
|
|
} |
|
|
|