Added the debug toolkit plugin, found on the bakery website.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@92 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
52
plugins/debug_kit/views/elements/debug_toolbar.ctp
Normal file
52
plugins/debug_kit/views/elements/debug_toolbar.ctp
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Debug Toolbar Element
|
||||
*
|
||||
* Renders all of the other panel elements.
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.debug_kit.views.elements
|
||||
* @since
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<div id="debug-kit-toolbar">
|
||||
<?php if (empty($debugToolbarPanels)) :?>
|
||||
<p class="warning"><?php __('There are no active panels. You must enable a panel to see its output.'); ?></p>
|
||||
<?php else: ?>
|
||||
<ul id="panel-tabs">
|
||||
<li class="panel-tab icon">
|
||||
<a href="#hide" id="hide-toolbar">
|
||||
<?php echo $html->image('/debug_kit/img/cake.icon.png', array('alt' => 'cakePHP')); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php foreach ($debugToolbarPanels as $panelName => $panelInfo): ?>
|
||||
<li class="panel-tab">
|
||||
<a href="#<?php echo Inflector::underscore($panelName); ?>">
|
||||
<?php echo Inflector::humanize(Inflector::underscore($panelName)); ?>
|
||||
</a>
|
||||
<div class="panel-content" id="<?php echo Inflector::underscore($panelName); ?>-tab">
|
||||
<?php echo $this->element($panelInfo['elementName'], $panelInfo); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
0
plugins/debug_kit/views/elements/empty
Normal file
0
plugins/debug_kit/views/elements/empty
Normal file
48
plugins/debug_kit/views/elements/log_panel.ctp
Normal file
48
plugins/debug_kit/views/elements/log_panel.ctp
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Log Panel Element
|
||||
*
|
||||
*
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.debug_kit.views.elements
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Logs') ?></h2>
|
||||
<div class="code-table">
|
||||
<?php foreach ($content as $logName => $logs): ?>
|
||||
<h3><?php echo $logName ?></h3>
|
||||
<?php
|
||||
$len = count($logs);
|
||||
if ($len > 0):
|
||||
$headers = array(__('Time', true), __('Message', true));
|
||||
$rows = array();
|
||||
for ($i = 0; $i < $len; $i += 2):
|
||||
$rows[] = array(
|
||||
$logs[$i], $logs[$i + 1]
|
||||
);
|
||||
endfor;
|
||||
echo $toolbar->table($rows, $headers, array('title' => $logName));
|
||||
else: ?>
|
||||
<p class="info"><?php __('There were no log entries made this request'); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
43
plugins/debug_kit/views/elements/memory_panel.ctp
Normal file
43
plugins/debug_kit/views/elements/memory_panel.ctp
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Session Panel Element
|
||||
*
|
||||
*
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.debug_kit.views.elements
|
||||
* @since
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Memory'); ?></h2>
|
||||
<div class="current-mem-use">
|
||||
<?php echo $toolbar->message(
|
||||
__('Current Memory Use',true),
|
||||
$number->toReadableSize(DebugKitDebugger::getMemoryUse())
|
||||
);?>
|
||||
</div>
|
||||
<div class="peak-mem-use">
|
||||
<?php
|
||||
echo $toolbar->message(
|
||||
__('Peak Memory Use', true),
|
||||
$number->toReadableSize(DebugKitDebugger::getPeakMemoryUse())
|
||||
);
|
||||
?></div>
|
||||
45
plugins/debug_kit/views/elements/request_panel.ctp
Normal file
45
plugins/debug_kit/views/elements/request_panel.ctp
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Request Panel Element
|
||||
*
|
||||
*
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.debug_kit.views.elements
|
||||
* @since
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<h2> <?php __('Request'); ?></h2>
|
||||
<h4>Cake Params</h4>
|
||||
<?php echo $toolbar->makeNeatArray($content['params']); ?>
|
||||
|
||||
<h4>$_GET</h4>
|
||||
<?php echo $toolbar->makeNeatArray($content['get']); ?>
|
||||
|
||||
<h4>Cookie</h4>
|
||||
<?php if (isset($content['cookie'])): ?>
|
||||
<?php echo $toolbar->makeNeatArray($content['cookie']); ?>
|
||||
<?php else: ?>
|
||||
<p class="warning">To view Cookies, add CookieComponent to Controller
|
||||
<?php endif; ?>
|
||||
|
||||
<h4><?php __('Current Route') ?></h4>
|
||||
<?php echo $toolbar->makeNeatArray($content['currentRoute']); ?>
|
||||
31
plugins/debug_kit/views/elements/session_panel.ctp
Normal file
31
plugins/debug_kit/views/elements/session_panel.ctp
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Session Panel Element
|
||||
*
|
||||
*
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.debug_kit.views.elements
|
||||
* @since
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Session'); ?></h2>
|
||||
<?php echo $toolbar->makeNeatArray($content); ?>
|
||||
40
plugins/debug_kit/views/elements/sql_log_panel.ctp
Normal file
40
plugins/debug_kit/views/elements/sql_log_panel.ctp
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Session Panel Element
|
||||
*
|
||||
*
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.debug_kit.views.elements
|
||||
* @since
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<h2><?php __('Sql Logs')?></h2>
|
||||
<?php if (!empty($content)) : ?>
|
||||
<?php foreach ($content as $dbName => $queryLog) : ?>
|
||||
<div class="sql-log-panel-query-log">
|
||||
<h4><?php echo $dbName ?></h4>
|
||||
<?php echo $queryLog; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<p class="warning"><?php __('No active database connections'); ?>
|
||||
<?php endif; ?>
|
||||
44
plugins/debug_kit/views/elements/timer_panel.ctp
Normal file
44
plugins/debug_kit/views/elements/timer_panel.ctp
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Timer Panel Element
|
||||
*
|
||||
*
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.debug_kit.views.elements
|
||||
* @since
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
$timers = DebugKitDebugger::getTimers();
|
||||
?>
|
||||
<h2><?php __('Timers'); ?></h2>
|
||||
<p class="request-time">
|
||||
<?php $totalTime = sprintf(__('%s (seconds)', true), $number->precision(DebugKitDebugger::requestTime(), 6)); ?>
|
||||
<?php echo $toolbar->message(__('Total Request Time:', true), $totalTime)?>
|
||||
</p>
|
||||
|
||||
<?php foreach ($timers as $timerName => $timeInfo):
|
||||
$rows[] = array(
|
||||
$timeInfo['message'],
|
||||
$number->precision($timeInfo['time'], 6)
|
||||
);
|
||||
$headers = array(__('Message', true), __('time in seconds', true));
|
||||
endforeach;
|
||||
echo $toolbar->table($rows, $headers, array('title' => 'Timers')); ?>
|
||||
35
plugins/debug_kit/views/elements/variables_panel.ctp
Normal file
35
plugins/debug_kit/views/elements/variables_panel.ctp
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* View Variables Panel Element
|
||||
*
|
||||
*
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.debug_kit.views.elements
|
||||
* @since
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<h2> <?php __('View Variables'); ?></h2>
|
||||
<?php
|
||||
$vars = $this->viewVars;
|
||||
unset($vars['debugToolbarPanels'], $vars['debugToolbarJavascript']);
|
||||
?>
|
||||
<?php echo $toolbar->makeNeatArray($vars); ?>
|
||||
Reference in New Issue
Block a user