Commit 717d2641 by Mark

changed setting name, fixed php-docs

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