コード例 #1
0
ファイル: SqlController.php プロジェクト: bfyang5130/tuanlogs
 /**
  * 首页信息
  * @return type
  */
 public function actionIndex()
 {
     $params = Yii::$app->request->get();
     $searchModel = new SqlLogSearch();
     $dataProvider = $searchModel->search($params);
     $query = $dataProvider->query;
     $sort = new Sort(['attributes' => ['executedate'], 'defaultOrder' => ['executedate' => SORT_DESC]]);
     $locals = ToolService::getPagedRows($query, $tablename = 'SqlTrace', $params, ['orderBy' => $sort->orders, 'pageSize' => 30]);
     $locals['searchModel'] = $searchModel;
     return $this->render('sql', $locals);
 }
コード例 #2
0
 public function actionIndex()
 {
     $params = Yii::$app->request->get();
     $searchModel = new ErrorLogSearch();
     $dataProvider = $searchModel->search($params);
     $query = $dataProvider->query;
     $sort = new Sort(['attributes' => ['AddDate'], 'defaultOrder' => ['AddDate' => SORT_DESC]]);
     $locals = ToolService::getPagedRows($query, $tablename = 'ErrorLog', $params, ['orderBy' => $sort->orders, 'pageSize' => 10]);
     $locals['searchModel'] = $searchModel;
     $application_item = ErrorLogService::getApplicationNameItem(0);
     $locals['application_item'] = $application_item;
     return $this->render('index', $locals);
 }