Commit 47425145 by Mark

method renamed, more php-docs added

parent 717d2641
......@@ -21,7 +21,9 @@ use yii\debug\models\search\Db;
class DbPanel extends Panel
{
/**
* @var integer total queries critical count
* @var integer the threshold for determining whether the request has involved
* critical number of DB queries. If the number of queries exceeds this number,
* the execution is considered taking critical number of DB queries.
*/
public $criticalQueryThreshold;
/**
......@@ -158,7 +160,7 @@ class DbPanel extends Panel
* @param integer $count queries count
* @return boolean
*/
public function isQueriesCountCritical($count)
public function isQueryCountCritical($count)
{
return (($this->criticalQueryThreshold !== null) && ($count > $this->criticalQueryThreshold));
}
......
......@@ -34,7 +34,7 @@ echo GridView::widget([
'rowOptions' => function ($model, $key, $index, $grid) use ($searchModel) {
$dbPanel = $this->context->module->panels['db'];
if ($searchModel->isCodeCritical($model['statusCode']) || $dbPanel->isQueriesCountCritical($model['sqlCount'])) {
if ($searchModel->isCodeCritical($model['statusCode']) || $dbPanel->isQueryCountCritical($model['sqlCount'])) {
return ['class'=>'danger'];
} else {
return [];
......@@ -64,7 +64,7 @@ echo GridView::widget([
'value' => function ($data) {
$dbPanel = $this->context->module->panels['db'];
if ($dbPanel->isQueriesCountCritical($data['sqlCount'])) {
if ($dbPanel->isQueryCountCritical($data['sqlCount'])) {
$content = Html::tag('b', $data['sqlCount']) . ' ' . Html::tag('span','',['class' => 'glyphicon glyphicon-exclamation-sign']);
return Html::a($content, $dbPanel->getUrl(), [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment