passed w3c validation
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@530 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
parent
68f5000129
commit
45947b1989
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<?php
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
input, table { font-family: sans-serif; }
|
||||
input { font-size: 12px; }
|
||||
table { border-collapse: collapse; font-size: 11px; }
|
||||
table { border-collapse: collapse; font-size: 11px; margin: 0; margin-bottom: 10px; }
|
||||
table caption, h2 { font-size: 16px; font-weight: bold; text-align: left; padding-top: 20px; margin-bottom: 2px; }
|
||||
table { white-space: pre; }
|
||||
table.cycles { border: 1px solid black; margin-top: 5px; margin-bottom: 5px; }
|
||||
table.cycles .col1 { background-color: #f5f5f5; }
|
||||
|
@ -31,7 +32,7 @@ form {margin: 0; padding: 0}
|
|||
.hitsgraph div { float: left; width: 2px; height: 100%; }
|
||||
.bitsgraph div div { float: none; width: 100%; }
|
||||
|
||||
.switcher, h1, h2 { text-align: center; display: block; }
|
||||
.switcher, h1 { text-align: center; display: block; }
|
||||
.switcher * { color: blue; }
|
||||
.switcher a.active { font-weight: bold; font-size: 130%; color: black; }
|
||||
#help { display: block; float: right; }
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<?php include("header.tpl.php"); ?>
|
||||
<a href="help.php" target="_blank" id="help"><?php echo _T("Help") ?> »</a>
|
||||
<span class="switcher"><?php echo switcher("type", $types); ?></span>
|
||||
<div id="help">
|
||||
<a href="help.php"><?php echo _T("Help") ?> »</a>
|
||||
</div>
|
||||
<div class="switcher"><?php echo switcher("type", $types); ?></div>
|
||||
<?php
|
||||
$a = new Cycle('class="col1"', 'class="col2"');
|
||||
$b = new Cycle('class="col1"', 'class="col2"');
|
||||
?>
|
||||
<?php echo _T('Caches'); ?>:
|
||||
<table cellspacing="0" cellpadding="4" class="cycles">
|
||||
<caption><?php echo _T('Caches'); ?></caption>
|
||||
<col />
|
||||
<col align="right" />
|
||||
<col align="right" />
|
||||
|
@ -63,7 +65,6 @@ $b = new Cycle('class="col1"', 'class="col2"');
|
|||
}
|
||||
|
||||
$w = $graph_width;
|
||||
$tdwidth = $w + 2;
|
||||
if (empty($ci['istotal'])) {
|
||||
$graph = freeblock_to_graph($ci['free_blocks'], $ci['size']);
|
||||
$blocksgraph = "<div class=\"blocksgraph\" style=\"width: {$w}px\">{$graph}</div>";
|
||||
|
@ -95,14 +96,14 @@ $b = new Cycle('class="col1"', 'class="col2"');
|
|||
<td title="{$ci['slots']}">{$ci_slots}</td>
|
||||
<td title="{$ci['size']}">{$ci_size}</td>
|
||||
<td title="{$ci['avail']}">{$ci_avail}</td>
|
||||
<td title="{$pvalue} %" width="{$tdwidth}"
|
||||
<td title="{$pvalue} %"
|
||||
><div class="percent" style="width: {$w}px"
|
||||
><div style="width: {$pvalue}%" class="pvalue"></div
|
||||
><div style="width: {$pempty}%" class="pempty"></div
|
||||
></div
|
||||
>{$blocksgraph}</td>
|
||||
<td
|
||||
><form method="post"
|
||||
><form method="post" action=""
|
||||
><div
|
||||
><input type="hidden" name="type" value="{$ci['type']}"
|
||||
/><input type="hidden" name="cacheid" value="{$ci['cacheid']}"
|
||||
|
@ -148,12 +149,11 @@ if ($cachelist) {
|
|||
}
|
||||
foreach (array('Cached' => $cachelist['cache_list'], 'Deleted' => $cachelist['deleted_list']) as $listname => $entries) {
|
||||
$a->reset();
|
||||
echo "
|
||||
<caption>", _T("{$cachelist['type_name']} $listname"), "</caption>";
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0" cellpadding="4" class="cycles entries" width="100%">
|
||||
<caption><?php echo _T("{$cachelist['type_name']} $listname"); ?></caption>
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
|
|
|
@ -2,6 +2,8 @@ h1 { text-align: center; display: block; }
|
|||
input, table { font-family: sans-serif; font-size: 11px; }
|
||||
th { font-size: 12px; }
|
||||
table { border-collapse: collapse; }
|
||||
table.center { margin-left: auto; margin-right: auto; }
|
||||
table\-center { text-align: center; }
|
||||
table.cycles { border: 1px solid black; margin-top: 5px; margin-bottom: 5px; }
|
||||
table.cycles .col1 { background-color: #f5f5f5; }
|
||||
table.cycles .col2 { background-color: #e0e0e0; }
|
||||
|
@ -54,11 +56,15 @@ th a { color: black; font-weight: bold; display: block; width: 100%; height: 100
|
|||
|
||||
.lineCov { background-color: #F0F0F0; }
|
||||
.lineNoCov { background-color: #ffe0e0; }
|
||||
div.code {
|
||||
border: 1px solid gray;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre.code {
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
white-space: pre;
|
||||
border: 1px solid gray;
|
||||
padding: 0; margin: 0;
|
||||
}
|
||||
|
||||
.footnote { text-align: right; font-size: 12px; }
|
||||
|
|
|
@ -113,8 +113,8 @@ class XcacheCoverageViewer
|
|||
$lines = preg_replace('(^<span[^>]*>|</span>$)', '', $lines);
|
||||
$lines = explode('<br />', $lines);
|
||||
$last = array_pop($lines);
|
||||
$lines[count($lines) - 1] = $last;
|
||||
$filecov = sprint_cov($fileinfo['cov'], $lines, false);
|
||||
$filecov .= $last;
|
||||
unset($source);
|
||||
}
|
||||
else {
|
||||
|
@ -324,13 +324,13 @@ function sprint_cov($cov, $lines, $encode = true)
|
|||
}
|
||||
}
|
||||
if (isset($cov[$offs])) {
|
||||
$lines[$l] = sprintf("<li class=\"line%sCov\"> %s\t%s\n</li>"
|
||||
$lines[$l] = sprintf("<li class=\"line%sCov\"><pre class=\"code\"> %s\t%s\n</pre></li>"
|
||||
, $cov[$offs] ? '' : 'No'
|
||||
, $cov[$offs]
|
||||
, $line);
|
||||
}
|
||||
else {
|
||||
$lines[$l] = "<li>\t$line\n</li>";
|
||||
$lines[$l] = "<li><pre class=\"code\">\t$line\n</pre></li>";
|
||||
}
|
||||
}
|
||||
return implode('', $lines);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<?php
|
||||
|
@ -55,7 +55,8 @@ function dir_head()
|
|||
$l_lns = _T("Lines");
|
||||
$l_tds = _T("TODO");
|
||||
return <<<EOS
|
||||
<table align="center" cellpadding="2" cellspacing="0" border="0" class="cycles">
|
||||
<div class="table-center">
|
||||
<table cellpadding="2" cellspacing="0" border="0" class="cycles center">
|
||||
<tr>
|
||||
<th>{$l_dir}</th><th>{$l_per}</th><th>{$l_hit}</th><th>{$l_lns}</th><th>{$l_tds}</th>
|
||||
</tr>
|
||||
|
@ -104,6 +105,7 @@ function dir_foot()
|
|||
{
|
||||
return <<<EOS
|
||||
</table>
|
||||
</div>
|
||||
EOS;
|
||||
}
|
||||
|
||||
|
@ -116,8 +118,8 @@ function file_head()
|
|||
$l_hit = _T("Hits");
|
||||
$l_lns = _T("Lines");
|
||||
return <<<EOS
|
||||
<br>
|
||||
<table align="center" cellpadding="2" cellspacing="0" border="0" class="cycles">
|
||||
<div class="center-table">
|
||||
<table cellpadding="2" cellspacing="0" border="0" class="cycles center">
|
||||
<tr>
|
||||
<th>{$l_fil}</th><th>{$l_per}</th><th>{$l_hit}</th><th>{$l_lns}</th>
|
||||
</tr>
|
||||
|
@ -161,6 +163,7 @@ function file_foot()
|
|||
{
|
||||
return <<<EOS
|
||||
</table>
|
||||
</div>
|
||||
EOS;
|
||||
}
|
||||
|
||||
|
@ -171,7 +174,9 @@ if ($action == 'dir') {
|
|||
}
|
||||
$path_html = htmlspecialchars($path);
|
||||
echo <<<EOS
|
||||
<a href="?">$l_root</a> $path<br />
|
||||
<div>
|
||||
<a href="?">$l_root</a> $path<br />
|
||||
</div>
|
||||
EOS;
|
||||
echo dir_head($dirinfo);
|
||||
echo dir_row($dirinfo, $path);
|
||||
|
@ -198,7 +203,9 @@ else if ($action == 'file') {
|
|||
$dir_url = urlencode($dir);
|
||||
$dir_html = htmlspecialchars($dir);
|
||||
echo <<<EOS
|
||||
<a href="?">$l_root</a> <a href="?path={$dir_url}">{$dir_html}</a>/<strong>{$filename}</strong><br />
|
||||
<div>
|
||||
<a href="?">$l_root</a> <a href="?path={$dir_url}">{$dir_html}</a>/<strong>{$filename}</strong><br />
|
||||
</div>
|
||||
EOS;
|
||||
|
||||
echo file_head();
|
||||
|
@ -208,19 +215,25 @@ EOS;
|
|||
if ($tplfile) {
|
||||
$tplfile_html = htmlspecialchars($tplfile);
|
||||
echo <<<EOS
|
||||
<a href="#tpl">{$tplfile_html}</a><br />
|
||||
<div>
|
||||
<a href="#tpl">{$tplfile_html}</a><br />
|
||||
</div>
|
||||
EOS;
|
||||
}
|
||||
if (function_exists('ob_filter_path_nicer')) {
|
||||
ob_end_flush();
|
||||
}
|
||||
echo <<<EOS
|
||||
<pre class="code"><ol>{$filecov}</ol></pre>
|
||||
<div class="code">
|
||||
<ol>{$filecov}</ol>
|
||||
</div>
|
||||
EOS;
|
||||
if ($tplfile) {
|
||||
echo <<<EOS
|
||||
<a name="tpl">{$tplfile}</a>
|
||||
<pre class="code"><ol>{$tplcov}</ol></pre>
|
||||
<div class="code">
|
||||
<ol>{$tplcov}</ol>
|
||||
</div>
|
||||
EOS;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue