diff options
Diffstat (limited to 'zarb-ml/mageia-sysadm/2011-January/002045.html')
-rw-r--r-- | zarb-ml/mageia-sysadm/2011-January/002045.html | 221 |
1 files changed, 221 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2011-January/002045.html b/zarb-ml/mageia-sysadm/2011-January/002045.html new file mode 100644 index 000000000..15caa9226 --- /dev/null +++ b/zarb-ml/mageia-sysadm/2011-January/002045.html @@ -0,0 +1,221 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [Mageia-sysadm] [292] properly handle empty queue; remove feedback labels; try a "score" for this list of packages + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B292%5D%20properly%20handle%20empty%20queue%3B%0A%20remove%20feedback%20labels%3B%20try%20a%20%22score%22%20%20for%20this%20list%20of%20packages&In-Reply-To=%3C20110113171301.8C70B42368%40valstar.mageia.org%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="002044.html"> + <LINK REL="Next" HREF="002046.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[Mageia-sysadm] [292] properly handle empty queue; remove feedback labels; try a "score" for this list of packages</H1> + <B>root at mageia.org</B> + <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B292%5D%20properly%20handle%20empty%20queue%3B%0A%20remove%20feedback%20labels%3B%20try%20a%20%22score%22%20%20for%20this%20list%20of%20packages&In-Reply-To=%3C20110113171301.8C70B42368%40valstar.mageia.org%3E" + TITLE="[Mageia-sysadm] [292] properly handle empty queue; remove feedback labels; try a "score" for this list of packages">root at mageia.org + </A><BR> + <I>Thu Jan 13 18:13:01 CET 2011</I> + <P><UL> + <LI>Previous message: <A HREF="002044.html">[Mageia-sysadm] Puppet Report for rabbit.mageia.org +</A></li> + <LI>Next message: <A HREF="002046.html">[Mageia-sysadm] [293] adjust score style +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#2045">[ date ]</a> + <a href="thread.html#2045">[ thread ]</a> + <a href="subject.html#2045">[ subject ]</a> + <a href="author.html#2045">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Revision: 292 +Author: rda +Date: 2011-01-13 18:13:01 +0100 (Thu, 13 Jan 2011) +Log Message: +----------- +properly handle empty queue; remove feedback labels; try a "score" for this list of packages + +Modified Paths: +-------------- + build_system/web/index.php + +Modified: build_system/web/index.php +=================================================================== +--- build_system/web/index.php 2011-01-13 15:54:31 UTC (rev 291) ++++ build_system/web/index.php 2011-01-13 17:13:01 UTC (rev 292) +@@ -21,6 +21,7 @@ + $robots = 'no' . $robots; + } + $tz = new DateTimeZone('UTC'); ++$date_gen = date('c'); + + # Temporary until initial mirror is ready + chdir("data"); +@@ -169,6 +170,9 @@ + tr.youri td.status-box { background: olive; } + + #stats { float: right; } ++ #score {} ++ #score-box { width: 200px; height: 100px; background: #faa; } ++ #score-meter { width: 200px; background: #afa; } + </style> + </head> + <body> +@@ -189,9 +193,6 @@ + ); + + ######################################### +-echo '<table>', +- '<caption>Packages submitted in the past ', $max_modified * 24, '&nbsp;hours.</caption>', +- '<tr><th>Submitted</th><th>User</th><th>Package</th><th>Target</th><th>Media</th><th colspan="2">Status</th></tr>'; + + $s = ''; + $tmpl = <<<T +@@ -225,47 +226,67 @@ + 'built' => '' + ); + +-foreach ($pkgs as $key => $p) { +- $p['type'] = pkg_gettype($p); ++if ($total > 0) { ++ foreach ($pkgs as $key => $p) { ++ $p['type'] = pkg_gettype($p); + +- $stats[$p['type']] += 1; +- $s .= sprintf($tmpl, +- $p['type'], +- key2date($key), +- $p['user'], $p['user'], +- $p['package'], +- $p['version'], +- $p['media'], $p['section'] +- ); ++ $stats[$p['type']] += 1; ++ $s .= sprintf($tmpl, ++ $p['type'], ++ key2date($key), ++ $p['user'], $p['user'], ++ $p['package'], ++ $p['version'], ++ $p['media'], $p['section'] ++ ); + +- $typelink = ''; +- if ($p['type'] == 'failure') { +- $typelink = '/uploads/' . $p['type'] . '/' . $p['path']; +- } elseif ($p['type'] == 'rejected') { +- $typelink = '/uploads/' . $p['type'] . '/' . $p['path'] . '.youri'; ++ $typelink = ''; ++ if ($p['type'] == 'failure') { ++ $typelink = '/uploads/' . $p['type'] . '/' . $p['path']; ++ } elseif ($p['type'] == 'rejected') { ++ $typelink = '/uploads/' . $p['type'] . '/' . $p['path'] . '.youri'; ++ } ++ ++ $s .= '<td>'; ++ $s .= ($typelink != '') ? ++ sprintf('<a href="%s">%s</a>', $typelink, $p['type']) : ++ $p['type']; ++ ++ $s .= '</td>'; ++ //$s .= '<td>' . sprintf($badges[$p['type']], $p['user']) . '</td>'; ++ $s .= '</tr>'; + } ++ // Table ++ echo '<table>', ++ '<caption>Packages submitted in the past ', $max_modified * 24, '&nbsp;hours.</caption>', ++ '<tr><th>Submitted</th><th>User</th><th>Package</th><th>Target</th><th>Media</th><th colspan="2">Status</th></tr>', ++ $s, ++ '</table>'; + +- $s .= '<td>'; +- $s .= ($typelink != '') ? +- sprintf('<a href="%s">%s</a>', $typelink, $p['type']) : +- $p['type']; ++ // Stats ++ $s = '<div id="stats">'; ++ $score = round($stats['uploaded']/$total * 100); ++ $s .= sprintf('<div id="score"><h3>Score: %d/100</h3> ++ <div id="score-box"><div id="score-meter" style="height: %dpx;"></div></div></div>', ++ $score, $score); + +- $s .= '</td>'; +- $s .= '<td>' . sprintf($badges[$p['type']], $p['user']) . '</td>'; +- $s .= '</tr>'; ++ $s .= '<table><caption>Stats.</caption><tr><th colspan="2">Status</th><th>Count</th><th>%</th></tr>'; ++ foreach ($stats as $k => $v) { ++ $s .= sprintf('<tr class="%s"><td class="status-box"></td><td>%s</td><td>%d</td><td>%d%%</td></tr>', ++ $k, $k, $v, round($v/$total*100)); ++ } ++ $s .= '</table></div>'; ++ echo $s; + } +-echo $s, '</table>'; +- +-$s = '<div id="stats"><table><caption>Stats.</caption><tr><th colspan="2">Status</th><th>Count</th><th>%</th></tr>'; +-foreach ($stats as $k => $v) { +- $s .= sprintf('<tr class="%s"><td class="status-box"></td><td>%s</td><td>%d</td><td>%d%%</td></tr>', +- $k, $k, $v, round($v/$total*100)); ++else ++{ ++ echo sprintf('<p>No package has been submitted in the past %d&nbsp;hours.</p>', ++ $max_modified * 24); + } +-$s .= '</table></div>'; +-$s .= '<div class="clear"></div>'; + +-echo $s; +- + ?> ++ <div class="clear"></div> ++ <hr /> ++ <p>Generated at <?php echo $date_gen; ?>.</p> + </body> + </html> +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: </pipermail/mageia-sysadm/attachments/20110113/512ecd45/attachment.html> +</PRE> + + + + + + + + + + + + + + + + + + + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="002044.html">[Mageia-sysadm] Puppet Report for rabbit.mageia.org +</A></li> + <LI>Next message: <A HREF="002046.html">[Mageia-sysadm] [293] adjust score style +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#2045">[ date ]</a> + <a href="thread.html#2045">[ thread ]</a> + <a href="subject.html#2045">[ subject ]</a> + <a href="author.html#2045">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm +mailing list</a><br> +</body></html> |