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
950577d5
Commit
950577d5
authored
Sep 11, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dynamic naming added to `DbPanel`
parent
60a5b31a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
DbPanel.php
extensions/debug/panels/DbPanel.php
+8
-0
detail.php
extensions/debug/views/default/panels/db/detail.php
+1
-1
summary.php
extensions/debug/views/default/panels/db/summary.php
+1
-1
MongoDbPanel.php
extensions/mongodb/debug/MongoDbPanel.php
+8
-0
No files found.
extensions/debug/panels/DbPanel.php
View file @
950577d5
...
@@ -48,6 +48,14 @@ class DbPanel extends Panel
...
@@ -48,6 +48,14 @@ class DbPanel extends Panel
}
}
/**
/**
* @return string short name of the panel, which will be use in summary.
*/
public
function
getSummaryName
()
{
return
'DB'
;
}
/**
* @inheritdoc
* @inheritdoc
*/
*/
public
function
getSummary
()
public
function
getSummary
()
...
...
extensions/debug/views/default/panels/db/detail.php
View file @
950577d5
...
@@ -7,7 +7,7 @@ use yii\helpers\Html;
...
@@ -7,7 +7,7 @@ use yii\helpers\Html;
use
yii\grid\GridView
;
use
yii\grid\GridView
;
?>
?>
<h1>
Database
Queries
</h1>
<h1>
<?=
$panel
->
getName
();
?>
Queries
</h1>
<?php
<?php
...
...
extensions/debug/views/default/panels/db/summary.php
View file @
950577d5
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<?php
if
(
$queryCount
)
:
?>
<?php
if
(
$queryCount
)
:
?>
<div
class=
"yii-debug-toolbar-block"
>
<div
class=
"yii-debug-toolbar-block"
>
<a
href=
"
<?=
$panel
->
getUrl
()
?>
"
title=
"Executed
<?=
$queryCount
?>
database queries which took
<?=
$queryTime
?>
."
>
<a
href=
"
<?=
$panel
->
getUrl
()
?>
"
title=
"Executed
<?=
$queryCount
?>
database queries which took
<?=
$queryTime
?>
."
>
DB
<span
class=
"label label-info"
>
<?=
$queryCount
?>
</span>
<span
class=
"label"
>
<?=
$queryTime
?>
</span>
<?=
$panel
->
getSummaryName
()
?>
DB
<span
class=
"label label-info"
>
<?=
$queryCount
?>
</span>
<span
class=
"label"
>
<?=
$queryTime
?>
</span>
</a>
</a>
</div>
</div>
<?php
endif
;
?>
<?php
endif
;
?>
extensions/mongodb/debug/MongoDbPanel.php
View file @
950577d5
...
@@ -27,6 +27,14 @@ class MongoDbPanel extends DbPanel
...
@@ -27,6 +27,14 @@ class MongoDbPanel extends DbPanel
}
}
/**
/**
* @inheritdoc
*/
public
function
getSummaryName
()
{
return
'MongoDB'
;
}
/**
* Returns all profile logs of the current request for this panel.
* Returns all profile logs of the current request for this panel.
* @return array
* @return array
*/
*/
...
...
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