Skip to content
Permalink
Browse files

Added supporters and work log pages

  • Loading branch information...
derickr committed Sep 16, 2019
1 parent dfac01c commit 31de9442d4431f6ade44f06b8304f074f710c4f5
Showing with 183 additions and 0 deletions.
  1. +31 −0 html/core.css
  2. +1 −0 html/include/menu-support.php
  3. +87 −0 html/include/report.php
  4. +44 −0 html/log.php
  5. +13 −0 html/reports/2019-06.txt
  6. +5 −0 html/reports/2019-09.txt
  7. +2 −0 html/reports/supporters.txt
@@ -143,6 +143,37 @@ table.versions td.supported { text-align: center; border: 1px solid grey; color:
table.versions td.future { text-align: center; border: 1px solid grey; color: lightblue; }
table.legend th { width: 25%; }

div.report {}

div.funding { width: 100%; height: 20px; color: black; background-color: white; border: 1px solid black; margin: 1em;}
div.patreon { height: 100%; float: left; color: #44AF56; background-color: #44AF56;}
div.basic { height: 100%; float: left; color: #69BF78; background-color: #69BF78;}
div.company { height: 100%; float: left; color: #8FCF9A; background-color: #8FCF9A;}
div.others { height: 100%; float: left; color: #B4DFBB; background-color: #B4DFBB;}
div.comment { height: 100%; float: right; font-size: 75%; margin-bottom: 15px;}

div.spend { width: 100%; height: 20px; color: black; background-color: white; border: 1px solid black; margin: 1em;}
div.type-bug { height: 100%; float: left; color: white; background-color: #0121AF;}
div.type-generic { height: 100%; float: left; color: white; background-color: #344DBF;}
div.type-php { height: 100%; float: left; color: white; background-color: #677ACF;}
div.type-release { height: 100%; float: left; color: white; background-color: #99A6DF;}
div.type-test { height: 100%; float: left; color: black; background-color: #CCD3EF;}

table.log { width: 100%; margin: 1em; line-height: 1; }
table.log td { vertical-align: middle; padding: 2px; }
table.log tr { font-size: 75%; }
table.log tr td.day, table.log tr th.day { text-align: center; margin-right: 0.5em; }
table.log tr td.type, table.log tr th.type { text-align: center; }
table.log tr td.type div { border-radius: 5px; padding: 0.25em; text-align: center; float: none; }
table.log tr td.description, table.log tr th.description { width: 100%; }
table.log tr td.hours, table.log tr th.hours { text-align: right; }

div.left { float: left; }
div.right { float: right; width: 25%; }
div.right p { font-size: 75%; }

ul.supporters { padding-left: 0; list-style: none; }

@media print {
div#menu { display: none; }
div#menu-docs { display: none; }
@@ -11,6 +11,7 @@
<div>
<span class="sans">
<a href="/support.php">support</a> |
<a href="/log.php">log</a> |
<a href="/reporting-bugs.php">reporting bugs</a> |
<a href="http://bugs.xdebug.org">issue tracker</a>
</span>
@@ -0,0 +1,87 @@
<?php
function show_report( string $file )
{
$f = file( 'reports/'. $file );
$summary = array_shift($f);
preg_match( '/[0-9]{4}-[0-9]{2}/', $file, $matches );
$d = new DateTimeImmutable( "{$matches[0]}-01" );
echo "<h2>" . $d->format( "F Y" ) . "</h2>\n";
// var_dump( $summary, $f );
list( $patreon, $basic, $company, $others ) = explode( "\t", trim( $summary) );
$total = $patreon + $basic + $company + $others;
echo <<<ENDDIV
<div class='funding'>
<div class='others' style='width: {$others}%'></div>
<div class='company' style='width: {$company}%'></div>
<div class='basic' style='width: {$basic}%'></div>
<div class='patreon' style='width: {$patreon}%'></div>
<div class='comment'>Funding</div>
</div>
ENDDIV;
$totalHours = [];
$logTable = "<table class='log'>\n";
$logTable .= "<tr><th class='day'>Day</th><th class='type'>Type</th><th class='description'>Description</th><th class='hours'>Hours</th></tr>\n";
foreach( $f as $line )
{
$line = trim( $line );
if ( $line == '' ) {
continue;
}
list( $day, $type, $hours, $description ) = explode( "\t", $line );
$day = (int) substr( $day, 8, 2);
$hours = sprintf( '%.2f', $hours );
if ( $type == '' ) {
$type = 'generic';
};
$logTable .= "<tr><td class='day'>{$day}</td><td class='type'><div class='type-{$type}'>{$type}</div></td><td>{$description}</td><td class='hours'>{$hours}</td></tr>\n";
$totalHours[$type] += $hours;
}
$logTable .= "</table>\n";
krsort( $totalHours );
$spendBar = "<div class='spend'>\n";
foreach( $totalHours as $type => $value )
{
$spendBar .= "<div class='type-{$type}' style='width: {$value}%'></div>\n";
}
$spendBar .= "</div>\n";
echo $spendBar;
echo $logTable;
}
function show_supporters()
{
$f = file( 'reports/supporters.txt' );
$lines = [];
echo "<ul class='supporters'>\n";
foreach ($f as $line) {
$line = trim( $line );
list( $date, $name, $link ) = explode( "\t", $line );
$now = new \DateTimeImmutable();
$d = new \DateTimeImmutable( $date );
$diff = $now->diff( $d );
if ( $diff->days > 365 )
{
continue;
}
echo "<li><a href='{$link}'>{$name}</a></li>\n";
}
echo "</ul>\n";
}
@@ -0,0 +1,44 @@
<?php $title = "Xdebug: Log"; include "include/header.php"; require 'include/report.php'; ?>
<tr>
<td>&nbsp;</td>
<td><span class="serif">

<!-- MAIN FEATURE START -->

<h1>Log and Supporters Xdebug</h1>

<?php include "include/menu-support.php"; ?>

<div class="left">
<?php
$d = Dir( 'reports' );
$files = array();
while ( false !== ( $entry = $d->read() ) )
{
if (preg_match( '@^20[0-9][0-9]-[01][0-9]\.txt$@', $entry, $m)) {
$files[] = $entry;
}
}
rsort($files);
foreach ($files as $file)
{
show_report( $file );
echo "<br/>\n";
}
?>
</div>
<div class="right">
<h2>Current Supporters</h2>
<?php
show_supporters()
?>
<p>You can also be listed as a supporter by <a href='/support.php'>signing up</a> for a <i>Company</i> package.</p>
</div>

<!-- MAIN FEATURE END -->

</td>
<td>&nbsp;</td>
</tr>
<?php include "include/footer.php"; ?>
@@ -0,0 +1,13 @@
8.62 0.00 0.00 3.71
2019-06-03 test 3.5 Working on making the test suite easier to maintain wrt to versions
2019-06-04 test 3.5 Working on making the test suite easier to maintain wrt to versions
2019-06-07 test 1 Working on making the test suite easier to maintain wrt to versions
2019-06-10 2.5 Solving ArrayObject test, and additional test splits due to PHP 7.4 changes
2019-06-12 php 2 PHP 7.4 support with removal of DELAYED_CLASS_INIT
2019-06-12 0.75 Checking out Svetlana’s email with issues regarding resolved breakpoints
2019-06-13 0.5 Checking out Svetlana’s email with issues regarding resolved breakpoints
2019-06-14 0.5 PHP 7.4 on Windows compat
2019-06-15 1 PHP 7.4 on Windows compat; triaging bug reports
2019-06-28 bug 1.5 Triage reports in preparation for alpha1
2019-06-28 release 2 Release Xdebug 2.8.0alpha1
2019-06-29 bug 1 Looking at shutdown/trace issue (#1676)
@@ -0,0 +1,5 @@
13.11 0.17 0.83 3.71
2019-09-03 1.5 Writing Xdebug August 2019 update
2019-09-03 bug 1 Investigate Pull Request #474 for issue #1534 and #1665
2019-09-05 bug 3 Fixed issue #1665: Segfault with garbage collection and complex function arguments
2019-09-06 bug 1 Investigating #1699: Crash during debugging Phalcon project
@@ -0,0 +1,2 @@
2019-09-13 Tideways https://tideways.com/
2019-06-11 Intracto https://www.intracto.com/nl-be

0 comments on commit 31de944

Please sign in to comment.
You can’t perform that action at this time.