Skip to content
Permalink
Browse files

Collapse version variants into one box

  • Loading branch information...
derickr committed Jun 22, 2019
1 parent 0528a42 commit 3e4e3e6b3146de9267e8acfb0f3914a3f0cc3fdf
Showing with 39 additions and 25 deletions.
  1. +31 −15 html/ci-items.php
  2. +8 −10 html/core.css
@@ -82,7 +82,7 @@ static function showRunInfo( string $runId )
<td>{$f->desc}</td>
</tr>
<tr>
<td><pre class='log'>{$log}</pre></td>
<td class='log'><pre class='log'>{$log}</pre></td>
</tr>
</table>
ENDFAILURE;
@@ -96,9 +96,14 @@ static function showMatrix()
$query = new \MongoDB\Driver\Command( [
'aggregate' => 'run',
'pipeline' => [
[ '$sort' => [ '_id' => -1 ] ],
[ '$project' => [
'failures' => 0,
] ],
[ '$limit' => 10000 ],
[ '$group' => [ '_id' => '$run', 'docs' => [ '$push' => '$$ROOT' ] ] ],
[ '$sort' => [ '_id' => -1 ] ],
[ '$limit' => 100 ],
[ '$limit' => 200 ],
],
'cursor' => (object) [],
] );
@@ -117,12 +122,12 @@ static function showMatrix()
{
foreach ( $info as $key => $version )
{
$phpVersions[ $version->cfg->config ] = true;
$phpVersions[ $version->cfg->version ] = true;
$latestAbbrev = trim( $version->run );
$abbrevs[ $latestAbbrev ] = $version;
if ( !isset( $matrix[ trim( $latestAbbrev ) ][ trim( $version->cfg->config ) ] ) )
if ( !isset( $matrix[ trim( $latestAbbrev ) ][ trim( $version->cfg->version )][ trim( $version->cfg->config ) ] ) )
{
$matrix[ trim( $latestAbbrev ) ][ trim( $version->cfg->config ) ] = $version;
$matrix[ trim( $latestAbbrev ) ][ trim( $version->cfg->version )][ trim( $version->cfg->config ) ] = $version;
}
}
}
@@ -187,6 +192,14 @@ static function showMatrix()
}
echo "\t</tr>\n";
$filteredVersions = array_filter( $phpVersions, function( $version ) {
if ( strchr( $version, '-' ) )
{
return false;
}
return true;
} );
foreach ( $phpVersions as $version )
{
/* Check whether there are any non-missing items */
@@ -214,19 +227,22 @@ static function showMatrix()
}
$v = $matrix[$abbrev][$version];
if ( $v->buildSuccess != true )
echo "<td>";
foreach ( $v as $variant )
{
echo "<td class='bf'><a href='/ci.php?r={$v->_id}'>✖</a></td>\n";
continue;
}
if ($variant->buildSuccess != true) {
echo "<a class='bf' label={$variant->_id}' href='/ci.php?r={$variant->_id}'>✖</a>";
continue;
}
if ( $v->stats->errors != 0 || $v->stats->failures != 0 )
{
echo "<td class='err'><a href='/ci.php?r={$v->_id}'>✖</a></td>\n";
continue;
}
if ($variant->stats->errors != 0 || $variant->stats->failures != 0) {
echo "<a class='err' label={$variant->_id}' href='/ci.php?r={$variant->_id}'>✖</a>";
continue;
}
echo "<td class='success'><a href='/ci.php?r={$v->_id}'>✔</a></td>\n";
echo "<a class='success' alt='{$variant->_id}' href='/ci.php?r={$variant->_id}'>✔</a>";
}
echo "</td>";
}
echo "</tr>\n";
}
@@ -17,18 +17,16 @@ td.ctr { text-align: center; padding-left: 10px; padding-right: 10px; vertical
table.ci { width: 100%; border-collapse: collapse; }
table.ci tr.version th { white-space: nowrap; padding: 0; text-align: center; }
table.ci tr.version th div.time { font-size: 66%; line-height: 1em; font-weight: normal; }
table.ci tr th { border: 1px solid black; padding-left: 0.5em;}
table.ci tr th { border: 1px solid black; padding-left: 0.5em; text-align: center; }
table.ci tr td { text-align: center; border: 1px solid black; font-size: 1.5em; padding: 0.25em; }
table.ci tr td.bf { color: #c1e; background-color: #eee; }
table.ci tr td.bf a { color: #c1e; background-color: #eee; text-decoration: none; }
table.ci tr td.bf a:hover { background-color: #ddd; }
table.ci tr td.err { color: #e44; background-color: #eee; }
table.ci tr td.err a { color: #e44; background-color: #eee; text-decoration: none; }
table.ci tr td.err a:hover { background-color: #ddd; }
table tr td.log { text-align: left; overflow-wrap: anywhere; }
table.ci tr td a.bf { color: #c1e; text-decoration: none; }
table.ci tr td a.bf:hover { background-color: #ddd; }
table.ci tr td a.err { color: #e44; text-decoration: none; }
table.ci tr td a.err:hover { background-color: #ddd; }
table.ci tr td.missing { color: #ccc; }
table.ci tr td.success { color: #0b0; background-color: #eee; }
table.ci tr td.success a { color: #0b0; background-color: #eee; text-decoration: none; }
table.ci tr td.success a:hover { background-color: #ddd; }
table.ci tr td a.success { color: #0b0; text-decoration: none; }
table.ci tr td a.success:hover { background-color: #ddd; }
table.ci tr td pre.log { font-size: 0.66em; text-align: left; }
h2.bf { color: #c1e; }
h2.err { color: #e44; }

0 comments on commit 3e4e3e6

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