Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function getDetail()
 {
     $searchModel = new AuditErrorSearch();
     $params = \Yii::$app->request->getQueryParams();
     $params['AuditErrorSearch']['entry_id'] = $params['id'];
     $dataProvider = $searchModel->search($params);
     return \Yii::$app->view->render('panels/error/detail', ['panel' => $this, 'dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }
Ejemplo n.º 2
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use bedezign\yii2\audit\models\AuditErrorSearch;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('audit', 'Errors');
$this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Audit'), 'url' => ['default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="audit-error">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}'], ['attribute' => 'id', 'options' => ['width' => '80px']], ['attribute' => 'entry_id', 'class' => 'yii\\grid\\DataColumn', 'value' => function ($data) {
    return $data->entry_id ? Html::a($data->entry_id, ['entry/view', 'id' => $data->entry_id]) : '';
}, 'format' => 'raw'], 'message', ['attribute' => 'code', 'options' => ['width' => '80px']], ['filter' => AuditErrorSearch::fileFilter(), 'attribute' => 'file'], ['attribute' => 'line', 'options' => ['width' => '80px']], ['attribute' => 'hash', 'options' => ['width' => '100px']], ['attribute' => 'created', 'options' => ['width' => '150px']]]]);
?>
</div>
Ejemplo n.º 3
0
<?php

/* @var $panel yii\debug\panels\LogPanel */
/* @var $searchModel yii\debug\models\search\Log */
/* @var $dataProvider yii\data\ArrayDataProvider */
use yii\helpers\Html;
use yii\grid\GridView;
use bedezign\yii2\audit\models\AuditErrorSearch;
echo Html::tag('h1', $panel->name);
echo GridView::widget(['dataProvider' => $dataProvider, 'id' => 'log-panel-detailed-grid', 'options' => ['class' => 'detail-grid-view table-responsive'], 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}', 'buttons' => ['view' => function ($url, $model) {
    return Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-eye-open']), ['error/view', 'id' => $model->id]);
}], 'options' => ['width' => '30px']], ['attribute' => 'id', 'options' => ['width' => '80px']], 'message', ['attribute' => 'code', 'options' => ['width' => '80px']], ['attribute' => 'file', 'filter' => AuditErrorSearch::fileFilter()], ['attribute' => 'line', 'options' => ['width' => '80px']], ['attribute' => 'hash', 'options' => ['width' => '100px']]]]);
Ejemplo n.º 4
0
 /**
  * Lists all AuditError models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new AuditErrorSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->get());
     return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }