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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
b3850a4e
Commit
b3850a4e
authored
Jan 20, 2015
by
pana1990
Committed by
Alexander Makarov
Jan 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #6890: Added ability to filter by query type
parent
07accd9b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
CHANGELOG.md
extensions/debug/CHANGELOG.md
+1
-0
DbPanel.php
extensions/debug/panels/DbPanel.php
+18
-0
detail.php
extensions/debug/views/default/panels/db/detail.php
+1
-0
No files found.
extensions/debug/CHANGELOG.md
View file @
b3850a4e
...
@@ -5,6 +5,7 @@ Yii Framework 2 debug extension Change Log
...
@@ -5,6 +5,7 @@ Yii Framework 2 debug extension Change Log
-----------------------
-----------------------
-
Bug #6903: Fixed display issue with phpinfo() table (kalayda, cebe)
-
Bug #6903: Fixed display issue with phpinfo() table (kalayda, cebe)
-
Enh #6890: Added ability to filter by query type (pana1990)
2.0.2 January 11, 2015
2.0.2 January 11, 2015
...
...
extensions/debug/panels/DbPanel.php
View file @
b3850a4e
...
@@ -190,4 +190,22 @@ class DbPanel extends Panel
...
@@ -190,4 +190,22 @@ class DbPanel extends Panel
{
{
return
((
$this
->
criticalQueryThreshold
!==
null
)
&&
(
$count
>
$this
->
criticalQueryThreshold
));
return
((
$this
->
criticalQueryThreshold
!==
null
)
&&
(
$count
>
$this
->
criticalQueryThreshold
));
}
}
/**
* Returns array query types
*
* @return array
* @since 2.0.3
*/
public
function
getTypes
()
{
return
array_reduce
(
$this
->
_models
,
function
(
$result
,
$item
)
{
$result
[
$item
[
'type'
]]
=
$item
[
'type'
];
return
$result
;
},
[]
);
}
}
}
extensions/debug/views/default/panels/db/detail.php
View file @
b3850a4e
...
@@ -49,6 +49,7 @@ echo GridView::widget([
...
@@ -49,6 +49,7 @@ echo GridView::widget([
'value'
=>
function
(
$data
)
{
'value'
=>
function
(
$data
)
{
return
Html
::
encode
(
mb_strtoupper
(
$data
[
'type'
],
'utf8'
));
return
Html
::
encode
(
mb_strtoupper
(
$data
[
'type'
],
'utf8'
));
},
},
'filter'
=>
$panel
->
getTypes
(),
],
],
[
[
'attribute'
=>
'query'
,
'attribute'
=>
'query'
,
...
...
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