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
30ec0afd
Commit
30ec0afd
authored
Jul 07, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger WIP
parent
faf445bb
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
179 additions
and
33 deletions
+179
-33
assets.php
framework/yii/assets.php
+13
-7
assets.php
framework/yii/bootstrap/assets.php
+5
-0
Module.php
framework/yii/debug/Module.php
+4
-4
main.css
framework/yii/debug/assets/main.css
+46
-0
yii.debug.js
framework/yii/debug/assets/yii.debug.js
+0
-0
DefaultController.php
framework/yii/debug/controllers/DefaultController.php
+11
-2
ConfigPanel.php
framework/yii/debug/panels/ConfigPanel.php
+59
-4
ProfilingPanel.php
framework/yii/debug/panels/ProfilingPanel.php
+5
-5
RequestPanel.php
framework/yii/debug/panels/RequestPanel.php
+2
-2
index.php
framework/yii/debug/views/default/index.php
+4
-1
toolbar.php
framework/yii/debug/views/default/toolbar.php
+29
-7
main.php
framework/yii/debug/views/layouts/main.php
+1
-1
No files found.
framework/yii/assets.php
View file @
30ec0afd
...
...
@@ -35,13 +35,6 @@ return array(
),
'depends'
=>
array
(
'yii'
),
),
'yii/debug'
=>
array
(
'sourcePath'
=>
__DIR__
.
'/assets'
,
'js'
=>
array
(
'yii.debug.js'
,
),
'depends'
=>
array
(
'yii'
),
),
'yii/punycode'
=>
array
(
'sourcePath'
=>
__DIR__
.
'/assets'
,
'js'
=>
array
(
...
...
@@ -55,4 +48,17 @@ return array(
),
'depends'
=>
array
(
'yii/jquery'
),
),
'yii/debug'
=>
array
(
'sourcePath'
=>
__DIR__
.
'/debug/assets'
,
'css'
=>
array
(
'main.css'
,
),
'js'
=>
array
(
'yii.debug.js'
,
),
'depends'
=>
array
(
'yii'
,
'yii/bootstrap/responsive'
,
),
),
);
framework/yii/bootstrap/assets.php
View file @
30ec0afd
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
return
array
(
'yii/bootstrap'
=>
array
(
...
...
framework/yii/debug/Module.php
View file @
30ec0afd
...
...
@@ -39,7 +39,7 @@ class Module extends \yii\base\Module
* @var string the directory storing the debugger data files. This can be specified using a path alias.
*/
public
$dataPath
=
'@runtime/debug'
;
public
$historySize
=
5
;
public
$historySize
=
5
0
;
public
function
init
()
{
...
...
@@ -90,6 +90,9 @@ class Module extends \yii\base\Module
protected
function
corePanels
()
{
return
array
(
'config'
=>
array
(
'class'
=>
'yii\debug\panels\ConfigPanel'
,
),
'request'
=>
array
(
'class'
=>
'yii\debug\panels\RequestPanel'
,
),
...
...
@@ -102,9 +105,6 @@ class Module extends \yii\base\Module
'db'
=>
array
(
'class'
=>
'yii\debug\panels\DbPanel'
,
),
'config'
=>
array
(
'class'
=>
'yii\debug\panels\ConfigPanel'
,
),
);
}
}
framework/yii/debug/assets/main.css
0 → 100644
View file @
30ec0afd
#yii-debug-toolbar
{
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
0
;
padding
:
0
;
z-index
:
1000000
;
font
:
11px
Verdana
,
Arial
,
sans-serif
;
text-align
:
left
;
height
:
38px
;
border-top
:
1px
solid
#ccc
;
background
:
rgb
(
237
,
237
,
237
);
background
:
url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VkZWRlZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUzJSIgc3RvcC1jb2xvcj0iI2Y2ZjZmNiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)
;
background
:
-moz-linear-gradient
(
top
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
background
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
color-stop
(
0%
,
rgba
(
237
,
237
,
237
,
1
)),
color-stop
(
53%
,
rgba
(
246
,
246
,
246
,
1
)),
color-stop
(
100%
,
rgba
(
255
,
255
,
255
,
1
)));
background
:
-webkit-linear-gradient
(
top
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
background
:
-o-linear-gradient
(
top
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
background
:
-ms-linear-gradient
(
top
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
background
:
linear-gradient
(
to
bottom
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#ededed'
,
endColorstr
=
'#ffffff'
,
GradientType
=
0
);
}
.yii-debug-toolbar-block
{
float
:
left
;
margin
:
0
;
border-right
:
1px
solid
#e4e4e4
;
padding
:
4px
8px
;
line-height
:
32px
;
}
.yii-debug-toolbar-block
a
{
text-decoration
:
none
;
color
:
black
!important
;
}
.yii-debug-toolbar-block
span
{
}
.yii-debug-toolbar-block
img
{
vertical-align
:
middle
;
}
span
.indent
{
color
:
#ccc
;
}
framework/yii/assets/yii.debug.js
→
framework/yii/
debug/
assets/yii.debug.js
View file @
30ec0afd
File moved
framework/yii/debug/controllers/DefaultController.php
View file @
30ec0afd
...
...
@@ -21,13 +21,17 @@ class DefaultController extends Controller
public
$module
;
public
$layout
=
'main'
;
public
function
actionIndex
(
$tag
,
$panel
=
null
)
public
function
actionIndex
(
$tag
=
null
,
$panel
=
null
)
{
if
(
$tag
===
null
)
{
$tags
=
array_keys
(
$this
->
getManifest
());
$tag
=
end
(
$tags
);
}
$meta
=
$this
->
loadData
(
$tag
);
if
(
isset
(
$this
->
module
->
panels
[
$panel
]))
{
$activePanel
=
$this
->
module
->
panels
[
$panel
];
}
else
{
$activePanel
=
reset
(
$this
->
module
->
panels
)
;
$activePanel
=
$this
->
module
->
panels
[
'request'
]
;
}
return
$this
->
render
(
'index'
,
array
(
'tag'
=>
$tag
,
...
...
@@ -47,6 +51,11 @@ class DefaultController extends Controller
));
}
public
function
actionPhpinfo
()
{
phpinfo
();
}
private
$_manifest
;
protected
function
getManifest
()
...
...
framework/yii/debug/panels/ConfigPanel.php
View file @
30ec0afd
...
...
@@ -9,6 +9,7 @@ namespace yii\debug\panels;
use
Yii
;
use
yii\debug\Panel
;
use
yii\helpers\Html
;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
...
...
@@ -18,22 +19,64 @@ class ConfigPanel extends Panel
{
public
function
getName
()
{
return
'Config'
;
return
'Config
uration
'
;
}
public
function
getSummary
()
{
$yiiLogo
=
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAeCAYAAADQBxWhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9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AAAAAAAAAAAAAAAAAAEAAP//vNz1LVdvDhUAAAAASUVORK5CYII='
;
return
<<<EOD
<div class="yii-debug-toolbar-block">
PHP: {$this->data['phpVersion']},
Yii: {$this->data['yiiVersion']}
<a href="http://www.yiiframework.com/" title="Yii Framework">
<img width="29" height="30" alt="" src="$yiiLogo">
<span>{$this->data['application']['yii']}</span>
</a>
</div>
<div class="yii-debug-toolbar-block">
PHP {$this->data['php']['version']}
</div>
EOD;
}
public
function
getDetail
()
{
return
'<h2>Config</h2>'
;
$app
=
array
(
'Yii Version'
=>
$this
->
data
[
'application'
][
'yii'
],
'Application Name'
=>
$this
->
data
[
'application'
][
'name'
],
'Environment'
=>
$this
->
data
[
'application'
][
'env'
],
'Debug Mode'
=>
$this
->
data
[
'application'
][
'debug'
]
?
'Yes'
:
'No'
,
);
$php
=
array
(
'PHP Version'
=>
$this
->
data
[
'php'
][
'version'
],
'Xdebug'
=>
$this
->
data
[
'php'
][
'xdebug'
]
?
'Enabled'
:
'Disabled'
,
'APC'
=>
$this
->
data
[
'php'
][
'apc'
]
?
'Enabled'
:
'Disabled'
,
'Memcache'
=>
$this
->
data
[
'php'
][
'memcache'
]
?
'Enabled'
:
'Disabled'
,
);
return
"<h1>Configuration</h1>
\n
"
.
$this
->
renderData
(
'Application Configuration'
,
$app
)
.
"
\n
"
.
$this
->
renderData
(
'PHP Configuration'
,
$php
)
.
"
\n
"
.
'<div>'
.
Html
::
a
(
'Complete phpinfo()'
,
array
(
'phpinfo'
),
array
(
'class'
=>
'btn btn-info'
))
.
"</div>
\n
"
;
}
protected
function
renderData
(
$caption
,
$values
)
{
if
(
empty
(
$values
))
{
return
"<h3>
$caption
</h3>
\n
<p>Empty.</p>"
;
}
$rows
=
array
();
foreach
(
$values
as
$name
=>
$value
)
{
$rows
[]
=
'<tr><th style="width: 200px;">'
.
Html
::
encode
(
$name
)
.
'</th><td><div style="overflow:auto">'
.
Html
::
encode
(
$value
)
.
'</div></td></tr>'
;
}
$rows
=
implode
(
"
\n
"
,
$rows
);
return
<<<EOD
<h3>$caption</h3>
<table class="table table-condensed table-bordered table-striped table-hover" style="table-layout: fixed;">
<thead><tr><th style="width: 200px;">Name</th><th>Value</th></tr></thead>
<tbody>
$rows
</tbody>
</table>
EOD;
}
public
function
save
()
...
...
@@ -41,6 +84,18 @@ EOD;
return
array
(
'phpVersion'
=>
PHP_VERSION
,
'yiiVersion'
=>
Yii
::
getVersion
(),
'application'
=>
array
(
'yii'
=>
Yii
::
getVersion
(),
'name'
=>
Yii
::
$app
->
name
,
'env'
=>
YII_ENV
,
'debug'
=>
YII_DEBUG
,
),
'php'
=>
array
(
'version'
=>
PHP_VERSION
,
'xdebug'
=>
extension_loaded
(
'xdebug'
),
'apc'
=>
extension_loaded
(
'apc'
),
'memcache'
=>
extension_loaded
(
'memcache'
),
),
);
}
}
framework/yii/debug/panels/ProfilingPanel.php
View file @
30ec0afd
...
...
@@ -49,10 +49,10 @@ class ProfilingPanel extends Panel
$rows
=
array
();
foreach
(
$timings
as
$timing
)
{
$time
=
sprintf
(
'%
0.5f'
,
$timing
[
3
]
);
$procedure
=
str_repeat
(
'
'
,
$timing
[
0
]
*
4
)
.
Html
::
encode
(
$timing
[
1
]);
$time
=
sprintf
(
'%
.1f ms'
,
$timing
[
3
]
*
1000
);
$procedure
=
str_repeat
(
'
<span class="indent">→</span>'
,
$timing
[
0
]
)
.
Html
::
encode
(
$timing
[
1
]);
$category
=
Html
::
encode
(
$timing
[
2
]);
$rows
[]
=
"<tr><td
>
$category
</td><td>
$procedure
</td><td>
{
$time
}
s
</td>"
;
$rows
[]
=
"<tr><td
style=
\"
width: 80px;
\"
>
$time
</td><td style=
\"
width: 220px;
\"
>
$category
</td><td>
$procedure
</td>"
;
}
$rows
=
implode
(
"
\n
"
,
$rows
);
...
...
@@ -62,9 +62,9 @@ class ProfilingPanel extends Panel
<table class="table table-condensed table-bordered table-striped table-hover" style="table-layout: fixed;">
<thead>
<tr>
<th>Category</th>
<th style="width: 80px;">Time</th>
<th style="width: 220px;">Category</th>
<th>Procedure</th>
<th>Time</th>
</tr>
</thead>
<tbody>
...
...
framework/yii/debug/panels/RequestPanel.php
View file @
30ec0afd
...
...
@@ -25,8 +25,8 @@ class RequestPanel extends Panel
public
function
getSummary
()
{
$memory
=
sprintf
(
'%.
2f
MB'
,
$this
->
data
[
'memory'
]
/
1048576
);
$time
=
sprintf
(
'%.3fs'
,
$this
->
data
[
'time'
])
;
$memory
=
sprintf
(
'%.
1f
MB'
,
$this
->
data
[
'memory'
]
/
1048576
);
$time
=
number_format
(
$this
->
data
[
'time'
]
*
1000
)
.
' ms'
;
return
<<<EOD
<div class="yii-debug-toolbar-block">
...
...
framework/yii/debug/views/default/index.php
View file @
30ec0afd
...
...
@@ -12,12 +12,15 @@ use yii\helpers\Html;
*/
$this
->
registerAssetBundle
(
'yii/bootstrap/dropdown'
);
$this
->
title
=
'Yii Debugger'
;
?>
<div
class=
"default-index"
>
<div
class=
"navbar"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<span
class=
"brand"
>
Yii Debugger
</span>
<?php
foreach
(
$panels
as
$panel
)
:
?>
<?php
echo
$panel
->
getSummary
();
?>
<?php
endforeach
;
?>
</div>
</div>
</div>
...
...
framework/yii/debug/views/default/toolbar.php
View file @
30ec0afd
...
...
@@ -12,24 +12,46 @@ use yii\helpers\Html;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
#eee
;
border-top
:
1px
solid
#ccc
;
margin
:
0
;
padding
:
5px
10px
;
padding
:
0
;
z-index
:
1000000
;
font
:
11px
Verdana
,
Arial
,
sans-serif
;
text-align
:
left
;
height
:
38px
;
border-top
:
1px
solid
#ccc
;
background
:
rgb
(
237
,
237
,
237
);
background
:
url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VkZWRlZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUzJSIgc3RvcC1jb2xvcj0iI2Y2ZjZmNiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)
;
background
:
-moz-linear-gradient
(
top
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
background
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
color-stop
(
0%
,
rgba
(
237
,
237
,
237
,
1
)),
color-stop
(
53%
,
rgba
(
246
,
246
,
246
,
1
)),
color-stop
(
100%
,
rgba
(
255
,
255
,
255
,
1
)));
background
:
-webkit-linear-gradient
(
top
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
background
:
-o-linear-gradient
(
top
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
background
:
-ms-linear-gradient
(
top
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
background
:
linear-gradient
(
to
bottom
,
rgba
(
237
,
237
,
237
,
1
)
0%
,
rgba
(
246
,
246
,
246
,
1
)
53%
,
rgba
(
255
,
255
,
255
,
1
)
100%
);
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#ededed'
,
endColorstr
=
'#ffffff'
,
GradientType
=
0
);
}
.yii-debug-toolbar-block
{
float
:
left
;
margin
:
0
10px
;
margin
:
0
;
border-right
:
1px
solid
#e4e4e4
;
padding
:
4px
8px
;
line-height
:
32px
;
}
.yii-debug-toolbar-block
a
{
text-decoration
:
none
;
color
:
black
!important
;
}
.yii-debug-toolbar-block
span
{
}
.yii-debug-toolbar-block
img
{
vertical-align
:
middle
;
}
</style>
<div
id=
"yii-debug-toolbar"
>
<div
class=
"yii-debug-toolbar-block"
>
<?php
echo
Html
::
a
(
'Yii Debugger'
,
array
(
'index'
,
'tag'
=>
$tag
));
?>
</div>
<?php
foreach
(
$panels
as
$panel
)
:
?>
<?php
echo
$panel
->
getSummary
();
?>
<?php
endforeach
;
?>
...
...
framework/yii/debug/views/layouts/main.php
View file @
30ec0afd
...
...
@@ -5,7 +5,7 @@
*/
use
yii\helpers\Html
;
Yii
::
$app
->
getView
()
->
registerAssetBundle
(
'yii/
bootstrap/responsive
'
);
Yii
::
$app
->
getView
()
->
registerAssetBundle
(
'yii/
debug
'
);
?>
<!DOCTYPE html>
<html>
...
...
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