Changeset 1363
- Timestamp:
- 05/14/06 14:00:53 (3 years ago)
- Files:
-
- trunk/data/web/sf/css/sf_web_debug/main.css (modified) (1 diff)
- trunk/data/web/sf/js/sf_web_debug/main.js (modified) (1 diff)
- trunk/lib/debug/sfWebDebug.class.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/data/web/sf/css/sf_web_debug/main.css
r1362 r1363 65 65 padding: 0; 66 66 border: 0; 67 } 68 69 #sfWebDebugDatabaseDetails li 70 { 71 margin: 0; 72 margin-left: 30px; 73 padding: 0 5px; 67 74 } 68 75 trunk/data/web/sf/js/sf_web_debug/main.js
r1352 r1363 39 39 document.getElementById('sfWebDebugLog').style.display = 'none'; 40 40 document.getElementById('sfWebDebugConfig').style.display = 'none'; 41 document.getElementById('sfWebDebugDatabaseDetails').style.display = 'none'; 41 42 } 42 43 trunk/lib/debug/sfWebDebug.class.php
r1362 r1363 173 173 } 174 174 175 $logs = ''; 176 $sql_logs = array(); 175 177 if ($sf_logging_active) 176 178 { 177 $logs = '<table id="sfWebDebugLogs">';178 $logs .= "<tr>179 <th>#</th>180 <th> </th>181 <th>ms</th>182 <th>type</th>183 <th>message</th>184 </tr>\n";179 $logs = '<table id="sfWebDebugLogs"> 180 <tr> 181 <th>#</th> 182 <th> </th> 183 <th>ms</th> 184 <th>type</th> 185 <th>message</th> 186 </tr>'."\n"; 185 187 $line_nb = 0; 186 188 foreach($this->log as $logEntry) … … 210 212 $log = $this->formatLogLine($type, $log); 211 213 214 // sql queries log 215 if (preg_match('/executeQuery.+?\:\s+(.+)$/', $log, $match)) 216 { 217 $sql_logs[] .= $match[1]; 218 } 219 212 220 ++$line_nb; 213 221 $logs .= sprintf("<tr class='sfWebDebugLogLine sfWebDebug%s %s'><td>%s</td><td>%s</td><td>+%s </td><td><span class=\"sfWebDebugLogType\">%s</span></td><td>%s%s</td></tr>\n", ucfirst($priority), $logEntry->getType(), $line_nb, image_tag($this->base_image_path.'/'.$priority.'.png'), $logEntry->getElapsedTime(), $type, $log, $debug_info); … … 235 243 if (sfConfig::get('sf_logging_active')) 236 244 { 237 $logLink = '<li><a href="#" onclick="document.getElementById(\'sfWebDebugConfig\').style.display=\'none\'; sfWebDebugToggle(\'sfWebDebugLog\')"><img src="'.$this->base_image_path.'/comment.png" /> logs & msgs</a></li>';245 $logLink = '<li><a href="#" onclick="document.getElementById(\'sfWebDebugConfig\').style.display=\'none\';document.getElementById(\'sfWebDebugDatabaseDetails\').style.display=\'none\';sfWebDebugToggle(\'sfWebDebugLog\')"><img src="'.$this->base_image_path.'/comment.png" /> logs & msgs</a></li>'; 238 246 } 239 247 240 248 // database information 241 249 $dbInfo = ''; 250 $dbInfoDetails = ''; 242 251 if (null !== ($nb = $this->getDatabaseRequestNumber())) 243 252 { 244 $dbInfo = '<li><img src="'.$this->base_image_path.'/database.png" /> '.$nb.'</li>'; 253 $dbInfo = '<li><a href="#" onclick="document.getElementById(\'sfWebDebugConfig\').style.display=\'none\';document.getElementById(\'sfWebDebugLog\').style.display=\'none\';sfWebDebugToggle(\'sfWebDebugDatabaseDetails\')"><img src="'.$this->base_image_path.'/database.png" /> '.$nb.'</a></li>'; 254 255 $dbInfoDetails = ' 256 <div id="sfWebDebugDatabaseDetails"> 257 <ol><li>'.implode('</><li>', $sql_logs).'</li></ol> 258 </div> 259 '; 245 260 } 246 261 … … 291 306 <a href="#" onclick="sfWebDebugToggleMenu()"><img src="'.$this->base_image_path.'/sf.png" /></a> 292 307 <ul id="sfWebDebugDetails" class="menu"> 293 <li><a href="#" onclick="document.getElementById(\'sfWebDebugLog\').style.display=\'none\'; sfWebDebugToggle(\'sfWebDebugConfig\')"><img src="'.$this->base_image_path.'/config.png" /> vars & config</a></li>308 <li><a href="#" onclick="document.getElementById(\'sfWebDebugLog\').style.display=\'none\';document.getElementById(\'sfWebDebugDatabaseDetails\').style.display=\'none\';sfWebDebugToggle(\'sfWebDebugConfig\')"><img src="'.$this->base_image_path.'/config.png" /> vars & config</a></li> 294 309 '.$cacheLink.' 295 310 '.$logLink.' … … 309 324 <h1>Configuration and request variables</h1> 310 325 '.$this->getCurrentConfigAsHtml().' 326 </div> 327 328 <div id="sfWebDebugDatabaseDetails" class="top" style="display: none"> 329 <h1>SQL queries</h1> 330 '.$dbInfoDetails 331 .' 311 332 </div> 312 333 </div>

