diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-09-09 22:01:31 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-09-09 22:01:31 +0000 |
commit | 58a32d650b288a34013db1d6020d356e3aac22d6 (patch) | |
tree | 51e44ec1045182fd318293e27e0f68d470941f36 | |
parent | 57687bab5f8e7369eb7fbe03dfa3e28136978038 (diff) | |
download | pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.tar pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.tar.gz pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.tar.bz2 pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.tar.xz pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.zip |
show build dir name + .youri and .done log files
-rw-r--r-- | log_files.php | 26 | ||||
-rw-r--r-- | style.css | 5 |
2 files changed, 27 insertions, 4 deletions
diff --git a/log_files.php b/log_files.php index bdc6525..a2203d3 100644 --- a/log_files.php +++ b/log_files.php @@ -25,6 +25,8 @@ require 'conf.php'; // FIXME this expects to remove /uploads from $key. Could be different in the future. $key = substr($key, 8); $path = realpath($upload_dir . $key); +$job = explode('/', $key); +$job = end($job); if (!is_dir($path)) { header('Status: 404 Not Found'); @@ -33,7 +35,8 @@ if (!is_dir($path)) { } $glob = $path . '/*'; -$s = '<ul>'; +$s = sprintf('<h4>%s</h4>', $job); +$s .= '<ul>'; foreach (glob_recursive($glob) as $f) { if (is_dir($f)) @@ -41,11 +44,30 @@ foreach (glob_recursive($glob) as $f) { $link = 'uploads' . str_replace($upload_dir, '', $f); $show = str_replace(array($path . '/', '/'), array('', ' / '), $f); - $s .= sprintf('<li><a href="%s">%s</a> (%s)</li>', + $s .= sprintf('<li><a href="%s" rel="nofollow">%s</a> (%s)</li>', $link, $show, _format_bytes(filesize($f)) ); } + +$others = array( + '.youri', + '_i586.done', + '_x86_64.done' +); +foreach ($others as $suffix) { + $f = $path . $suffix; + if (file_exists($f)) { + $link = 'uploads' . str_replace($upload_dir, '', $f); + $show = explode($path, $f); + $show = $job . $suffix; + $s .= sprintf('<li><a href="%s" rel="nofollow">%s</a> (%s)</li>', + $link, $show, + _format_bytes(filesize($f)) + ); + } +} + $s .= '</ul>'; echo $s; @@ -43,5 +43,6 @@ tr.partial td.status-box { background: blue; } .figure { font-size: 120%%; font-weight: bold; } -tr.build-files-list td ul { font-size: 85%; padding: 1em 0 2em 2em; color: #555; } - tr.build-files-list td a { text-decoration: none; }
\ No newline at end of file +tr.build-files-list td { font-size: 85%; padding: 1em 0 2em 2em; color: #555; } + tr.build-files-list td a { text-decoration: none; } + tr.build-files-list td h4 { margin: 0 0 0.6em 0; }
\ No newline at end of file |