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
c0c97507
Commit
c0c97507
authored
Jul 08, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finished debugger.
parent
20d91bab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
9 deletions
+41
-9
DefaultController.php
framework/yii/debug/controllers/DefaultController.php
+1
-0
index.php
framework/yii/debug/views/default/index.php
+28
-4
view.php
framework/yii/debug/views/default/view.php
+12
-5
No files found.
framework/yii/debug/controllers/DefaultController.php
View file @
c0c97507
...
...
@@ -24,6 +24,7 @@ class DefaultController extends Controller
public
function
actionIndex
()
{
return
$this
->
render
(
'index'
,
array
(
'manifest'
=>
$this
->
getManifest
(),
));
}
...
...
framework/yii/debug/views/default/index.php
View file @
c0c97507
...
...
@@ -4,11 +4,7 @@ use yii\helpers\Html;
/**
* @var \yii\base\View $this
* @var array $meta
* @var string $tag
* @var array $manifest
* @var \yii\debug\Panel[] $panels
* @var \yii\debug\Panel $activePanel
*/
$this
->
registerAssetBundle
(
'yii/bootstrap/dropdown'
);
...
...
@@ -24,4 +20,32 @@ $this->title = 'Yii Debugger';
</div>
</div>
</div>
<div
class=
"container-fluid"
>
<div
class=
"row-fluid"
>
<h1>
Available Debug Data
</h1>
<table
class=
"table table-condensed table-bordered table-striped table-hover"
style=
"table-layout: fixed;"
>
<thead>
<tr>
<th
style=
"width: 120px;"
>
Tag
</th>
<th
style=
"width: 160px;"
>
Time
</th>
<th
style=
"width: 120px;"
>
IP
</th>
<th
style=
"width: 60px;"
>
Method
</th>
<th>
URL
</th>
</tr>
</thead>
<tbody>
<?php
foreach
(
$manifest
as
$tag
=>
$data
)
:
?>
<tr>
<td>
<?php
echo
Html
::
a
(
$tag
,
array
(
'view'
,
'tag'
=>
$tag
));
?>
</td>
<td>
<?php
echo
date
(
'Y-m-d h:i:sa'
,
$data
[
'time'
]);
?>
</td>
<td>
<?php
echo
$data
[
'ip'
];
?>
</td>
<td>
<?php
echo
$data
[
'method'
];
?>
</td>
<td>
<?php
echo
$data
[
'url'
];
?>
</td>
</tr>
<?php
endforeach
;
?>
</tbody>
</table>
</div>
</div>
</div>
framework/yii/debug/views/default/view.php
View file @
c0c97507
...
...
@@ -43,25 +43,32 @@ $this->title = 'Yii Debugger';
<div
class=
"span10"
>
<div
class=
"meta alert alert-info"
>
<div
class=
"btn-group"
>
<?php
echo
Html
::
a
(
'All'
,
array
(
'index'
),
array
(
'class'
=>
'btn'
));
?>
<button
class=
"btn dropdown-toggle"
data-toggle=
"dropdown"
>
View others
Last 10
<span
class=
"caret"
></span>
</button>
<ul
class=
"dropdown-menu"
>
<?php
foreach
(
$manifest
as
$tag2
=>
$meta2
)
{
<?php
$count
=
0
;
foreach
(
$manifest
as
$tag2
=>
$meta2
)
{
$label
=
$meta2
[
'method'
]
.
' '
.
$meta2
[
'url'
]
.
(
$meta2
[
'ajax'
]
?
' (AJAX)'
:
''
)
.
', '
.
date
(
'Y
/m/
d h:i:sa'
,
$meta2
[
'time'
])
.
', '
.
date
(
'Y
-m-
d h:i:sa'
,
$meta2
[
'time'
])
.
', '
.
$meta2
[
'ip'
]
.
', '
.
$tag2
;
$url
=
array
(
'view'
,
'tag'
=>
$tag2
);
echo
'<li>'
.
Html
::
a
(
Html
::
encode
(
$label
),
$url
)
.
'</li>'
;
}
?>
if
(
++
$count
>=
10
)
{
break
;
}
}
?>
</ul>
</div>
Debugging:
<?php
echo
$meta
[
'method'
];
?>
<?php
echo
Html
::
a
(
Html
::
encode
(
$meta
[
'url'
]),
$meta
[
'url'
]);
?>
<?php
echo
$meta
[
'ajax'
]
?
' (AJAX)'
:
''
;
?>
at
<?php
echo
date
(
'Y
/m/
d h:i:sa'
,
$meta
[
'time'
]);
?>
at
<?php
echo
date
(
'Y
-m-
d h:i:sa'
,
$meta
[
'time'
]);
?>
by
<?php
echo
$meta
[
'ip'
];
?>
</div>
<?php
echo
$activePanel
->
getDetail
();
?>
...
...
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