summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-January/002045.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/2011-January/002045.html')
-rw-r--r--zarb-ml/mageia-sysadm/2011-January/002045.html221
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 &quot;score&quot; 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 &quot;score&quot; 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 &quot;score&quot; 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 &quot;score&quot; 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(&quot;data&quot;);
+@@ -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; }
+ &lt;/style&gt;
+ &lt;/head&gt;
+ &lt;body&gt;
+@@ -189,9 +193,6 @@
+ );
+
+ #########################################
+-echo '&lt;table&gt;',
+- '&lt;caption&gt;Packages submitted in the past ', $max_modified * 24, '&amp;nbsp;hours.&lt;/caption&gt;',
+- '&lt;tr&gt;&lt;th&gt;Submitted&lt;/th&gt;&lt;th&gt;User&lt;/th&gt;&lt;th&gt;Package&lt;/th&gt;&lt;th&gt;Target&lt;/th&gt;&lt;th&gt;Media&lt;/th&gt;&lt;th colspan=&quot;2&quot;&gt;Status&lt;/th&gt;&lt;/tr&gt;';
+
+ $s = '';
+ $tmpl = &lt;&lt;&lt;T
+@@ -225,47 +226,67 @@
+ 'built' =&gt; ''
+ );
+
+-foreach ($pkgs as $key =&gt; $p) {
+- $p['type'] = pkg_gettype($p);
++if ($total &gt; 0) {
++ foreach ($pkgs as $key =&gt; $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 .= '&lt;td&gt;';
++ $s .= ($typelink != '') ?
++ sprintf('&lt;a href=&quot;%s&quot;&gt;%s&lt;/a&gt;', $typelink, $p['type']) :
++ $p['type'];
++
++ $s .= '&lt;/td&gt;';
++ //$s .= '&lt;td&gt;' . sprintf($badges[$p['type']], $p['user']) . '&lt;/td&gt;';
++ $s .= '&lt;/tr&gt;';
+ }
++ // Table
++ echo '&lt;table&gt;',
++ '&lt;caption&gt;Packages submitted in the past ', $max_modified * 24, '&amp;nbsp;hours.&lt;/caption&gt;',
++ '&lt;tr&gt;&lt;th&gt;Submitted&lt;/th&gt;&lt;th&gt;User&lt;/th&gt;&lt;th&gt;Package&lt;/th&gt;&lt;th&gt;Target&lt;/th&gt;&lt;th&gt;Media&lt;/th&gt;&lt;th colspan=&quot;2&quot;&gt;Status&lt;/th&gt;&lt;/tr&gt;',
++ $s,
++ '&lt;/table&gt;';
+
+- $s .= '&lt;td&gt;';
+- $s .= ($typelink != '') ?
+- sprintf('&lt;a href=&quot;%s&quot;&gt;%s&lt;/a&gt;', $typelink, $p['type']) :
+- $p['type'];
++ // Stats
++ $s = '&lt;div id=&quot;stats&quot;&gt;';
++ $score = round($stats['uploaded']/$total * 100);
++ $s .= sprintf('&lt;div id=&quot;score&quot;&gt;&lt;h3&gt;Score: %d/100&lt;/h3&gt;
++ &lt;div id=&quot;score-box&quot;&gt;&lt;div id=&quot;score-meter&quot; style=&quot;height: %dpx;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;',
++ $score, $score);
+
+- $s .= '&lt;/td&gt;';
+- $s .= '&lt;td&gt;' . sprintf($badges[$p['type']], $p['user']) . '&lt;/td&gt;';
+- $s .= '&lt;/tr&gt;';
++ $s .= '&lt;table&gt;&lt;caption&gt;Stats.&lt;/caption&gt;&lt;tr&gt;&lt;th colspan=&quot;2&quot;&gt;Status&lt;/th&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;%&lt;/th&gt;&lt;/tr&gt;';
++ foreach ($stats as $k =&gt; $v) {
++ $s .= sprintf('&lt;tr class=&quot;%s&quot;&gt;&lt;td class=&quot;status-box&quot;&gt;&lt;/td&gt;&lt;td&gt;%s&lt;/td&gt;&lt;td&gt;%d&lt;/td&gt;&lt;td&gt;%d%%&lt;/td&gt;&lt;/tr&gt;',
++ $k, $k, $v, round($v/$total*100));
++ }
++ $s .= '&lt;/table&gt;&lt;/div&gt;';
++ echo $s;
+ }
+-echo $s, '&lt;/table&gt;';
+-
+-$s = '&lt;div id=&quot;stats&quot;&gt;&lt;table&gt;&lt;caption&gt;Stats.&lt;/caption&gt;&lt;tr&gt;&lt;th colspan=&quot;2&quot;&gt;Status&lt;/th&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;%&lt;/th&gt;&lt;/tr&gt;';
+-foreach ($stats as $k =&gt; $v) {
+- $s .= sprintf('&lt;tr class=&quot;%s&quot;&gt;&lt;td class=&quot;status-box&quot;&gt;&lt;/td&gt;&lt;td&gt;%s&lt;/td&gt;&lt;td&gt;%d&lt;/td&gt;&lt;td&gt;%d%%&lt;/td&gt;&lt;/tr&gt;',
+- $k, $k, $v, round($v/$total*100));
++else
++{
++ echo sprintf('&lt;p&gt;No package has been submitted in the past %d&amp;nbsp;hours.&lt;/p&gt;',
++ $max_modified * 24);
+ }
+-$s .= '&lt;/table&gt;&lt;/div&gt;';
+-$s .= '&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;';
+
+-echo $s;
+-
+ ?&gt;
++ &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
++ &lt;hr /&gt;
++ &lt;p&gt;Generated at &lt;?php echo $date_gen; ?&gt;.&lt;/p&gt;
+ &lt;/body&gt;
+ &lt;/html&gt;
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;/pipermail/mageia-sysadm/attachments/20110113/512ecd45/attachment.html&gt;
+</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>