first commit
This commit is contained in:
192
modules/debug_toolbar/views/toolbar.css
Normal file
192
modules/debug_toolbar/views/toolbar.css
Normal file
@@ -0,0 +1,192 @@
|
||||
<style type="text/css">
|
||||
/* Reset */
|
||||
div#kohana-debug-toolbar,
|
||||
div#kohana-debug-toolbar div,
|
||||
div#kohana-debug-toolbar span,
|
||||
div#kohana-debug-toolbar pre,
|
||||
div#kohana-debug-toolbar h1,
|
||||
div#kohana-debug-toolbar img,
|
||||
div#kohana-debug-toolbar a,
|
||||
div#kohana-debug-toolbar ul,
|
||||
div#kohana-debug-toolbar li,
|
||||
div#kohana-debug-toolbar table,
|
||||
div#kohana-debug-toolbar tr,
|
||||
div#kohana-debug-toolbar td,
|
||||
div#kohana-debug-toolbar th {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: middle;
|
||||
background: transparent;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
font-size:100%;
|
||||
}
|
||||
div#kohana-debug-toolbar table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
div#kohana-debug-toolbar :focus { outline: 0; }
|
||||
div#kohana-debug-toolbar ul {
|
||||
list-style:none;
|
||||
}
|
||||
|
||||
/* Global */
|
||||
div#kohana-debug-toolbar {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
line-height: 12px;
|
||||
}
|
||||
div#kohana-debug-toolbar h1 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
padding:0px 5px;
|
||||
border: 0px;
|
||||
background-color: #eee;
|
||||
color: #000;
|
||||
display:block;
|
||||
}
|
||||
div#kohana-debug-toolbar a,
|
||||
div#kohana-debug-toolbar a:hover {
|
||||
text-decoration: none;
|
||||
color: #222;
|
||||
}
|
||||
div#kohana-debug-toolbar pre { line-height: 1.3 }
|
||||
div#kohana-debug-toolbar .top {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
z-index: 9999;
|
||||
border-bottom: 1px solid #aaa;
|
||||
background-color: #efefef;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
div#kohana-debug-toolbar table {
|
||||
padding: 3px;
|
||||
font-size: 11px;
|
||||
border: 1px solid #999;
|
||||
width: 99%;
|
||||
margin:0px 5px;
|
||||
font-family: monospace;
|
||||
}
|
||||
div#kohana-debug-toolbar td {
|
||||
padding: 3px 3px;
|
||||
vertical-align: top;
|
||||
background-color: #eee;
|
||||
}
|
||||
div#kohana-debug-toolbar tr.odd td {
|
||||
background-color: #ddd;
|
||||
}
|
||||
div#kohana-debug-toolbar th {
|
||||
padding: 3px 5px;
|
||||
vertical-align: top;
|
||||
background-color: #999;
|
||||
color: #eee;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div#kohana-debug-toolbar td,
|
||||
div#kohana-debug-toolbar th {
|
||||
border: 1px solid #efefef;
|
||||
}
|
||||
|
||||
/* Toolbar */
|
||||
div#kohana-debug-toolbar div#debug-toolbar {
|
||||
position: fixed;
|
||||
padding: 0 0 3px 0;
|
||||
top: 0px;
|
||||
opacity: 0.80;
|
||||
filter: alpha(opacity:80);
|
||||
z-index: 10000;
|
||||
white-space: nowrap;
|
||||
line-height: 16px;
|
||||
background-color: #ccc;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-toolbar.debug-toolbar-align-center { left: auto; right: auto; }
|
||||
div#kohana-debug-toolbar div#debug-toolbar.debug-toolbar-align-right { right: 0; }
|
||||
div#kohana-debug-toolbar div#debug-toolbar.debug-toolbar-align-left { left: 0; }
|
||||
div#kohana-debug-toolbar div#debug-toolbar img { vertical-align: middle; }
|
||||
div#kohana-debug-toolbar div#debug-toolbar ul.menu {
|
||||
padding: 5px;
|
||||
display: inline;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-toolbar ul.menu li {
|
||||
display: inline;
|
||||
list-style: none;
|
||||
padding: 0 5px;
|
||||
border-right: 1px solid #aaa;
|
||||
cursor: pointer;
|
||||
line-height: 16px;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-toolbar ul.menu li.last {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Benchmarks */
|
||||
div#kohana-debug-toolbar div#debug-benchmarks { padding: 3px 0px; }
|
||||
|
||||
/* SQL queries */
|
||||
div#kohana-debug-toolbar div#debug-database { padding: 3px 0px; }
|
||||
|
||||
/* Vars & Config */
|
||||
div#kohana-debug-toolbar div#debug-vars {
|
||||
padding: 3px 0px;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-vars pre {
|
||||
background-color: #ddd;
|
||||
padding: 5px;
|
||||
color: #333;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-vars .varmenu {
|
||||
margin: 20px 0 0 0;
|
||||
height: 23px;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-vars .varmenu li {
|
||||
float: left;
|
||||
display: block;
|
||||
padding: 5px;
|
||||
margin: 0 6px 0 0;
|
||||
border-top: 1px solid #999;
|
||||
border-left: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
cursor: pointer;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-vars .varmenu li.active {
|
||||
background-color: #ddd;
|
||||
color: #000;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu { background-color: #ddd; }
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li {
|
||||
display: block;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li.odd { background-color: #eee; }
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li.even { background-color: #fff; }
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li.odd pre { background-color: #eee; }
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li.even pre { background-color: #fff; }
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li:hover.odd { background-color: #ddd; }
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li:hover.even { background-color: #ddd; }
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li:hover.odd pre { background-color: #ddd; }
|
||||
div#kohana-debug-toolbar div#debug-vars .configmenu li:hover.even pre { background-color: #ddd; }
|
||||
|
||||
/* Logs & Msgs */
|
||||
div#kohana-debug-toolbar div#debug-log {
|
||||
padding: 3px 0px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* Ajax */
|
||||
div#kohana-debug-toolbar div#debug-ajax {
|
||||
padding: 3px 0px;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
122
modules/debug_toolbar/views/toolbar.js
Normal file
122
modules/debug_toolbar/views/toolbar.js
Normal file
@@ -0,0 +1,122 @@
|
||||
var debugToolbar = {
|
||||
|
||||
// current toolbar section thats open
|
||||
current: null,
|
||||
|
||||
// current vars and config section open
|
||||
currentvar: null,
|
||||
|
||||
// current config section open
|
||||
currentli: null,
|
||||
|
||||
// toggle a toolbar section
|
||||
show : function(obj) {
|
||||
if (obj == debugToolbar.current) {
|
||||
debugToolbar.off(obj);
|
||||
debugToolbar.current = null;
|
||||
} else {
|
||||
debugToolbar.off(debugToolbar.current);
|
||||
debugToolbar.on(obj);
|
||||
debugToolbar.current = obj;
|
||||
}
|
||||
},
|
||||
|
||||
// toggle a vars and configs section
|
||||
showvar : function(li, obj) {
|
||||
if (obj == debugToolbar.currentvar) {
|
||||
debugToolbar.off(obj);
|
||||
debugToolbar.currentli.className = '';
|
||||
debugToolbar.currentli = null;
|
||||
debugToolbar.currentvar = null;
|
||||
} else {
|
||||
debugToolbar.off(debugToolbar.currentvar);
|
||||
if (debugToolbar.currentli)
|
||||
debugToolbar.currentli.className = '';
|
||||
debugToolbar.on(obj);
|
||||
debugToolbar.currentvar = obj;
|
||||
debugToolbar.currentli = li;
|
||||
debugToolbar.currentli.className = 'active';
|
||||
}
|
||||
},
|
||||
|
||||
// turn an element on
|
||||
on : function(obj) {
|
||||
if (document.getElementById(obj) != null)
|
||||
document.getElementById(obj).style.display = '';
|
||||
},
|
||||
|
||||
// turn an element off
|
||||
off : function(obj) {
|
||||
if (document.getElementById(obj) != null)
|
||||
document.getElementById(obj).style.display = 'none';
|
||||
},
|
||||
|
||||
// toggle an element
|
||||
toggle : function(obj) {
|
||||
if (typeof obj == 'string')
|
||||
obj = document.getElementById(obj);
|
||||
|
||||
if (obj)
|
||||
obj.style.display = obj.style.display == 'none' ? '' : 'none';
|
||||
},
|
||||
|
||||
// close the toolbar
|
||||
close : function() {
|
||||
document.getElementById('kohana-debug-toolbar').style.display = 'none';
|
||||
},
|
||||
|
||||
swap: function() {
|
||||
var toolbar = document.getElementById('debug-toolbar');
|
||||
if (toolbar.className == 'debug-toolbar-align-center') {
|
||||
toolbar.className = 'debug-toolbar-align-left';
|
||||
} else if (toolbar.className == 'debug-toolbar-align-left') {
|
||||
toolbar.className = 'debug-toolbar-align-right';
|
||||
} else {
|
||||
toolbar.className = 'debug-toolbar-align-center';
|
||||
}
|
||||
},
|
||||
|
||||
collapse: function() {
|
||||
debugToolbar.toggle('debug-toolbar-menu');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Test for javascript libraries
|
||||
* (only supports jQuery at the moment
|
||||
*/
|
||||
if (typeof jQuery != 'undefined') {
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
// display ajax button in toolbar
|
||||
$('#toggle-ajax').css({display: 'inline'});
|
||||
|
||||
// bind ajax event
|
||||
$('#debug-ajax').bind("ajaxComplete", function(event, xmlrequest, ajaxOptions){
|
||||
|
||||
// add a new row to ajax table
|
||||
$('#debug-ajax table').append(
|
||||
'<tr class="even">' +
|
||||
'<td>' + $('#debug-ajax table tr').size() +'<\/td>' +
|
||||
'<td>jQuery ' + jQuery.fn.jquery + '<\/td>' +
|
||||
'<td>' + xmlrequest.statusText + ' (' + xmlrequest.status + ')<\/td>' +
|
||||
'<td>' + ajaxOptions.url + '<\/td>' +
|
||||
'<\/tr>'
|
||||
);
|
||||
|
||||
// stripe table
|
||||
$('#debug-ajax table tbody tr:nth-child(even)').attr('class', 'odd');
|
||||
|
||||
// update count in toolbar
|
||||
$('#toggle-ajax span').text($('#debug-ajax table tr').size()-1);
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof Prototype != 'undefined') {
|
||||
|
||||
}
|
||||
|
||||
281
modules/debug_toolbar/views/toolbar.php
Normal file
281
modules/debug_toolbar/views/toolbar.php
Normal file
@@ -0,0 +1,281 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.') ?>
|
||||
|
||||
<!-- CSS styles (if not added to <head>) -->
|
||||
<?php if (isset($styles)): ?>
|
||||
<?php echo $styles ?>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Javascript -->
|
||||
<script type="text/javascript">
|
||||
<?php echo $scripts ?>
|
||||
</script>
|
||||
|
||||
<div id="kohana-debug-toolbar">
|
||||
|
||||
<!-- Toolbar -->
|
||||
<div id="debug-toolbar" class="debug-toolbar-align-<?php echo $align ?>">
|
||||
|
||||
<!-- Kohana link -->
|
||||
<?php echo html::image(
|
||||
Kohana::config('debug_toolbar.icon_path').'/kohana.png',
|
||||
array('onclick' => 'debugToolbar.collapse()')
|
||||
) ?>
|
||||
|
||||
<!-- Kohana icon -->
|
||||
<?php if (Kohana::config('debug_toolbar.minimized') === TRUE): ?>
|
||||
<ul id="debug-toolbar-menu" class="menu" style="display: none">
|
||||
<?php else: ?>
|
||||
<ul id="debug-toolbar-menu" class="menu">
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Kohana version -->
|
||||
<li>
|
||||
<?php echo html::anchor("http://kohanaphp.com/home", KOHANA_VERSION, array('target' => '_blank')) ?>
|
||||
</li>
|
||||
|
||||
<!-- Benchmarks -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.benchmarks')): ?>
|
||||
<!-- Time -->
|
||||
<li id="time" onclick="debugToolbar.show('debug-benchmarks'); return false;">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/time.png', array('alt' => 'time')) ?>
|
||||
<?php echo round(($benchmarks['system_benchmark_total_execution']['time'])*1000, 2) ?> ms
|
||||
</li>
|
||||
<!-- Memory -->
|
||||
<li id="memory" onclick="debugToolbar.show('debug-benchmarks'); return false;">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/memory.png', array('alt' => 'memory')) ?>
|
||||
<?php echo text::bytes($benchmarks['system_benchmark_total_execution']['memory']) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Queries -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.database')): ?>
|
||||
<li id="toggle-database" onclick="debugToolbar.show('debug-database'); return false;">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/database.png', array('alt' => 'queries')) ?>
|
||||
<?php echo isset($queries) ? count($queries) : 0 ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Vars and Config -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.vars_and_config')): ?>
|
||||
<li id="toggle-vars" onclick="debugToolbar.show('debug-vars'); return false;">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/config.png', array('alt' => 'vars & config')) ?>
|
||||
vars & config
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Logs -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.logs')): ?>
|
||||
<li id="toggle-log" onclick="debugToolbar.show('debug-log'); return false;">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/logs.png', array('alt' => 'logs')) ?>
|
||||
logs
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Ajax -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.ajax')): ?>
|
||||
<li id="toggle-ajax" onclick="debugToolbar.show('debug-ajax'); return false;" style="display: none">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/ajax.png', array('alt' => 'ajax')) ?>
|
||||
ajax (<span>0</span>)
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Files -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.files')): ?>
|
||||
<li id="toggle-files" onclick="debugToolbar.show('debug-files'); return false;">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/page_copy.png', array('alt' => 'files')) ?>
|
||||
files
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
<!-- Swap sides -->
|
||||
<li onclick="debugToolbar.swap(); return false;">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/text_align_left.png', array('alt' => 'align')) ?>
|
||||
</li>
|
||||
|
||||
<!-- Close -->
|
||||
<li class="last" onclick="debugToolbar.close(); return false;">
|
||||
<?php echo html::image(Kohana::config('debug_toolbar.icon_path').'/close.png', array('alt' => 'close')) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Benchmarks -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.benchmarks')): ?>
|
||||
<div id="debug-benchmarks" class="top" style="display: none;">
|
||||
<h1>Benchmarks</h1>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th align="left">benchmark</th>
|
||||
<th align="right">time</th>
|
||||
<th align="right">memory</th>
|
||||
</tr>
|
||||
<?php if (count($benchmarks)): ?>
|
||||
<?php foreach ((array)$benchmarks as $benchmark): ?>
|
||||
<tr class="<?php echo text::alternate('odd','even')?>">
|
||||
<td align="left"><?php echo $benchmark['name'] ?></td>
|
||||
<td align="right"><?php echo sprintf('%.2f', $benchmark['time'] * 1000) ?> ms</td>
|
||||
<td align="right"><?php echo text::bytes($benchmark['memory']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr class="<?php echo text::alternate('odd','even') ?>">
|
||||
<td colspan="3">no benchmarks to display</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Database -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.database')): ?>
|
||||
<div id="debug-database" class="top" style="display: none;">
|
||||
<h1>SQL Queries</h1>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr align="left">
|
||||
<th>#</th>
|
||||
<th>query</th>
|
||||
<th>time</th>
|
||||
<th>rows</th>
|
||||
</tr>
|
||||
<?php $total_time = $total_rows = 0; ?>
|
||||
<?php foreach ((array)$queries as $id => $query): ?>
|
||||
<tr class="<?php echo text::alternate('odd','even')?>">
|
||||
<td><?php echo $id + 1 ?></td>
|
||||
<td><?php echo $query['query']?></td>
|
||||
<td><?php echo sprintf('%.3f', $query['time'] * 1000)?> ms</td>
|
||||
<td><?php echo $query['rows']?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$total_time += $query['time'];
|
||||
$total_rows += $query['rows'];
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
<tr align="left">
|
||||
<th> </th>
|
||||
<th><?php echo count($queries) ?> total</th>
|
||||
<th><?php echo sprintf('%.3f', $total_time * 1000) ?> ms</th>
|
||||
<th><?php echo $total_rows ?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Vars and Config -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.vars_and_config')): ?>
|
||||
<div id="debug-vars" class="top" style="display: none;">
|
||||
<h1>Vars & Config</h1>
|
||||
<ul class="varmenu">
|
||||
<li onclick="debugToolbar.showvar(this, 'vars-post'); return false;">POST</li>
|
||||
<li onclick="debugToolbar.showvar(this, 'vars-get'); return false;">GET</li>
|
||||
<li onclick="debugToolbar.showvar(this, 'vars-server'); return false;">SERVER</li>
|
||||
<li onclick="debugToolbar.showvar(this, 'vars-cookie'); return false;">COOKIE</li>
|
||||
<li onclick="debugToolbar.showvar(this, 'vars-session'); return false;">SESSION</li>
|
||||
<li onclick="debugToolbar.showvar(this, 'vars-config'); return false;">CONFIG</li>
|
||||
</ul>
|
||||
<div style="display: none;" id="vars-post">
|
||||
<?php echo isset($_POST) ? Kohana::debug($_POST) : Kohana::debug(array()) ?>
|
||||
</div>
|
||||
<div style="display: none;" id="vars-get">
|
||||
<?php echo isset($_GET) ? Kohana::debug($_GET) : Kohana::debug(array()) ?>
|
||||
</div>
|
||||
<div style="display: none;" id="vars-server">
|
||||
<?php echo isset($_SERVER) ? Kohana::debug($_SERVER) : Kohana::debug(array()) ?>
|
||||
</div>
|
||||
<div style="display: none;" id="vars-cookie">
|
||||
<?php echo isset($_COOKIE) ? Kohana::debug($_COOKIE) : Kohana::debug(array()) ?>
|
||||
</div>
|
||||
<div style="display: none;" id="vars-session">
|
||||
<?php echo isset($_SESSION) ? Kohana::debug($_SESSION) : Kohana::debug(array()) ?>
|
||||
</div>
|
||||
<div style="display: none;" id="vars-config">
|
||||
<ul class="configmenu">
|
||||
<?php foreach ($configs as $section => $vars): ?>
|
||||
<li class="<?php echo text::alternate('odd', 'even') ?>" onclick="debugToolbar.toggle('vars-config-<?php echo $section ?>'); return false;">
|
||||
<div><?php echo $section ?></div>
|
||||
<div style="display: none;" id="vars-config-<?php echo $section ?>">
|
||||
<?php echo Kohana::debug($vars) ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Logs and Messages -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.logs')): ?>
|
||||
<div id="debug-log" class="top" style="display: none;">
|
||||
<h1>Logs</h1>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr align="left">
|
||||
<th width="1%">#</th>
|
||||
<th width="200">time</th>
|
||||
<th width="100">level</th>
|
||||
<th>message</th>
|
||||
</tr>
|
||||
<?php foreach ((array)$logs as $id => $log): ?>
|
||||
<tr class="<?php echo text::alternate('odd','even')?>">
|
||||
<td><?php echo $id + 1 ?></td>
|
||||
<td><?php echo $log[0] ?></td>
|
||||
<td><?php echo $log[1] ?></td>
|
||||
<td><?php echo $log[2] ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Ajax Requests -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.ajax')): ?>
|
||||
<div id="debug-ajax" class="top" style="display:none;">
|
||||
<h1>Ajax</h1>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr align="left">
|
||||
<th width="1%">#</th>
|
||||
<th width="150">source</th>
|
||||
<th width="150">status</th>
|
||||
<th>request</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Included Files -->
|
||||
<?php if (Kohana::config('debug_toolbar.panels.files')): ?>
|
||||
<div id="debug-files" class="top" style="display: none;">
|
||||
<h1>Files</h1>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr align="left">
|
||||
<th>#</th>
|
||||
<th>file</th>
|
||||
<th>size</th>
|
||||
<th>lines</th>
|
||||
</tr>
|
||||
<?php $total_size = $total_lines = 0 ?>
|
||||
<?php foreach ((array)$files as $id => $file): ?>
|
||||
<?php
|
||||
$size = filesize($file);
|
||||
$lines = count(file($file));
|
||||
?>
|
||||
<tr class="<?php echo text::alternate('odd','even')?>">
|
||||
<td><?php echo $id + 1 ?></td>
|
||||
<td><?php echo $file ?></td>
|
||||
<td><?php echo $size ?></td>
|
||||
<td><?php echo $lines ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$total_size += $size;
|
||||
$total_lines += $lines;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
<tr align="left">
|
||||
<th colspan="2">total</th>
|
||||
<th><?php echo text::bytes($total_size) ?></th>
|
||||
<th><?php echo number_format($total_lines) ?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user