Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
717d2641
Commit
717d2641
authored
Feb 03, 2014
by
Mark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed setting name, fixed php-docs
parent
9a6cda5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
DbPanel.php
extensions/debug/panels/DbPanel.php
+4
-4
index.php
extensions/debug/views/default/index.php
+1
-1
No files found.
extensions/debug/panels/DbPanel.php
View file @
717d2641
...
@@ -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
$criticalQuer
iesCount
;
public
$criticalQuer
yThreshold
;
/**
/**
* @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
->
criticalQuer
iesCount
!==
null
)
&&
(
$count
>
$this
->
criticalQueriesCount
));
return
((
$this
->
criticalQuer
yThreshold
!==
null
)
&&
(
$count
>
$this
->
criticalQueryThreshold
));
}
}
}
}
extensions/debug/views/default/index.php
View file @
717d2641
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment