Commit 717d2641 by Mark

changed setting name, fixed php-docs

parent 9a6cda5e
......@@ -21,10 +21,9 @@ use yii\debug\models\search\Db;
class DbPanel extends Panel
{
/**
*
* @var integer total queries critical count
*/
public $criticalQueriesCount;
public $criticalQueryThreshold;
/**
* @var array db queries info extracted to array as models, to use with data provider.
*/
......@@ -155,12 +154,13 @@ class DbPanel extends Panel
/**
* Check if given queries count is critical according settings.
* @param queries count $count
*
* @param integer $count queries count
* @return boolean
*/
public function isQueriesCountCritical($count)
{
return (($this->criticalQueriesCount !== null) && ($count > $this->criticalQueriesCount));
return (($this->criticalQueryThreshold !== null) && ($count > $this->criticalQueryThreshold));
}
}
......@@ -68,7 +68,7 @@ echo GridView::widget([
$content = Html::tag('b', $data['sqlCount']) . ' ' . Html::tag('span','',['class' => 'glyphicon glyphicon-exclamation-sign']);
return Html::a($content, $dbPanel->getUrl(), [
'title' => 'Query is slow. Allowed count is ' . $dbPanel->criticalQueriesCount,
'title' => 'Too many queries. Allowed count is ' . $dbPanel->criticalQueryThreshold,
]);
} else {
......
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